src/JavaVM.st
branchjk_new_structure
changeset 837 8f42226d82c0
parent 827 4850fefd7a34
child 846 cec92244091c
--- a/src/JavaVM.st	Sat Jun 04 15:08:01 2011 +0000
+++ b/src/JavaVM.st	Sat Jun 04 15:23:37 2011 +0000
@@ -4142,33 +4142,33 @@
     "Modified: / 16-03-2011 / 15:43:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_Class_getDeclaredMethods0: aJavaContext
-
+_java_lang_Class_getDeclaredMethods0: aJavaContext 
     <javanative: 'java/lang/Class' name: 'getDeclaredMethods0'>
-
-        |class publicOnly methods|
-
-    class := self reflection classForJavaClassObject:(aJavaContext receiver).
-    publicOnly := (aJavaContext argAt:1) == 1.
+    | class  publicOnly  methods |
+
+    class := self reflection classForJavaClassObject: (aJavaContext receiver).
+    publicOnly := (aJavaContext argAt: 1) == 1.
     methods := OrderedCollection new.
     class 
-        selectorsAndMethodsDo:[:selector :method | 
+        selectorsAndMethodsDo: [
+            :selector :method | 
             (method isJavaMethod 
-                and:[
-                    (selector at:1) ~~ $< 
-                        and:[
-                            (selector startsWith:'<init>(') not 
-                                and:[publicOnly not or:[method isPublic]]
+                and: [
+                    (selector at: 1) ~~ $< 
+                        and: [
+                            (selector startsWith: '<init>(') not 
+                                and: [ publicOnly not or: [ method isPublic ] ]
                         ]
                 ]) 
-                    ifTrue:[methods add:(self javaMethodObjectForMethod:method)]
+                    ifTrue: [ methods add: (self javaMethodObjectForMethod: method) ]
         ].
-    ^ (self classForName: 'java.lang.reflect.Method')
-        arrayClass withAll: methods asArray
+    ^ (self classForName: 'java.lang.reflect.Method') arrayClass 
+        withAll: methods asArray
 
     "Created: / 21-12-2010 / 22:39:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 28-01-2011 / 15:19:09 / Marcel Hlopko <hlopik@gmail.com>"
     "Modified: / 11-02-2011 / 08:35:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 04-06-2011 / 17:07:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
 _java_lang_Class_getEnclosingMethod0: nativeContext
@@ -5207,20 +5207,18 @@
 
 !JavaVM class methodsFor:'native - java.lang.reflect'!
 
-_java_lang_reflect_Array_newArray: aJavaContext
-
+_java_lang_reflect_Array_newArray: aJavaContext 
     <javanative: 'java/lang/reflect/Array' name: 'newArray'>
-
-        |componentClass size|
-
+    | componentClass  size |
     componentClass := self reflection 
-                classForJavaClassObject:(aJavaContext argAt:1).
-    size := aJavaContext argAt:2.
-    ^ componentClass arrayClass new:size
+                classForJavaClassObject: (aJavaContext argAt: 1).
+    size := aJavaContext argAt: 2.
+    ^ componentClass arrayClass new: size
 
     "Created: / 17-12-2010 / 14:49:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 19-12-2010 / 17:54:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 28-01-2011 / 15:18:50 / Marcel Hlopko <hlopik@gmail.com>"
+    "Modified: / 04-06-2011 / 17:06:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
 _java_lang_reflect_Array_set: nativeContext
@@ -15045,29 +15043,31 @@
     "Modified: / 03-03-2011 / 23:50:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-javaMethodObjectLikeSlotsInto: jMethod forMethod:method 
-     "
-        Fill in slots of given instance of java.lang.Method or 
-        java.lang.Constructor
-    "
+javaMethodObjectLikeSlotsInto: jMethod forMethod: method 
+    "
+       Fill in slots of given instance of java.lang.Method or
+       java.lang.Constructor"
+    
     | desc |
+
     desc := method descriptor.
-
     jMethod
-        instVarNamed: #clazz            put: (self javaClassObjectForClass: method javaClass);
-        instVarNamed: #slot             put: 0"Ignored";
-        instVarNamed: #modifiers        put: method accessFlags;
-        instVarNamed: #signature        put: (self javaStringObjectForString: method signature interned: true);
-        instVarNamed: #parameterTypes   put: (self javaClassObjectArrayForClasses: desc parameterClasses);
-        instVarNamed: #exceptionTypes   put: (self javaClassObjectArrayForClasses: method exceptionTable);
-        instVarNamed: #annotations      put: (method annotations runtimeVisible bytes);
-
+        instVarNamed: #clazz put: (self javaClassObjectForClass: method javaClass);
+        instVarNamed: #slot put: 0;
+        instVarNamed: #modifiers put: method accessFlags;
+        instVarNamed: #signature
+            put: (self javaStringObjectForString: method signature interned: true);
+        instVarNamed: #parameterTypes
+            put: (self javaClassObjectArrayForClasses: desc parameterClasses);
+        instVarNamed: #exceptionTypes
+            put: (self javaClassObjectArrayForClasses: method javaExceptionTable);
+        instVarNamed: #annotations put: (method annotations runtimeVisible bytes);
         yourself.
-
     ^ jMethod
 
     "Created: / 11-02-2011 / 06:44:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 03-03-2011 / 23:07:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 04-06-2011 / 17:17:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
 methodForJavaConstructorObject:constructor