Many fixes in reflection, expecially for generic types support jk_new_structure
authorvranyj1
Sat, 13 Aug 2011 01:26:52 +0000
branchjk_new_structure
changeset 912 e651488f5741
parent 911 efa922d67283
child 913 1781f130b005
Many fixes in reflection, expecially for generic types support
src/Java.st
src/JavaClass.st
src/JavaClassReader.st
src/JavaClassRef2.st
src/JavaDescriptor.st
src/JavaField.st
src/JavaFieldDescriptor.st
src/JavaMethod.st
src/JavaNativeMethod.st
src/JavaResolver.st
src/JavaVM.st
src/Make.proto
src/abbrev.stc
src/bc.mak
src/extensions.st
src/libjava.rc
--- a/src/Java.st	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/Java.st	Sat Aug 13 01:26:52 2011 +0000
@@ -272,14 +272,15 @@
 
 addToClassPathInRuntime:aPath
 
-    | path file url clc scl |
+    | path file url scl |
     "Java might not be loaded/or initialized, in this case
      there is no no need to inform java about new entry in classpath"
 
     JavaVM booted ifFalse:[^self].
-    (clc := Java at: 'java.lang.ClassLoader') isNil ifTrue:[^self].
-    (scl := clc instVarNamed: #scl) isNil ifTrue:[^self].	
-
+    scl := (Java classForName:'java.lang.ClassLoader') instVarNamed: #scl.
+    scl ifNil:[
+        scl := (Java classForName:'java.lang.ClassLoader') perform: #'getSystemClassLoader()Ljava/lang/ClassLoader;'.
+    ].
     path := Java as_String: aPath asString.        
     file := (Java at:'java.io.File') new perform: #'<init>(Ljava/lang/String;)V' with: path; yourself.
     url := file perform: #'toURL()Ljava/net/URL;'.
--- a/src/JavaClass.st	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/JavaClass.st	Sat Aug 13 01:26:52 2011 +0000
@@ -43,7 +43,7 @@
 
 JavaBehavior subclass:#JavaClass
 	instanceVariableNames:'classLoader fullName sourceFile binaryFilePath fields initValues
-		staticFields annotations protectionDomain'
+		staticFields annotations protectionDomain signatureJ'
 	classVariableNames:'ArgumentConversionErrorSignal OrderOfClassInits'
 	poolDictionaries:''
 	category:'Languages-Java-Classes'
@@ -895,6 +895,22 @@
     "Created: / 25-02-2011 / 16:48:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+setSignature: aSymbol
+
+    signatureJ := aSymbol
+
+    "Created: / 13-08-2011 / 00:30:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+signatureJ
+
+    "stupid naming, but superclass defines signature too"
+
+    ^signatureJ
+
+    "Created: / 13-08-2011 / 00:30:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 source
     ^ Java classSourceOf:self
 
@@ -1991,8 +2007,8 @@
     [ cls ~= JavaObject ] whileTrue: [
         field := cls fields detect: 
                     [:each | 
-                    each name = aJavaNameAndType name 
-                        and: [ each signature = aJavaNameAndType descriptor ]]
+                    each name = aJavaNameAndType name    
+                        "and: [ each signatureWithoutTypeVariables = aJavaNameAndType descriptor ]"]
                     ifNone:[nil].
         field ifNotNil:[^field].
         cls := cls superclass. 
@@ -2001,8 +2017,8 @@
     ^nil
 
     "Created: / 11-04-2011 / 21:27:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-    "Modified: / 22-05-2011 / 16:27:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 04-06-2011 / 17:06:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+    "Modified: / 13-08-2011 / 00:46:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 lookupMethodByNameAndType: aJavaNameAndType 
@@ -2020,7 +2036,7 @@
         field := cls staticFields detect: 
                     [:each | 
                     each name = aJavaNameAndType name 
-                        and: [ each signature = aJavaNameAndType descriptor ]]
+                        "and: [ each signature = aJavaNameAndType descriptor ]"]
                     ifNone:[nil].
         field ifNotNil:[^field].
         cls := cls superclass. 
@@ -2029,8 +2045,8 @@
     ^nil
 
     "Created: / 11-04-2011 / 21:27:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-    "Modified: / 24-05-2011 / 09:39:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 04-06-2011 / 17:06:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+    "Modified: / 13-08-2011 / 00:46:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 lookupStaticMethodByNameAndType: aJavaNameAndType 
--- a/src/JavaClassReader.st	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/JavaClassReader.st	Sat Aug 13 01:26:52 2011 +0000
@@ -1467,8 +1467,17 @@
 !
 
 readSignatureAttributeFor:something
-"/        ('JAVA [info]: unhandled attribute: Signature') infoPrintCR.
-        self skipAttribute:'Signature'.
+
+    |attribute_length signature_index signature|
+
+    attribute_length := inStream nextUnsignedLongMSB:msb.
+
+    signature_index := inStream nextUnsignedShortMSB:msb.
+    signature := constants at:signature_index.
+
+    something setSignature: signature.
+
+    "Modified: / 13-08-2011 / 00:28:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 readSourceDebugExtensionAttributeFor:something
--- a/src/JavaClassRef2.st	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/JavaClassRef2.st	Sat Aug 13 01:26:52 2011 +0000
@@ -221,6 +221,16 @@
                 resolveClassIndentifiedByRef: self.
 
     "Modified: / 08-04-2011 / 17:39:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+!
+
+findResolvedValue: doInit
+    "Resolve reference and set valueCache."
+    
+    valueCache := JavaResolver uniqueInstance 
+                resolveClassIndentifiedByRef: self init: doInit.
+
+    "Modified: / 08-04-2011 / 17:39:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+    "Created: / 12-08-2011 / 22:19:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaClassRef2 methodsFor:'queries'!
@@ -245,6 +255,27 @@
     ^ false.
 
     "Modified: / 23-05-2011 / 15:21:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+!
+
+resolve
+
+    ^self resolve: true
+
+    "Created: / 08-04-2011 / 11:30:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+    "Created: / 12-08-2011 / 22:18:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+resolve: doInit
+    "
+    Resolves a class. If doInit is true, then the class is initialuzed,
+    otherwise not.
+    "
+    
+    self isResolved ifFalse: [ self findResolvedValue: doInit ].
+    ^ valueCache.
+
+    "Created: / 08-04-2011 / 11:30:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+    "Created: / 12-08-2011 / 22:18:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaClassRef2 class methodsFor:'documentation'!
--- a/src/JavaDescriptor.st	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/JavaDescriptor.st	Sat Aug 13 01:26:52 2011 +0000
@@ -116,7 +116,7 @@
 
 readFrom:stream onError:exceptionBlock
 
-    stream peek == $(
+    (stream peek == $( or:[stream peek == $<])
         ifTrue: [^self readMethodDescriptorFrom: stream onError: exceptionBlock]
         ifFalse:[^self readFieldDescriptorFrom:  stream onError: exceptionBlock].
 
@@ -126,10 +126,12 @@
         JavaDescriptor fromString:'[[I'
         JavaDescriptor fromString:'(ILjava/lang/Object;)V'
         JavaDescriptor fromString:'(ILjava/lang/Object;)Ljava/lang/Class;'    
+        JavaDescriptor fromString:'<T:Ljava/lang/Object;>(Ljava/util/Collection<TT;>;I)Ljava/util/Collection<TT;>;'
+
     "
 
     "Created: / 25-11-2010 / 17:50:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 06-02-2011 / 15:08:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 13-08-2011 / 01:37:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaDescriptor class methodsFor:'accessing'!
@@ -266,6 +268,9 @@
 
     | parameterDescriptors returnDescriptor |
 
+    stream peek == $< ifTrue:[
+        self readTypeVariableFrom: stream onError: exceptionBlock
+    ].
     stream next. "eat $("
     parameterDescriptors := OrderedCollection new.
     [ stream peek ~= $) ] whileTrue:[
@@ -285,21 +290,41 @@
     "
 
     "Created: / 25-11-2010 / 18:36:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 21-12-2010 / 22:50:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 13-08-2011 / 01:39:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 readObjectTypeFrom:  stream onError: exceptionBlock
 
-    | clsName |
+    | clsName out |
 
     stream next. "/eat $L.
-    clsName := stream upTo: $;.
+    out := String new writeStream.
+    [ stream peek ~~ $; and:[stream peek ~~ $< ]] whileTrue:[out nextPut: stream next].
+    clsName := out contents.
+    stream peek == $< ifTrue:[
+        self readTypeVariableFrom: stream onError: exceptionBlock
+    ].
+
     "Just a check"
-    stream skip: -1.
     stream next ~= $; ifTrue:[exceptionBlock value].
     ^JavaFieldDescriptor javaClassName: clsName.
 
     "Created: / 25-11-2010 / 18:08:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+readTypeVariableFrom:  stream onError: exceptionBlock
+
+    | nangles |
+
+    stream next. "/eat $<.
+    nangles := 1.
+    [ nangles ~~ 0 ] whileTrue:[
+        stream peek == $< ifTrue:[nangles := nangles + 1].
+        stream peek == $> ifTrue:[nangles := nangles - 1].
+        stream next.
+    ]
+
+    "Created: / 13-08-2011 / 01:39:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaDescriptor class methodsFor:'documentation'!
--- a/src/JavaField.st	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/JavaField.st	Sat Aug 13 01:26:52 2011 +0000
@@ -250,6 +250,16 @@
     ^ signature
 
     "Created: / 15.10.1998 / 10:37:06 / cg"
+!
+
+signatureWithoutTypeVariables
+
+    (signature includes: $<) ifFalse:[^signature].
+
+    ^(signature upTo: $<) , ';'
+
+    "Created: / 15-10-1998 / 10:37:06 / cg"
+    "Created: / 13-08-2011 / 00:42:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaField methodsFor:'printing & storing'!
--- a/src/JavaFieldDescriptor.st	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/JavaFieldDescriptor.st	Sat Aug 13 01:26:52 2011 +0000
@@ -115,14 +115,16 @@
 
 javaClass
 
-    javaClass ifNil:[javaClass := Java classForName: javaClassName].
+    javaClass ifNil:[javaClass := Java classForName: self javaClassName].
     ^javaClass
 
-    "Modified: / 25-11-2010 / 18:10:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 13-08-2011 / 01:24:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 javaClassName
-    ^ javaClassName
+    ^ javaClassName upTo: $<
+
+    "Modified: / 13-08-2011 / 01:24:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 javaClassObject
--- a/src/JavaMethod.st	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/JavaMethod.st	Sat Aug 13 01:26:52 2011 +0000
@@ -146,6 +146,7 @@
     SignatureTypeCodes at:$Z put:#boolean.
     SignatureTypeCodes at:$L put:#object.
     SignatureTypeCodes at:$[ put:#array.
+    SignatureTypeCodes at:$T put:#typevar.
 
     ForceByteCodeDisplay := false.
 
@@ -156,7 +157,8 @@
      ForceByteCodeDisplay := false.
     "
 
-    "Modified: / 16.10.1998 / 01:29:48 / cg"
+    "Modified: / 16-10-1998 / 01:29:48 / cg"
+    "Modified: / 13-08-2011 / 01:02:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 reinitialize
@@ -426,44 +428,63 @@
 fieldTypeFromStream:s in:aPackage
     "parse a fieldTypeSpec - see java doc"
 
-    |typeChar typeSym elType size className nm|
+    |typeChar typeSym elType size className nm out nangles |
 
     typeChar := s next.
 
     typeSym := SignatureTypeCodes at:typeChar ifAbsent:#unknown.
 
     typeSym == #unknown ifTrue:[
-	^ typeSym
+        ^ typeSym
     ].
-    typeSym == #object ifTrue:[
-	className := s upTo:$;.
-	"/ strip off default
-
-	nm := className.
-	aPackage notNil ifTrue:[
-	    (nm startsWith:aPackage) ifTrue:[
-		nm := nm copyFrom:(aPackage size + 2).
-	    ].
-	].
+    (typeSym == #object or: [typeSym == #typevar]) ifTrue:[
+        "Take care about type variables"
+        out := String new writeStream.
+        [ s peek ~~ $; and:[ s peek ~~ $< ] ] whileTrue:[
+            out nextPut: s next.
+        ].
+        className := out contents.
+        "Eat possible type variables"
+        (s peek == $<) ifTrue:[
+            nangles := 1. s next.
+            [  nangles ~~ 0 ] whileTrue:[
+                s peek == $< ifTrue:[nangles := nangles + 1].
+                s peek == $> ifTrue:[nangles := nangles - 1].
+                s next.
+            ]
+        ].
+        s peek ~~ $; ifTrue:[self error: 'Signature corrupted?'].
+        s next. "/eat ;
+
+
+        typeSym == #typevar ifTrue:[^className].
+        "/ strip off default
+        nm := className.
+        aPackage notNil ifTrue:[
+            (nm startsWith:aPackage) ifTrue:[
+                nm := nm copyFrom:(aPackage size + 2).
+            ].
+        ].
         
-	nm := nm copyReplaceAll:$/ with:$..
-	^ nm
+        nm := nm copyReplaceAll:$/ with:$..
+        ^ nm
     ].
 
     typeSym == #array ifTrue:[
-	s peek isDigit ifTrue:[
-	    size := Integer readFrom:s.
-	    elType := self fieldTypeFromStream:s in:aPackage.
-	    ^ elType , '[' , size printString , ']'
-	].
-	elType := self fieldTypeFromStream:s in:aPackage.
-	^ elType , '[]'
+        s peek isDigit ifTrue:[
+            size := Integer readFrom:s.
+            elType := self fieldTypeFromStream:s in:aPackage.
+            ^ elType , '[' , size printString , ']'
+        ].
+        elType := self fieldTypeFromStream:s in:aPackage.
+        ^ elType , '[]'
     ].
 
     ^ typeSym
 
-    "Created: / 18.3.1997 / 11:07:56 / cg"
-    "Modified: / 18.7.1998 / 22:57:06 / cg"
+    "Created: / 18-03-1997 / 11:07:56 / cg"
+    "Modified: / 18-07-1998 / 22:57:06 / cg"
+    "Modified: / 13-08-2011 / 01:05:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 numArgsFromSignature:aSignature
@@ -472,7 +493,8 @@
     |s|
 
     s := aSignature readStream.
-    s next ~~ $( ifTrue:[self halt].
+    (aSignature includes: $() ifFalse:[self error:'Invalid signature'].
+    [s next ~~ $(] whileTrue.
 
     ^ self numArgsFromStream:s.
 
@@ -480,7 +502,10 @@
      JavaMethod numArgsFromSignature:'(LObject;)V'
      JavaMethod numArgsFromSignature:'(BB)S'      
      JavaMethod numArgsFromSignature:'()V'      
+     JavaMethod numArgsFromSignature:'(Ljava/util/ArrayList<*>;)V'
     "
+
+    "Modified (comment): / 13-08-2011 / 00:59:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 numArgsFromStream:s
@@ -1289,9 +1314,42 @@
      localVariableTable := anArray.
 !
 
-setName:nameString signature:signatureString
-    selector := (nameString , signatureString) asSymbol.
-    self setSignature:signatureString
+setName:nameString signature:aString
+
+
+    |numArgs tooManyArgs returnType|
+
+    selector := (nameString , aString) asSymbol.
+    self setSignature:aString.
+
+     numArgs := self class numArgsFromSignature:aString.
+     (tooManyArgs := (numArgs > self class maxNumberOfArguments)) ifTrue:[
+     numArgs := 0.
+     ].
+     self numberOfArgs:numArgs.
+     returnType := self class typeFromSignature:aString in:nil.
+
+     "/ for the convenience of the VM, also mirror the return type in
+     "/ the flags ...
+
+     returnType == #void ifTrue:[
+     accessFlags := accessFlags bitOr:R_VOID
+     ] ifFalse:[
+     returnType == #long ifTrue:[
+     accessFlags := accessFlags bitOr:R_LONG
+     ] ifFalse:[
+     returnType == #double ifTrue:[
+     accessFlags := accessFlags bitOr:R_DOUBLE
+     ]
+     ]
+     ].
+     tooManyArgs ifTrue:[
+     ^ ArgumentError
+     raiseRequestWith:self
+     errorString:'too many args in method'
+    ].
+
+    "Modified: / 13-08-2011 / 01:21:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 setSignature:aString
@@ -1299,36 +1357,9 @@
 
     signature := aString asSymbol.
 
-    numArgs := self class numArgsFromSignature:aString.
-    (tooManyArgs := (numArgs > self class maxNumberOfArguments)) ifTrue:[
-        numArgs := 0.
-    ].
-    self numberOfArgs:numArgs.
-    returnType := self class typeFromSignature:aString in:nil.
-
-    "/ for the convenience of the VM, also mirror the return type in
-    "/ the flags ...
-
-    returnType == #void ifTrue:[
-        accessFlags := accessFlags bitOr:R_VOID
-    ] ifFalse:[
-        returnType == #long ifTrue:[
-            accessFlags := accessFlags bitOr:R_LONG
-        ] ifFalse:[
-            returnType == #double ifTrue:[
-                accessFlags := accessFlags bitOr:R_DOUBLE
-            ]
-        ]
-    ].
-    tooManyArgs ifTrue:[
-        ^ ArgumentError
-            raiseRequestWith:self
-            errorString:'too many args in method'
-    ].
-
     "Created: / 16-04-1996 / 11:34:29 / cg"
     "Modified: / 16-10-1998 / 00:17:12 / cg"
-    "Modified: / 20-10-2010 / 11:29:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 13-08-2011 / 01:21:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 signature
--- a/src/JavaNativeMethod.st	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/JavaNativeMethod.st	Sat Aug 13 01:26:52 2011 +0000
@@ -252,7 +252,7 @@
     "
 
     | nm newStyleSel oldStyleSel |
-    nm := selector copyWithoutLast:signature size.
+    nm := selector upTo: $(.
     newStyleSel := ('_' , ((javaClass name copyReplaceAll:$/ with:$_) replaceAll:$$ with:$_), '_' , nm , ':') asSymbol.    
     (JavaVM class canUnderstand: newStyleSel) ifTrue:
         ["Good, a JavaVM understands new style native selectors"
@@ -275,7 +275,7 @@
     ^newStyleSel
 
     "Created: / 30-04-2011 / 23:50:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 01-05-2011 / 13:13:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 13-08-2011 / 01:08:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaNativeMethod methodsFor:'vm support'!
--- a/src/JavaResolver.st	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/JavaResolver.st	Sat Aug 13 01:26:52 2011 +0000
@@ -136,7 +136,7 @@
     "Created: / 23-05-2011 / 21:12:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-resolveClassIndentifiedByRef: aJavaClassRef 
+resolveClassIndentifiedByRef: aJavaClassRef init: doInit 
     | classLoader  result |
 
     self validateClassRef: aJavaClassRef.
@@ -168,7 +168,7 @@
     result isJavaPrimitiveType ifTrue: [ 
         ^ self checkIfPrimitiveArrayRef: aJavaClassRef andWrap: result 
     ].
-    result classInit.
+    doInit ifTrue:[result classInit].
      "
      If C is an array class and its element type is a reference type, then the symbolic reference
      to the class or interface representing the element type is resolved by invoking the algorithm
@@ -190,7 +190,7 @@
 
     "Created: / 11-04-2011 / 19:07:19 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
     "Modified: / 23-05-2011 / 21:11:32 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-    "Modified: / 10-08-2011 / 23:53:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 12-08-2011 / 22:19:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaResolver methodsFor:'class resolving helpers'!
--- a/src/JavaVM.st	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/JavaVM.st	Sat Aug 13 01:26:52 2011 +0000
@@ -2225,6 +2225,9 @@
 exceptionDebugPatterns
 
     ^ ExceptionDebugPatterns
+    "
+    ExceptionDebugPatterns add: 'java/lang/ArrayIndex*'
+    "
 
     "Created: / 25-02-2011 / 08:08:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
@@ -3260,7 +3263,7 @@
 !
 
 throwNullPointerException
-    NullPointerExceptionDebug := true ifTrue:[
+    NullPointerExceptionDebug == true ifTrue:[
         self halt:'Null Pointer exception'.
     ].
 
@@ -3270,7 +3273,7 @@
 
     "Created: / 09-01-1998 / 02:26:08 / cg"
     "Modified: / 28-01-1998 / 02:30:09 / cg"
-    "Modified: / 11-08-2011 / 23:13:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 13-08-2011 / 01:10:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 throwNumberFormatException 
@@ -4586,6 +4589,38 @@
     "Created: / 10-12-2010 / 15:11:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+_java_lang_ClassLoader_defineClass1: nativeContext
+
+    <javanative: 'java/lang/ClassLoader' name: 'defineClass1'>
+    "
+    private native Class defineClass1(String name, byte[] b, int off, int len,
+                                      ProtectionDomain pd, String source);
+    "
+    | name b off len pd source bs cls |
+    name :=  Java as_ST_String: (nativeContext argAt:1).
+    b := nativeContext argAt:2.
+    off := nativeContext argAt:3.
+    len := nativeContext argAt:4.
+    pd := nativeContext argAt:5.
+    source := Java as_ST_String: (nativeContext argAt:6).
+
+    bs := (off = 0 and: [len = b size]) 
+            ifTrue:[b readStream]
+            ifFalse:[(b copyFrom: off + 1 to: off + len) readStream].
+    [
+        cls := JavaClassReader readStream: bs.
+    ] on: JavaClassReader invalidClassFormatSignal do:[
+        self throwClassFormatError.
+        ^self.
+    ].
+    cls classLoader: nativeContext receiver.
+    "FIXME: What to do with source?"
+
+    ^self reflection javaClassObjectForClass: cls.
+
+    "Modified: / 08-08-2011 / 17:57:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 _java_lang_ClassLoader_findBootstrapClass: nativeContext
 
     <javanative: 'java/lang/ClassLoader' name: 'findBootstrapClass'>
@@ -4786,6 +4821,36 @@
     "Modified: / 04-06-2011 / 17:07:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
+_java_lang_Class_getDeclaringClass: nativeContext
+
+    <javanative: 'java/lang/Class' name: 'getDeclaringClass'>
+    "
+     /**
+     * If the class or interface represented by this {@code Class} object
+     * is a member of another class, returns the {@code Class} object
+     * representing the class in which it was declared.  This method returns
+     * null if this class or interface is not a member of any other class.  If
+     * this {@code Class} object represents an array class, a primitive
+     * type, or void,then this method returns null.
+     *
+     * @return the declaring class for this class
+     * @since JDK1.1
+     */
+    "
+
+    | cls enclosingClsName enclosingCls |
+
+    cls := self reflection classForJavaClassObject:(nativeContext receiver).
+    (cls isJavaPrimitiveType or:[cls isJavaArrayClass]) ifTrue:[^nil].
+    (cls name includes: $$) ifFalse:[^nil].
+    enclosingClsName := cls name copyTo: (cls name lastIndexOf: $$) - 1.
+    enclosingCls := Java classForName: enclosingClsName.
+    enclosingCls isNil ifTrue:[self error:'Cannot fins declaring class'].
+    ^self reflection javaClassObjectForClass: enclosingCls
+
+    "Modified: / 13-08-2011 / 02:01:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 _java_lang_Class_getEnclosingMethod0: nativeContext
 
     <javanative: 'java/lang/Class' name: 'getEnclosingMethod0'>
@@ -4793,13 +4858,31 @@
     ^ UnimplementedNativeMethodSignal raise
 !
 
+_java_lang_Class_getGenericSignature: nativeContext
+
+    <javanative: 'java/lang/Class' name: 'getGenericSignature'>
+
+    |cls sig |
+
+    cls := self reflection classForJavaClassObject:(nativeContext receiver).
+    (cls isJavaPrimitiveType or:[cls isJavaArrayClass]) ifTrue:[^nil].
+    sig := cls signatureJ.
+    ^sig notNil ifTrue:[
+        Java as_String: sig
+    ] ifFalse:[
+        nil
+    ]
+
+    "Modified: / 13-08-2011 / 02:19:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 _java_lang_Class_getInterfaces:nativeContext 
     <javanative: 'java/lang/Class' name: 'getInterfaces'>
     |jClass cls interfaces jInterfaces|
 
     jClass := nativeContext receiver.
     cls := self reflection classForJavaClassObject:jClass.
-    cls isJavaPrimitiveType 
+    (cls isJavaPrimitiveType or:[cls isJavaArrayClass])
         ifTrue:[ ^ (self classForName:'java.lang.Class') javaArrayClass new ].
     interfaces := cls interfaces.
     interfaces 
@@ -4811,18 +4894,25 @@
     ^ jInterfaces
 
     "Modified: / 28-01-2011 / 15:19:11 / Marcel Hlopko <hlopik@gmail.com>"
-    "Modified: / 04-02-2011 / 09:43:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-08-2011 / 22:27:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 _java_lang_Class_getModifiers: aJavaContext
 
     <javanative: 'java/lang/Class' name: 'getModifiers'>
 
-        ^ (self reflection classForJavaClassObject:aJavaContext receiver) accessFlags
+    | cls |
+
+    cls := (self reflection classForJavaClassObject:aJavaContext receiver).
+    ^(cls isJavaPrimitiveType or:[cls isJavaArrayClass]) ifTrue:[
+        1041"FIXME: make it symbolic"
+    ] ifFalse:[
+        cls accessFlags
+    ]
 
     "Created: / 12-11-1998 / 18:54:53 / cg"
-    "Modified: / 26-11-2010 / 10:25:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 28-01-2011 / 15:19:14 / Marcel Hlopko <hlopik@gmail.com>"
+    "Modified: / 12-08-2011 / 22:34:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 _java_lang_Class_getName0: aJavaContext
@@ -4895,6 +4985,9 @@
 
     jClass := nativeContext receiver.
     cls := self reflection classForJavaClassObject:jClass.
+    cls isJavaPrimitiveType ifTrue:[^nil].
+    cls isJavaArrayClass ifTrue:[^self javaClassObjectForClass:(Java at:'java.lang.Object')].
+
     superCls := cls superclass.
     superCls == JavaObject ifTrue:[
         ^ nil.
@@ -4904,7 +4997,7 @@
     "Created: / 12-01-1998 / 12:38:36 / cg"
     "Modified: / 04-02-1998 / 14:51:22 / cg"
     "Modified: / 28-01-2011 / 14:12:47 / Marcel Hlopko <hlopik@gmail.com>"
-    "Modified: / 03-02-2011 / 22:53:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-08-2011 / 22:41:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 _java_lang_Class_isArray: nativeContext
@@ -14611,18 +14704,20 @@
     aJavaClassRef isJavaRef 
         ifTrue: [ class := aJavaClassRef resolve ]
         ifFalse: [ self halt: 'I expected classRefs only - maybe I was wrong' ].
-    "(object isNil or: [ (self canCast: object class to: class) not ]) 
+    (object isNil or: [ (self canCast: object class to: class) not ]) 
         ifTrue: 
             [ self throwClassCastException.
-            ^ false ]."
-
+            ^ false ].
+    "
     (self canCast: object class to: class) not
         ifTrue: 
             [ self throwClassCastException.
             ^ false ].
+    "
     ^ true.
 
     "Created: / 19-05-2011 / 10:12:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+    "Modified: / 13-08-2011 / 01:33:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 _CHECKCAST:object _: classOrClassRef
--- a/src/Make.proto	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/Make.proto	Sat Aug 13 01:26:52 2011 +0000
@@ -217,7 +217,7 @@
 $(OUTDIR)JavaVoidTypeNode.$(O) JavaVoidTypeNode.$(H): JavaVoidTypeNode.st $(INCLUDE_TOP)/stx/libjava/JavaTypeNode.$(H) $(INCLUDE_TOP)/stx/libjava/JavaNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)JavaInterfaceMethodRef2.$(O) JavaInterfaceMethodRef2.$(H): JavaInterfaceMethodRef2.st $(INCLUDE_TOP)/stx/libjava/JavaMethodRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaClassContentRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)JavaNativeMethod.$(O) JavaNativeMethod.$(H): JavaNativeMethod.st $(INCLUDE_TOP)/stx/libjava/JavaMethodWithHandler.$(H) $(INCLUDE_TOP)/stx/libjava/JavaMethodWithException.$(H) $(INCLUDE_TOP)/stx/libjava/JavaMethod.$(H) $(INCLUDE_TOP)/stx/libbasic/CompiledCode.$(H) $(INCLUDE_TOP)/stx/libbasic/ExecutableFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/libbasic2/BooleanArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/BitArray.$(H) $(INCLUDE_TOP)/stx/libbasic/ArrayedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ByteArray.$(H) $(INCLUDE_TOP)/stx/libbasic/UninterpretedBytes.$(H) $(INCLUDE_TOP)/stx/libbasic/DoubleArray.$(H) $(INCLUDE_TOP)/stx/libbasic/FloatArray.$(H) $(INCLUDE_TOP)/stx/libbasic/String.$(H) $(INCLUDE_TOP)/stx/libbasic/CharacterArray.$(H) $(INCLUDE_TOP)/stx/libbasic/UserPreferences.$(H) $(INCLUDE_TOP)/stx/libbasic/IdentityDictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(INCLUDE_TOP)/stx/libbasic2/ZipArchive.$(H) $(INCLUDE_TOP)/stx/libbasic/Boolean.$(H) $(INCLUDE_TOP)/stx/libbasic/Character.$(H) $(INCLUDE_TOP)/stx/libbasic/Magnitude.$(H) $(INCLUDE_TOP)/stx/libbasic/Float.$(H) $(INCLUDE_TOP)/stx/libbasic/LimitedPrecisionReal.$(H) $(INCLUDE_TOP)/stx/libbasic/Number.$(H) $(INCLUDE_TOP)/stx/libbasic/ArithmeticValue.$(H) $(INCLUDE_TOP)/stx/libwidg/GenericToolbarIconLibrary.$(H) $(INCLUDE_TOP)/stx/libbasic/Integer.$(H) $(INCLUDE_TOP)/stx/libbasic/LargeInteger.$(H) $(INCLUDE_TOP)/stx/libbasic/ShortFloat.$(H) $(INCLUDE_TOP)/stx/libbasic2/SignedIntegerArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/UnboxedIntegerArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/SignedLongIntegerArray.$(H) $(INCLUDE_TOP)/stx/libbasic/UndefinedObject.$(H) $(INCLUDE_TOP)/stx/libbasic2/WordArray.$(H) $(STCHDR)
+$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/libbasic2/BooleanArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/BitArray.$(H) $(INCLUDE_TOP)/stx/libbasic/ArrayedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/String.$(H) $(INCLUDE_TOP)/stx/libbasic/CharacterArray.$(H) $(INCLUDE_TOP)/stx/libbasic/ByteArray.$(H) $(INCLUDE_TOP)/stx/libbasic/UninterpretedBytes.$(H) $(INCLUDE_TOP)/stx/libbasic/UserPreferences.$(H) $(INCLUDE_TOP)/stx/libbasic/IdentityDictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(INCLUDE_TOP)/stx/libbasic2/ZipArchive.$(H) $(INCLUDE_TOP)/stx/libbasic/Boolean.$(H) $(INCLUDE_TOP)/stx/libbasic/Character.$(H) $(INCLUDE_TOP)/stx/libbasic/Magnitude.$(H) $(INCLUDE_TOP)/stx/libbasic/DoubleArray.$(H) $(INCLUDE_TOP)/stx/libbasic/Float.$(H) $(INCLUDE_TOP)/stx/libbasic/LimitedPrecisionReal.$(H) $(INCLUDE_TOP)/stx/libbasic/Number.$(H) $(INCLUDE_TOP)/stx/libbasic/ArithmeticValue.$(H) $(INCLUDE_TOP)/stx/libbasic/FloatArray.$(H) $(INCLUDE_TOP)/stx/libwidg/GenericToolbarIconLibrary.$(H) $(INCLUDE_TOP)/stx/libbasic/Integer.$(H) $(INCLUDE_TOP)/stx/libbasic/LargeInteger.$(H) $(INCLUDE_TOP)/stx/libbasic/ShortFloat.$(H) $(INCLUDE_TOP)/stx/libbasic2/SignedIntegerArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/UnboxedIntegerArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/SignedLongIntegerArray.$(H) $(INCLUDE_TOP)/stx/libbasic/UndefinedObject.$(H) $(INCLUDE_TOP)/stx/libbasic2/WordArray.$(H) $(STCHDR)
 
 # ENDMAKEDEPEND --- do not remove this line
 
--- a/src/abbrev.stc	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/abbrev.stc	Sat Aug 13 01:26:52 2011 +0000
@@ -1,5 +1,6 @@
 AbstractJavaTestCase AbstractJavaTestCase stx:libjava 'Languages-Java-Tests-RuntimeConstantPool' 4
 Byte Byte stx:libjava 'Magnitude-Numbers' 0
+JUnitTestCaseProxy JUnitTestCaseProxy stx:libjava 'Languages-Java-Tests-Proxies' 6
 Java Java stx:libjava 'Languages-Java-Support' 0
 JavaAnnotation JavaAnnotation stx:libjava 'Languages-Java-Reader-Support' 0
 JavaAnnotationContainer JavaAnnotationContainer stx:libjava 'Languages-Java-Annotations' 1
@@ -77,7 +78,6 @@
 SmalltalkAppletStub SmalltalkAppletStub stx:libjava 'Languages-Java-Views-Support' 0
 TestletTestCaseProxy TestletTestCaseProxy stx:libjava 'Languages-Java-Tests-Proxies' 6
 stx_libjava stx_libjava stx:libjava '* Projects & Packages *' 3
-JUnitTestCaseProxy JUnitTestCaseProxy stx:libjava 'Languages-Java-Tests-Proxies' 6
 JavaAnnotationArrayValue JavaAnnotationArrayValue stx:libjava 'Languages-Java-Reader-Support' 0
 JavaAnnotationClassValue JavaAnnotationClassValue stx:libjava 'Languages-Java-Reader-Support' 0
 JavaAnnotationEnumValue JavaAnnotationEnumValue stx:libjava 'Languages-Java-Reader-Support' 0
--- a/src/bc.mak	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/bc.mak	Sat Aug 13 01:26:52 2011 +0000
@@ -164,6 +164,6 @@
 $(OUTDIR)JavaVoidTypeNode.$(O) JavaVoidTypeNode.$(H): JavaVoidTypeNode.st $(INCLUDE_TOP)\stx\libjava\JavaTypeNode.$(H) $(INCLUDE_TOP)\stx\libjava\JavaNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)JavaInterfaceMethodRef2.$(O) JavaInterfaceMethodRef2.$(H): JavaInterfaceMethodRef2.st $(INCLUDE_TOP)\stx\libjava\JavaMethodRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaClassContentRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)JavaNativeMethod.$(O) JavaNativeMethod.$(H): JavaNativeMethod.st $(INCLUDE_TOP)\stx\libjava\JavaMethodWithHandler.$(H) $(INCLUDE_TOP)\stx\libjava\JavaMethodWithException.$(H) $(INCLUDE_TOP)\stx\libjava\JavaMethod.$(H) $(INCLUDE_TOP)\stx\libbasic\CompiledCode.$(H) $(INCLUDE_TOP)\stx\libbasic\ExecutableFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\libbasic2\BooleanArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\BitArray.$(H) $(INCLUDE_TOP)\stx\libbasic\ArrayedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ByteArray.$(H) $(INCLUDE_TOP)\stx\libbasic\UninterpretedBytes.$(H) $(INCLUDE_TOP)\stx\libbasic\DoubleArray.$(H) $(INCLUDE_TOP)\stx\libbasic\FloatArray.$(H) $(INCLUDE_TOP)\stx\libbasic\String.$(H) $(INCLUDE_TOP)\stx\libbasic\CharacterArray.$(H) $(INCLUDE_TOP)\stx\libbasic\UserPreferences.$(H) $(INCLUDE_TOP)\stx\libbasic\IdentityDictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(INCLUDE_TOP)\stx\libbasic2\ZipArchive.$(H) $(INCLUDE_TOP)\stx\libbasic\Boolean.$(H) $(INCLUDE_TOP)\stx\libbasic\Character.$(H) $(INCLUDE_TOP)\stx\libbasic\Magnitude.$(H) $(INCLUDE_TOP)\stx\libbasic\Float.$(H) $(INCLUDE_TOP)\stx\libbasic\LimitedPrecisionReal.$(H) $(INCLUDE_TOP)\stx\libbasic\Number.$(H) $(INCLUDE_TOP)\stx\libbasic\ArithmeticValue.$(H) $(INCLUDE_TOP)\stx\libwidg\GenericToolbarIconLibrary.$(H) $(INCLUDE_TOP)\stx\libbasic\Integer.$(H) $(INCLUDE_TOP)\stx\libbasic\LargeInteger.$(H) $(INCLUDE_TOP)\stx\libbasic\ShortFloat.$(H) $(INCLUDE_TOP)\stx\libbasic2\SignedIntegerArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\UnboxedIntegerArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\SignedLongIntegerArray.$(H) $(INCLUDE_TOP)\stx\libbasic\UndefinedObject.$(H) $(INCLUDE_TOP)\stx\libbasic2\WordArray.$(H) $(STCHDR)
+$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\libbasic2\BooleanArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\BitArray.$(H) $(INCLUDE_TOP)\stx\libbasic\ArrayedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\String.$(H) $(INCLUDE_TOP)\stx\libbasic\CharacterArray.$(H) $(INCLUDE_TOP)\stx\libbasic\ByteArray.$(H) $(INCLUDE_TOP)\stx\libbasic\UninterpretedBytes.$(H) $(INCLUDE_TOP)\stx\libbasic\UserPreferences.$(H) $(INCLUDE_TOP)\stx\libbasic\IdentityDictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(INCLUDE_TOP)\stx\libbasic2\ZipArchive.$(H) $(INCLUDE_TOP)\stx\libbasic\Boolean.$(H) $(INCLUDE_TOP)\stx\libbasic\Character.$(H) $(INCLUDE_TOP)\stx\libbasic\Magnitude.$(H) $(INCLUDE_TOP)\stx\libbasic\DoubleArray.$(H) $(INCLUDE_TOP)\stx\libbasic\Float.$(H) $(INCLUDE_TOP)\stx\libbasic\LimitedPrecisionReal.$(H) $(INCLUDE_TOP)\stx\libbasic\Number.$(H) $(INCLUDE_TOP)\stx\libbasic\ArithmeticValue.$(H) $(INCLUDE_TOP)\stx\libbasic\FloatArray.$(H) $(INCLUDE_TOP)\stx\libwidg\GenericToolbarIconLibrary.$(H) $(INCLUDE_TOP)\stx\libbasic\Integer.$(H) $(INCLUDE_TOP)\stx\libbasic\LargeInteger.$(H) $(INCLUDE_TOP)\stx\libbasic\ShortFloat.$(H) $(INCLUDE_TOP)\stx\libbasic2\SignedIntegerArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\UnboxedIntegerArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\SignedLongIntegerArray.$(H) $(INCLUDE_TOP)\stx\libbasic\UndefinedObject.$(H) $(INCLUDE_TOP)\stx\libbasic2\WordArray.$(H) $(STCHDR)
 
 # ENDMAKEDEPEND --- do not remove this line
--- a/src/extensions.st	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/extensions.st	Sat Aug 13 01:26:52 2011 +0000
@@ -10,38 +10,6 @@
 
     "Created: / 31-05-2011 / 16:07:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
-!BooleanArray methodsFor:'queries'!
-
-isJavaArrayClass
-
-    ^true
-
-    "Created: / 20-12-2010 / 22:47:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-!ByteArray methodsFor:'queries'!
-
-isJavaArrayClass
-
-    ^true
-
-    "Created: / 20-12-2010 / 22:47:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-!DoubleArray methodsFor:'queries'!
-
-isJavaArrayClass
-
-    ^true
-
-    "Created: / 20-12-2010 / 22:47:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-!FloatArray methodsFor:'queries'!
-
-isJavaArrayClass
-
-    ^true
-
-    "Created: / 20-12-2010 / 22:47:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
 !Object methodsFor:'testing'!
 
 isJavaArray
@@ -211,6 +179,14 @@
 ! !
 !BooleanArray class methodsFor:'queries'!
 
+isJavaArrayClass
+
+    ^true
+
+    "Created: / 20-12-2010 / 22:47:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+!BooleanArray class methodsFor:'queries'!
+
 isJavaReferenceType
 
     "Java arrays are reference types"
@@ -466,6 +442,14 @@
 ! !
 !DoubleArray class methodsFor:'queries'!
 
+isJavaArrayClass
+
+    ^true
+
+    "Created: / 20-12-2010 / 22:47:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+!DoubleArray class methodsFor:'queries'!
+
 isJavaReferenceType
 
     "Java arrays are reference types"
@@ -531,6 +515,14 @@
 ! !
 !FloatArray class methodsFor:'queries'!
 
+isJavaArrayClass
+
+    ^true
+
+    "Created: / 20-12-2010 / 22:47:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+!FloatArray class methodsFor:'queries'!
+
 isJavaReferenceType
 
     "Java arrays are reference types"
--- a/src/libjava.rc	Fri Aug 12 20:50:02 2011 +0000
+++ b/src/libjava.rc	Sat Aug 13 01:26:52 2011 +0000
@@ -23,7 +23,7 @@
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\nCopyright Jan Vrany, Jan Kurs and Marcel Hlopko\b          SWING Research Group, Czech Technical University In Prague\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.1.1\0"
-      VALUE "ProductDate", "Fri, 12 Aug 2011 20:34:22 GMT\0"
+      VALUE "ProductDate", "Sat, 13 Aug 2011 01:23:36 GMT\0"
     END
 
   END