--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/JavaAlienMirror.st Fri May 24 17:51:53 2013 +0100
@@ -0,0 +1,277 @@
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+"
+"{ Package: 'stx:libjava' }"
+
+JavaMirror subclass:#JavaAlienMirror
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:'JavaVMData'
+ category:'Languages-Java-Classes'
+!
+
+!JavaAlienMirror class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+
+"
+!
+
+documentation
+"
+ Specialized mirror for Smalltalk (and all other
+ non-Java classes)
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+! !
+
+!JavaAlienMirror methodsFor:'accessing'!
+
+getClassLoader
+ "Returns a class loader that loaded this class"
+
+ ^ (JavaVM classForName:'stx.libjava.ClassLoader' definedBy: nil) instVarNamed: #scl.
+
+ "Modified: / 18-05-2013 / 10:57:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredConstructors:publicOnly
+ "Returns an java.lang.reflect.Constructor[] with all constructors
+ declared by this class"
+
+ "Here, return onlu default constructor. Later, all methods annotated
+ with <jsignature: #'<init>(...)V'> wil be returned as well"
+
+ | ctors |
+
+ ctors := OrderedCollection new.
+ klass selectorsAndMethodsDo:[:sel :mthd|
+ (self isJavaConstructor: mthd selector: sel) ifTrue:[
+ ctors add: (self getDeclaredConstructorFor: mthd).
+ ].
+ ].
+
+ ctors isEmpty ifTrue:[
+ "/If no constructor is found, fake default one...
+ ctors add: (self getDeclaredConstructorFor: (klass lookupMethodFor: #initialize)).
+ ].
+
+ ^java_lang_reflect_Constructor javaArrayClass withAll: ctors
+
+ "Modified: / 18-05-2013 / 10:57:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredFields:publicOnly
+ "Returns an java.lang.reflect.Field[] with all constructors
+ declared by this class."
+
+ | fields |
+
+ fields := OrderedCollection new.
+
+ klass instVarNames withIndexDo:[:nm :index|
+ | field |
+
+ field := JavaField new.
+ field
+ setAccessFlags: JavaConstants ACC_PROTECTED;
+ setClass: klass;
+ setIndex: klass superclass instSize + index;
+ setDescriptor: #'Ljava/lang/Object;';
+ setName: nm.
+
+ fields add: (self createFieldFor: field)
+ ].
+
+ ^ java_lang_reflect_Field javaArrayClass
+ withAll:fields
+
+ "Modified: / 18-05-2013 / 10:57:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredMethods:publicOnly
+ "Returns an java.lang.reflect.Method[] with all methods
+ declared by this class"
+
+ | methods |
+
+ methods := OrderedCollection new.
+ klass selectorsAndMethodsDo:[:sel :mthd|
+ (self isJavaMethod: mthd selector: sel) ifTrue:[
+ methods add: (self getDeclaredMethodFor: mthd).
+ ].
+ ].
+ ^java_lang_reflect_Method javaArrayClass withAll: methods
+
+ "Modified: / 18-05-2013 / 10:57:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getInterfaces
+ "Return a list if interfaces"
+
+ ^ Array with: (JavaVM classForName: 'java.lang.Cloneable' definedBy: nil)
+
+ "Modified: / 18-05-2013 / 10:57:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getModifiers
+ "Return class modifiers (public/abstract/final...)"
+
+ ^ JavaConstants ACC_PUBLIC
+
+ "Modified: / 22-08-2012 / 11:01:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getName
+ "Returns name of the class"
+ ^'SMALLTALK.' , klass name
+
+ "Created: / 22-08-2012 / 10:47:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaAlienMirror methodsFor:'accessing-private'!
+
+getDeclaredConstructorFor: method
+ ^ self
+ createConstructorFor: klass
+ method: method
+ signature: (self getSignatureForConstructor: method)
+ modifiers: JavaConstants ACC_PUBLIC
+ parameterTyoes: #()
+ exceptionTypes: #()
+ annotations: JavaMethodAnnotationContainer new
+
+ "Created: / 22-08-2012 / 11:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredMethodFor:method
+ | signature name |
+
+ signature := self getSignatureForMethod: method short: false.
+ name := signature upTo: $(.
+ ^ self
+ createMethodFor: klass
+ method: method
+ name: name
+ signature: signature
+ modifiers: JavaConstants ACC_PUBLIC
+ parameterTyoes: ((1 to: method selector numArgs)collect:[:i|java_lang_Object])
+ returnType: java_lang_Object
+ exceptionTypes: #()
+ annotations: JavaMethodAnnotationContainer new
+
+ "Created: / 22-08-2012 / 11:36:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getSignatureForConstructor: method
+ | signature |
+
+ signature :=
+ (String streamContents:[:s|
+ s nextPutAll: '<init>('.
+ method selector numArgs timesRepeat:[
+ s nextPutAll:'Ljava/lang/Object;'.
+ ].
+ s nextPutAll: ')V'.
+ ]) asSymbol.
+ ^signature
+
+ "Created: / 22-08-2012 / 11:40:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getSignatureForMethod: method short: short
+ | selector signature |
+
+ selector := method selector.
+ signature :=
+ (String streamContents:[:s|
+ short ifTrue:[
+ s nextPutAll: (selector upTo: $:)
+ ] ifFalse:[
+ selector numArgs == 1 ifTrue:[
+ s nextPutAll: (selector copyTo: selector size - 1)
+ ] ifFalse:[
+ s nextPutAll: (selector copyReplaceAll: $: with: $_)
+ ]
+ ].
+ s nextPut: $(.
+ method selector numArgs timesRepeat:[
+ s nextPutAll:'Ljava/lang/Object;'.
+ ].
+ s nextPutAll: ')'.
+ s nextPutAll:'Ljava/lang/Object;'.
+ ]) asSymbol.
+ ^signature
+
+ "Created: / 22-08-2012 / 11:46:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaAlienMirror methodsFor:'testing-private'!
+
+isJavaConstructor: mthd selector: sel
+
+ ^sel startsWith: #initialize
+
+ "Created: / 22-08-2012 / 11:47:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+isJavaMethod: mthd selector: sel
+
+ ^sel isBinarySelector not
+ and:[(self isJavaConstructor: mthd selector: sel) not]
+
+ "Created: / 22-08-2012 / 11:47:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaAlienMirror class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/JavaArrayMirror.st Fri May 24 17:51:53 2013 +0100
@@ -0,0 +1,117 @@
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+"
+"{ Package: 'stx:libjava' }"
+
+JavaMirror subclass:#JavaArrayMirror
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:'JavaVMData'
+ category:'Languages-Java-Classes'
+!
+
+!JavaArrayMirror class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+
+"
+! !
+
+!JavaArrayMirror methodsFor:'accessing'!
+
+getClassLoader
+ "Returns a class loader that loaded this class"
+
+ ^ klass javaComponentClass javaMirror getClassLoader
+
+ "Modified: / 31-07-2012 / 18:35:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredConstructors:publicOnly
+ "Returns an java.lang.reflect.Constructor[] with all constructors
+ declared by this class"
+
+ ^ java_lang_reflect_Constructor javaArrayClass new:0.
+
+ "Modified: / 18-05-2013 / 10:57:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredFields:publicOnly
+ "Returns an java.lang.reflect.Field[] with all constructors
+ declared by this class."
+
+ ^java_lang_reflect_Field javaArrayClass new:0.
+
+ "Modified: / 18-05-2013 / 10:57:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredMethods:publicOnly
+ "Returns an java.lang.reflect.Method[] with all methods
+ declared by this class"
+
+ ^ java_lang_reflect_Method javaArrayClass new:0.
+
+ "Modified: / 18-05-2013 / 10:57:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getInterfaces
+ "Return a list if interfaces"
+
+ ^ Array
+ with: (JavaVM classForName: 'java.lang.Cloneable' definedBy: nil)
+ with: (JavaVM classForName: 'java.io.Serializable' definedBy: nil)
+
+ "Modified: / 18-05-2013 / 10:57:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getModifiers
+ "Return class modifiers (public/abstract/final...)"
+
+ ^ JavaConstants ACC_ABSTRACT | JavaConstants ACC_FINAL | JavaConstants ACC_PUBLIC
+
+ "Modified: / 22-08-2012 / 11:02:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaArrayMirror class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- a/JavaClass.st Thu May 23 23:33:06 2013 +0100
+++ b/JavaClass.st Fri May 24 17:51:53 2013 +0100
@@ -2364,6 +2364,12 @@
"Created: / 07-08-2011 / 15:50:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+isBuiltInClass
+ ^JavaVM builtInClassNames includes: name
+
+ "Created: / 22-05-2013 / 20:38:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
isFullyResolved
constantPool do: [:each | (each isJavaRef and: [each isResolved not]) ifTrue: [^false]].
^ true.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/JavaClassMirror.st Fri May 24 17:51:53 2013 +0100
@@ -0,0 +1,212 @@
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+"
+"{ Package: 'stx:libjava' }"
+
+JavaMirror subclass:#JavaClassMirror
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:'JavaVMData'
+ category:'Languages-Java-Classes'
+!
+
+!JavaClassMirror class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+
+"
+!
+
+documentation
+"
+ A specialized mirror for all Java classes
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+! !
+
+!JavaClassMirror methodsFor:'accessing'!
+
+getClassLoader
+ "Returns a class loader that loaded this class"
+
+ ^ klass classLoader
+
+ "Modified: / 31-07-2012 / 18:26:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredConstructors:publicOnly
+ "Returns an java.lang.reflect.Constructor[] with all constructors
+ declared by this class"
+
+ | ctors |
+
+ ctors := OrderedCollection new.
+ klass selectorsAndMethodsDo:[:sel :mthd|
+ (mthd isJavaConstructor and:[publicOnly not or:[mthd isPublic]]) ifTrue:[
+ ctors add: (self getDeclaredConstructorFor: mthd).
+ ].
+ ].
+ ^java_lang_reflect_Constructor javaArrayClass withAll: ctors
+
+ "Modified: / 18-05-2013 / 10:56:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredFields:publicOnly
+ "Returns an java.lang.reflect.Field[] with all constructors
+ declared by this class."
+
+ | fields |
+
+ fields := klass fields , klass staticFields.
+ publicOnly ifTrue:[ fields := fields select:[:f | f isPublic ] ].
+ JavaClassReader classLoaderQuerySignal answer: klass classLoader do:[
+ fields := fields collect:[:f | self createFieldFor:f ].
+ ].
+ ^ java_lang_reflect_Field javaArrayClass
+ withAll:fields
+
+ "Modified: / 18-05-2013 / 10:57:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredMethods:publicOnly
+ "Returns an java.lang.reflect.Constructor[] with all constructors
+ declared by this class"
+
+ | methods |
+
+ methods := OrderedCollection new.
+ klass selectorsAndMethodsDo:[:sel :mthd|
+ mthd isJavaMethod and:[
+ (mthd isJavaConstructor not
+ and:[mthd isJavaStaticInitializer not
+ and:[publicOnly not or:[mthd isPublic]]]) ifTrue:[
+ methods add: (self getDeclaredMethodFor: mthd).
+ ]
+ ].
+ ].
+ ^java_lang_reflect_Method javaArrayClass withAll: methods
+
+ "Modified: / 18-05-2013 / 10:57:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getGenericSignature
+ "Returns Java generic signature (if a generic class) or nil"
+
+ ^klass signatureJ
+
+ "Created: / 22-08-2012 / 11:58:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getInterfaces
+ "Return a list if interfaces"
+
+ ^ klass interfaces
+
+ "Modified: / 22-08-2012 / 11:08:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getModifiers
+ "Return class modifiers (public/abstract/final...)"
+
+ | modifiers |
+
+ "According to OpenJDK JVM, strip ACC_SUPER"
+ modifiers := (klass accessFlags & JavaConstants ACC_SUPER bitInvert) & 16r7FFF.
+ "JV@2011-10-30: It seems that private inner classes has no
+ private bit set, sigh"
+ (modifiers & 16r0007) == 0 ifTrue:[
+ modifiers := modifiers | JavaConstants ACC_PRIVATE.
+ ].
+ ^modifiers
+
+ "Modified: / 22-08-2012 / 11:03:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getProtectionDomain
+ ^klass protectionDomain
+
+ "Created: / 22-08-2012 / 12:56:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaClassMirror methodsFor:'accessing-private'!
+
+getDeclaredConstructorFor: method
+
+ ^self createConstructorFor: method javaClass
+ method: method
+ signature: method signature
+ modifiers: method accessFlags
+ parameterTyoes: (method descriptor parameterClassesUsingClassLoader: method javaClass classLoader)
+ exceptionTypes: method exceptionClasses
+ annotations: method method annotations.
+
+ "Created: / 01-08-2012 / 00:46:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredMethodFor: method
+
+ ^self createMethodFor: method javaClass
+ method: method
+ name: (method selector upTo: $()
+ signature: method signature
+ modifiers: method accessFlags
+ parameterTyoes: (method descriptor parameterClassesUsingClassLoader: method javaClass classLoader)
+ returnType: (method descriptor returnClassUsingClassLoader: method javaClass classLoader)
+ exceptionTypes: method exceptionClasses
+ annotations: method method annotations.
+
+ "Created: / 01-08-2012 / 11:11:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaClassMirror class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- a/JavaClassRegistry.st Thu May 23 23:33:06 2013 +0100
+++ b/JavaClassRegistry.st Fri May 24 17:51:53 2013 +0100
@@ -301,6 +301,42 @@
!JavaClassRegistry methodsFor:'registering'!
+registerBuiltIn: class
+ | nm |
+
+ nm := class name.
+ nm == #'java/lang/Object' ifTrue:[
+ java_lang_Object := class.
+ ^self.
+ ].
+ nm == #'java/lang/System' ifTrue:[
+ java_lang_System := class.
+ ^self.
+ ].
+ nm == #'java/lang/Class' ifTrue:[
+ java_lang_Class := class.
+ "/ Force load of other reflective classes. This saves us a nil check in
+ "/ JavaMirror>>createMethod...
+ #(#'java/lang/reflect/Constructor' #'java/lang/reflect/Method' #'java/lang/reflect/Field') do:[:e|
+ vm classForName: e definedBy: nil.
+ ].
+ ^self.
+ ].
+ nm == #'java/lang/reflect/Constructor' ifTrue:[
+ java_lang_reflect_Constructor := class.
+ ].
+ nm == #'java/lang/reflect/Method' ifTrue:[
+ java_lang_reflect_Method := class.
+ ].
+ nm == #'java/lang/reflect/Field' ifTrue:[
+ java_lang_reflect_Field := class.
+ ].
+
+
+
+ "Created: / 22-05-2013 / 20:40:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
registerClass: newClass
| classes oldClass |
@@ -338,11 +374,15 @@
classes := loaders at: newClass classLoader put: Dictionary new.
].
classes at: newClass name put: newClass.
+ newClass isBuiltInClass ifTrue:[
+ self assert: newClass classLoader isNil. "/must be loaded by primordial CL...
+ self registerBuiltIn: newClass.
+ ].
self registerClassInSmalltalk: newClass notify: true.
"Created: / 23-10-2011 / 11:53:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 02-11-2011 / 18:40:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 08-02-2013 / 00:54:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 22-05-2013 / 20:40:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
registerClassInSmalltalk: javaclass notify: doNotify
@@ -412,6 +452,7 @@
| classes |
self assert: (oldClass name includes: $.) not.
+ self assert: (oldClass isBuiltInClass not).
self unregisterClassInSmalltalk: oldClass notify: true.
classes := loaders at: oldClass classLoader ifAbsent: nil.
classes notNil ifTrue:[
@@ -419,6 +460,7 @@
].
"Created: / 04-04-2012 / 02:43:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 22-05-2013 / 20:41:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
unregisterClassInSmalltalk: javaclass notify: doNotify
--- a/JavaMirror.st Thu May 23 23:33:06 2013 +0100
+++ b/JavaMirror.st Fri May 24 17:51:53 2013 +0100
@@ -23,38 +23,10 @@
Object subclass:#JavaMirror
instanceVariableNames:'klass reflection'
classVariableNames:''
- poolDictionaries:''
+ poolDictionaries:'JavaVMData'
category:'Languages-Java-Classes'
!
-JavaMirror subclass:#AlienClassMirror
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- privateIn:JavaMirror
-!
-
-JavaMirror subclass:#JavaArrayMirror
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- privateIn:JavaMirror
-!
-
-JavaMirror subclass:#JavaClassMirror
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- privateIn:JavaMirror
-!
-
-JavaMirror subclass:#JavaPrimitiveMirror
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- privateIn:JavaMirror
-!
-
!JavaMirror class methodsFor:'documentation'!
copyright
@@ -117,9 +89,10 @@
!JavaMirror class methodsFor:'accessing'!
mirrorClassForAlienClass
- ^ AlienClassMirror
+ ^ JavaAlienMirror
"Created: / 31-07-2012 / 17:36:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 24-05-2013 / 10:54:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
mirrorClassForJavaArray
@@ -273,7 +246,7 @@
"
| ctor |
- ctor := self create: (JavaVM classForName:'java.lang.reflect.Constructor' definedBy: nil)
+ ctor := self create: java_lang_reflect_Constructor
for: class
method: method
signature: signature
@@ -309,7 +282,7 @@
type := JavaVM javaClassObjectForClass:
((JavaDescriptor fromString: javaField descriptor) javaClassUsingClassLoader: javaField javaClass classLoader).
modifiers := javaField accessFlags.
- field := (JavaVM classForName: 'java.lang.reflect.Field' definedBy: nil) new.
+ field := java_lang_reflect_Field new.
field
instVarNamed: #clazz put: clazz;
instVarNamed: #name put: name;
@@ -343,7 +316,7 @@
"
| mthd |
- mthd := self create: (JavaVM classForName:'java.lang.reflect.Method' definedBy: nil)
+ mthd := self create: java_lang_reflect_Method
for: class
method: method
signature: signature
@@ -363,484 +336,6 @@
"Modified: / 18-05-2013 / 10:55:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
-!JavaMirror::AlienClassMirror class methodsFor:'documentation'!
-
-documentation
-"
- Specialized mirror for Smalltalk (and all other
- non-Java classes)
-
- [author:]
- Jan Vrany <jan.vrany@fit.cvut.cz>
-
- [instance variables:]
-
- [class variables:]
-
- [see also:]
-
-"
-! !
-
-!JavaMirror::AlienClassMirror methodsFor:'accessing'!
-
-getClassLoader
- "Returns a class loader that loaded this class"
-
- ^ (JavaVM classForName:'stx.libjava.ClassLoader' definedBy: nil) instVarNamed: #scl.
-
- "Modified: / 18-05-2013 / 10:57:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredConstructors:publicOnly
- "Returns an java.lang.reflect.Constructor[] with all constructors
- declared by this class"
-
- "Here, return onlu default constructor. Later, all methods annotated
- with <jsignature: #'<init>(...)V'> wil be returned as well"
-
- | ctors |
-
- ctors := OrderedCollection new.
- klass selectorsAndMethodsDo:[:sel :mthd|
- (self isJavaConstructor: mthd selector: sel) ifTrue:[
- ctors add: (self getDeclaredConstructorFor: mthd).
- ].
- ].
-
- ctors isEmpty ifTrue:[
- "/If no constructor is found, fake default one...
- ctors add: (self getDeclaredConstructorFor: (klass lookupMethodFor: #initialize)).
- ].
-
- ^(JavaVM classForName:'java.lang.reflect.Constructor' definedBy: nil) javaArrayClass withAll: ctors
-
- "Modified: / 18-05-2013 / 10:57:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredFields:publicOnly
- "Returns an java.lang.reflect.Field[] with all constructors
- declared by this class."
-
- | fields |
-
- fields := OrderedCollection new.
-
- klass instVarNames withIndexDo:[:nm :index|
- | field |
-
- field := JavaField new.
- field
- setAccessFlags: JavaConstants ACC_PROTECTED;
- setClass: klass;
- setIndex: klass superclass instSize + index;
- setDescriptor: #'Ljava/lang/Object;';
- setName: nm.
-
- fields add: (self createFieldFor: field)
- ].
-
- ^ (JavaVM classForName:'java.lang.reflect.Field' definedBy: nil) javaArrayClass
- withAll:fields
-
- "Modified: / 18-05-2013 / 10:57:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredMethods:publicOnly
- "Returns an java.lang.reflect.Method[] with all methods
- declared by this class"
-
- | methods |
-
- methods := OrderedCollection new.
- klass selectorsAndMethodsDo:[:sel :mthd|
- (self isJavaMethod: mthd selector: sel) ifTrue:[
- methods add: (self getDeclaredMethodFor: mthd).
- ].
- ].
- ^(JavaVM classForName:'java.lang.reflect.Method' definedBy: nil) javaArrayClass withAll: methods
-
- "Modified: / 18-05-2013 / 10:57:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getInterfaces
- "Return a list if interfaces"
-
- ^ Array with: (JavaVM classForName: 'java.lang.Cloneable' definedBy: nil)
-
- "Modified: / 18-05-2013 / 10:57:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getModifiers
- "Return class modifiers (public/abstract/final...)"
-
- ^ JavaConstants ACC_PUBLIC
-
- "Modified: / 22-08-2012 / 11:01:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getName
- "Returns name of the class"
- ^'SMALLTALK.' , klass name
-
- "Created: / 22-08-2012 / 10:47:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaMirror::AlienClassMirror methodsFor:'accessing-private'!
-
-getDeclaredConstructorFor: method
- ^ self
- createConstructorFor: klass
- method: method
- signature: (self getSignatureForConstructor: method)
- modifiers: JavaConstants ACC_PUBLIC
- parameterTyoes: #()
- exceptionTypes: #()
- annotations: JavaMethodAnnotationContainer new
-
- "Created: / 22-08-2012 / 11:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredMethodFor:method
- | signature name java_lang_Object |
-
- signature := self getSignatureForMethod: method short: false.
- name := signature upTo: $(.
- java_lang_Object := JavaVM classNamed: 'java.lang.Object'.
- ^ self
- createMethodFor: klass
- method: method
- name: name
- signature: signature
- modifiers: JavaConstants ACC_PUBLIC
- parameterTyoes: ((1 to: method selector numArgs) collect:[:i|java_lang_Object])
- returnType: java_lang_Object
- exceptionTypes: #()
- annotations: JavaMethodAnnotationContainer new
-
- "Created: / 22-08-2012 / 11:36:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getSignatureForConstructor: method
- | signature |
-
- signature :=
- (String streamContents:[:s|
- s nextPutAll: '<init>('.
- method selector numArgs timesRepeat:[
- s nextPutAll:'Ljava/lang/Object;'.
- ].
- s nextPutAll: ')V'.
- ]) asSymbol.
- ^signature
-
- "Created: / 22-08-2012 / 11:40:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getSignatureForMethod: method short: short
- | selector signature |
-
- selector := method selector.
- signature :=
- (String streamContents:[:s|
- short ifTrue:[
- s nextPutAll: (selector upTo: $:)
- ] ifFalse:[
- selector numArgs == 1 ifTrue:[
- s nextPutAll: (selector copyTo: selector size - 1)
- ] ifFalse:[
- s nextPutAll: (selector copyReplaceAll: $: with: $_)
- ]
- ].
- s nextPut: $(.
- method selector numArgs timesRepeat:[
- s nextPutAll:'Ljava/lang/Object;'.
- ].
- s nextPutAll: ')'.
- s nextPutAll:'Ljava/lang/Object;'.
- ]) asSymbol.
- ^signature
-
- "Created: / 22-08-2012 / 11:46:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaMirror::AlienClassMirror methodsFor:'testing-private'!
-
-isJavaConstructor: mthd selector: sel
-
- ^sel startsWith: #initialize
-
- "Created: / 22-08-2012 / 11:47:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-isJavaMethod: mthd selector: sel
-
- ^sel isBinarySelector not
- and:[(self isJavaConstructor: mthd selector: sel) not]
-
- "Created: / 22-08-2012 / 11:47:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaMirror::JavaArrayMirror methodsFor:'accessing'!
-
-getClassLoader
- "Returns a class loader that loaded this class"
-
- ^ klass javaComponentClass javaMirror getClassLoader
-
- "Modified: / 31-07-2012 / 18:35:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredConstructors:publicOnly
- "Returns an java.lang.reflect.Constructor[] with all constructors
- declared by this class"
-
- ^ (JavaVM classForName:'java.lang.reflect.Constructor' definedBy: nil) javaArrayClass new:0.
-
- "Modified: / 18-05-2013 / 10:57:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredFields:publicOnly
- "Returns an java.lang.reflect.Field[] with all constructors
- declared by this class."
-
- ^(JavaVM classForName:'java.lang.reflect.Field' definedBy: nil) javaArrayClass new:0.
-
- "Modified: / 18-05-2013 / 10:57:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredMethods:publicOnly
- "Returns an java.lang.reflect.Method[] with all methods
- declared by this class"
-
- ^ (JavaVM classForName:'java.lang.reflect.Method' definedBy: nil) javaArrayClass new:0.
-
- "Modified: / 18-05-2013 / 10:57:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getInterfaces
- "Return a list if interfaces"
-
- ^ Array
- with: (JavaVM classForName: 'java.lang.Cloneable' definedBy: nil)
- with: (JavaVM classForName: 'java.io.Serializable' definedBy: nil)
-
- "Modified: / 18-05-2013 / 10:57:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getModifiers
- "Return class modifiers (public/abstract/final...)"
-
- ^ JavaConstants ACC_ABSTRACT | JavaConstants ACC_FINAL | JavaConstants ACC_PUBLIC
-
- "Modified: / 22-08-2012 / 11:02:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaMirror::JavaClassMirror class methodsFor:'documentation'!
-
-documentation
-"
- A specialized mirror for all Java classes
-
- [author:]
- Jan Vrany <jan.vrany@fit.cvut.cz>
-
- [instance variables:]
-
- [class variables:]
-
- [see also:]
-
-"
-! !
-
-!JavaMirror::JavaClassMirror methodsFor:'accessing'!
-
-getClassLoader
- "Returns a class loader that loaded this class"
-
- ^ klass classLoader
-
- "Modified: / 31-07-2012 / 18:26:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredConstructors:publicOnly
- "Returns an java.lang.reflect.Constructor[] with all constructors
- declared by this class"
-
- | ctors |
-
- ctors := OrderedCollection new.
- klass selectorsAndMethodsDo:[:sel :mthd|
- (mthd isJavaConstructor and:[publicOnly not or:[mthd isPublic]]) ifTrue:[
- ctors add: (self getDeclaredConstructorFor: mthd).
- ].
- ].
- ^(JavaVM classForName:'java.lang.reflect.Constructor' definedBy: nil) javaArrayClass withAll: ctors
-
- "Modified: / 18-05-2013 / 10:56:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredFields:publicOnly
- "Returns an java.lang.reflect.Field[] with all constructors
- declared by this class."
-
- | fields |
-
- fields := klass fields , klass staticFields.
- publicOnly ifTrue:[ fields := fields select:[:f | f isPublic ] ].
- JavaClassReader classLoaderQuerySignal answer: klass classLoader do:[
- fields := fields collect:[:f | self createFieldFor:f ].
- ].
- ^ (JavaVM classForName:'java.lang.reflect.Field' definedBy: nil) javaArrayClass
- withAll:fields
-
- "Modified: / 18-05-2013 / 10:57:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredMethods:publicOnly
- "Returns an java.lang.reflect.Constructor[] with all constructors
- declared by this class"
-
- | methods |
-
- methods := OrderedCollection new.
- klass selectorsAndMethodsDo:[:sel :mthd|
- mthd isJavaMethod and:[
- (mthd isJavaConstructor not
- and:[mthd isJavaStaticInitializer not
- and:[publicOnly not or:[mthd isPublic]]]) ifTrue:[
- methods add: (self getDeclaredMethodFor: mthd).
- ]
- ].
- ].
- ^(JavaVM classForName:'java.lang.reflect.Method' definedBy: nil) javaArrayClass withAll: methods
-
- "Modified: / 18-05-2013 / 10:57:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getGenericSignature
- "Returns Java generic signature (if a generic class) or nil"
-
- ^klass signatureJ
-
- "Created: / 22-08-2012 / 11:58:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getInterfaces
- "Return a list if interfaces"
-
- ^ klass interfaces
-
- "Modified: / 22-08-2012 / 11:08:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getModifiers
- "Return class modifiers (public/abstract/final...)"
-
- | modifiers |
-
- "According to OpenJDK JVM, strip ACC_SUPER"
- modifiers := (klass accessFlags & JavaConstants ACC_SUPER bitInvert) & 16r7FFF.
- "JV@2011-10-30: It seems that private inner classes has no
- private bit set, sigh"
- (modifiers & 16r0007) == 0 ifTrue:[
- modifiers := modifiers | JavaConstants ACC_PRIVATE.
- ].
- ^modifiers
-
- "Modified: / 22-08-2012 / 11:03:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getProtectionDomain
- ^klass protectionDomain
-
- "Created: / 22-08-2012 / 12:56:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaMirror::JavaClassMirror methodsFor:'accessing-private'!
-
-getDeclaredConstructorFor: method
-
- ^self createConstructorFor: method javaClass
- method: method
- signature: method signature
- modifiers: method accessFlags
- parameterTyoes: (method descriptor parameterClassesUsingClassLoader: method javaClass classLoader)
- exceptionTypes: method exceptionClasses
- annotations: method method annotations.
-
- "Created: / 01-08-2012 / 00:46:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredMethodFor: method
-
- ^self createMethodFor: method javaClass
- method: method
- name: (method selector upTo: $()
- signature: method signature
- modifiers: method accessFlags
- parameterTyoes: (method descriptor parameterClassesUsingClassLoader: method javaClass classLoader)
- returnType: (method descriptor returnClassUsingClassLoader: method javaClass classLoader)
- exceptionTypes: method exceptionClasses
- annotations: method method annotations.
-
- "Created: / 01-08-2012 / 11:11:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaMirror::JavaPrimitiveMirror methodsFor:'accessing'!
-
-getClassLoader
- "Returns a class loader that loaded this class"
-
- ^ nil
-
- "Modified: / 31-07-2012 / 18:35:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredConstructors:publicOnly
- "Returns an java.lang.reflect.Constructor[] with all constructors
- declared by this class"
-
- ^ (JavaVM classForName:'java.lang.reflect.Constructor' definedBy: nil) javaArrayClass new:0.
-
- "Modified: / 18-05-2013 / 10:57:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredFields:publicOnly
- "Returns an java.lang.reflect.Field[] with all constructors
- declared by this class."
-
- ^(JavaVM classForName:'java.lang.reflect.Field' definedBy: nil) javaArrayClass new:0.
-
- "Modified: / 18-05-2013 / 10:58:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getDeclaredMethods:publicOnly
- "Returns an java.lang.reflect.Method[] with all methods
- declared by this class"
-
- ^ (JavaVM classForName:'java.lang.reflect.Method' definedBy: nil) javaArrayClass new:0.
-
- "Modified: / 18-05-2013 / 10:58:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getInterfaces
- "Return a list if interfaces"
-
- ^ #()
-
- "Modified: / 22-08-2012 / 11:07:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getModifiers
- "Return class modifiers (public/abstract/final...)"
-
- ^ JavaConstants ACC_ABSTRACT | JavaConstants ACC_FINAL | JavaConstants ACC_PUBLIC
-
- "Modified: / 22-08-2012 / 11:02:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
!JavaMirror class methodsFor:'documentation'!
version_CVS
--- a/JavaNativeMethodImpl_OpenJDK6.st Thu May 23 23:33:06 2013 +0100
+++ b/JavaNativeMethodImpl_OpenJDK6.st Fri May 24 17:51:53 2013 +0100
@@ -9839,13 +9839,10 @@
<javanative: 'java/lang/Class' name: 'registerNatives()V'>
- java_lang_Class := this.
-
-
"Nothing to do, native method are bound lazily"
"Created: / 20-10-2010 / 11:13:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 21-05-2013 / 16:14:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 22-05-2013 / 20:44:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
_java_lang_Class_setProtectionDomain0: this _: a1
@@ -10173,14 +10170,10 @@
_java_lang_Object_registerNatives: this
<javanative: 'java/lang/Object' name: 'registerNatives()V'>
-
- java_lang_Object := this.
-
-
"Nothing to do, native method are bound lazily"
"Created: / 19-10-2010 / 12:42:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 21-05-2013 / 16:13:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 22-05-2013 / 20:44:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
_java_lang_Object_wait: this _:a1 _: a2
@@ -10922,14 +10915,10 @@
_java_lang_System_registerNatives: this
<javanative: 'java/lang/System' name: 'registerNatives()V'>
-
- java_lang_System := this.
-
-
"Nothing to do, native method are bound lazily"
"Created: / 20-10-2010 / 10:56:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 21-05-2013 / 16:13:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 22-05-2013 / 20:44:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
_java_lang_System_setErr0: this _:a1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/JavaPrimitiveMirror.st Fri May 24 17:51:53 2013 +0100
@@ -0,0 +1,115 @@
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+"
+"{ Package: 'stx:libjava' }"
+
+JavaMirror subclass:#JavaPrimitiveMirror
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:'JavaVMData'
+ category:'Languages-Java-Classes'
+!
+
+!JavaPrimitiveMirror class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+
+"
+! !
+
+!JavaPrimitiveMirror methodsFor:'accessing'!
+
+getClassLoader
+ "Returns a class loader that loaded this class"
+
+ ^ nil
+
+ "Modified: / 31-07-2012 / 18:35:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredConstructors:publicOnly
+ "Returns an java.lang.reflect.Constructor[] with all constructors
+ declared by this class"
+
+ ^ java_lang_reflect_Constructor javaArrayClass new:0.
+
+ "Modified: / 18-05-2013 / 10:57:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredFields:publicOnly
+ "Returns an java.lang.reflect.Field[] with all constructors
+ declared by this class."
+
+ ^java_lang_reflect_Field javaArrayClass new:0.
+
+ "Modified: / 18-05-2013 / 10:58:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getDeclaredMethods:publicOnly
+ "Returns an java.lang.reflect.Method[] with all methods
+ declared by this class"
+
+ ^ java_lang_reflect_Method javaArrayClass new:0.
+
+ "Modified: / 18-05-2013 / 10:58:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getInterfaces
+ "Return a list if interfaces"
+
+ ^ #()
+
+ "Modified: / 22-08-2012 / 11:07:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getModifiers
+ "Return class modifiers (public/abstract/final...)"
+
+ ^ JavaConstants ACC_ABSTRACT | JavaConstants ACC_FINAL | JavaConstants ACC_PUBLIC
+
+ "Modified: / 22-08-2012 / 11:02:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaPrimitiveMirror class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- a/JavaVM.st Thu May 23 23:33:06 2013 +0100
+++ b/JavaVM.st Fri May 24 17:51:53 2013 +0100
@@ -2486,6 +2486,31 @@
"Created: / 23-02-2011 / 12:59:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!JavaVM class methodsFor:'accessing-builtin classes'!
+
+builtInClassNames
+ "Returns an array with (binary) names of classes known by the runtime system.
+ When a builtin class is loaded and registered in class registry,
+ JavaClassRegistry is sent #registerBuiltIn:
+
+ NOTE: If you add class here, you may want to update
+ JavaClassRegistry>>registerBuiltIn:.
+ "
+ ^#(
+ #'java/lang/Object'
+ #'java/lang/String'
+ #'java/lang/System'
+ #'java/lang/Class'
+
+ #'java/lang/reflect/Constructor'
+ #'java/lang/reflect/Method'
+ #'java/lang/reflect/Field'
+
+ )
+
+ "Created: / 22-05-2013 / 20:38:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!JavaVM class methodsFor:'cache management'!
flushCachesFor: aClass
--- a/JavaVMData.st Thu May 23 23:33:06 2013 +0100
+++ b/JavaVMData.st Fri May 24 17:51:53 2013 +0100
@@ -33,7 +33,7 @@
JavaConsoleStream JavaEventQueueThread PermittedDirectories
StdinReplacementFileQuerySignal JavaScreenUpdaterThread
ZipInflaters LoadedLibs EnteredMonitorsPerProcess
- java_lang_Object java_lang_System java_lang_Class'
+ java_lang_Object java_lang_System java_lang_Class java_lang_reflect_Constructor java_lang_reflect_Method java_lang_reflect_Field'
poolDictionaries:''
category:'Languages-Java-Support'
!
--- a/Make.proto Thu May 23 23:33:06 2013 +0100
+++ b/Make.proto Fri May 24 17:51:53 2013 +0100
@@ -196,7 +196,6 @@
$(OUTDIR)JavaLookup.$(O) JavaLookup.$(H): JavaLookup.st $(INCLUDE_TOP)/stx/libbasic/Lookup.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaMathSupport.$(O) JavaMathSupport.$(H): JavaMathSupport.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaMetaclass.$(O) JavaMetaclass.$(H): JavaMetaclass.st $(INCLUDE_TOP)/stx/libbasic/Metaclass.$(H) $(INCLUDE_TOP)/stx/libbasic/ClassDescription.$(H) $(INCLUDE_TOP)/stx/libbasic/Behavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)JavaMirror.$(O) JavaMirror.$(H): JavaMirror.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaMonitor.$(O) JavaMonitor.$(H): JavaMonitor.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaNameAndType2.$(O) JavaNameAndType2.$(H): JavaNameAndType2.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaNativeMemory.$(O) JavaNativeMemory.$(H): JavaNativeMemory.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Link.$(H) $(STCHDR)
@@ -253,6 +252,7 @@
$(OUTDIR)JavaMethod.$(O) JavaMethod.$(H): JavaMethod.st $(INCLUDE_TOP)/stx/libjava/JavaConstants.$(H) $(INCLUDE_TOP)/stx/libbasic/CompiledCode.$(H) $(INCLUDE_TOP)/stx/libbasic/ExecutableFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodAnnotationContainer.$(O) JavaMethodAnnotationContainer.$(H): JavaMethodAnnotationContainer.st $(INCLUDE_TOP)/stx/libjava/JavaAnnotationContainer.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodDescriptor.$(O) JavaMethodDescriptor.$(H): JavaMethodDescriptor.st $(INCLUDE_TOP)/stx/libjava/JavaDescriptor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)JavaMirror.$(O) JavaMirror.$(H): JavaMirror.st $(INCLUDE_TOP)/stx/libjava/JavaVMData.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaNativeMethodImpl_OpenJDK6.$(O) JavaNativeMethodImpl_OpenJDK6.$(H): JavaNativeMethodImpl_OpenJDK6.st $(INCLUDE_TOP)/stx/libjava/JavaVMData.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaRelease.$(O) JavaRelease.$(H): JavaRelease.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaStringRef2.$(O) JavaStringRef2.$(H): JavaStringRef2.st $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -264,14 +264,18 @@
$(OUTDIR)ProxyMethodGuardNode.$(O) ProxyMethodGuardNode.$(H): ProxyMethodGuardNode.st $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodInvocationNode.$(O) ProxyMethodInvocationNode.$(H): ProxyMethodInvocationNode.st $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodJavaFieldAccessor.$(O) ProxyMethodJavaFieldAccessor.$(H): ProxyMethodJavaFieldAccessor.st $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)JavaAlienMirror.$(O) JavaAlienMirror.$(H): JavaAlienMirror.st $(INCLUDE_TOP)/stx/libjava/JavaVMData.$(H) $(INCLUDE_TOP)/stx/libjava/JavaMirror.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)JavaArrayMirror.$(O) JavaArrayMirror.$(H): JavaArrayMirror.st $(INCLUDE_TOP)/stx/libjava/JavaVMData.$(H) $(INCLUDE_TOP)/stx/libjava/JavaMirror.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaByteCodePreresolver.$(O) JavaByteCodePreresolver.$(H): JavaByteCodePreresolver.st $(INCLUDE_TOP)/stx/libjava/JavaByteCodeProcessorAdapter.$(H) $(INCLUDE_TOP)/stx/libjava/JavaByteCodeProcessor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaClass.$(O) JavaClass.$(H): JavaClass.st $(INCLUDE_TOP)/stx/libjava/JavaConstants.$(H) $(INCLUDE_TOP)/stx/libjava/JavaBehavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Class.$(H) $(INCLUDE_TOP)/stx/libbasic/ClassDescription.$(H) $(INCLUDE_TOP)/stx/libbasic/Behavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)JavaClassMirror.$(O) JavaClassMirror.$(H): JavaClassMirror.st $(INCLUDE_TOP)/stx/libjava/JavaVMData.$(H) $(INCLUDE_TOP)/stx/libjava/JavaMirror.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaClassPathBundle.$(O) JavaClassPathBundle.$(H): JavaClassPathBundle.st $(INCLUDE_TOP)/stx/libjava/JavaCodeBundle.$(H) $(INCLUDE_TOP)/stx/libjava/JavaCodeLibraryOrBundle.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaFieldRef2.$(O) JavaFieldRef2.$(H): JavaFieldRef2.st $(INCLUDE_TOP)/stx/libjava/JavaClassContentRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodRef2.$(O) JavaMethodRef2.$(H): JavaMethodRef2.st $(INCLUDE_TOP)/stx/libjava/JavaClassContentRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodWithException.$(O) JavaMethodWithException.$(H): JavaMethodWithException.st $(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)JavaNativeMethodImpl_OpenJDK7.$(O) JavaNativeMethodImpl_OpenJDK7.$(H): JavaNativeMethodImpl_OpenJDK7.st $(INCLUDE_TOP)/stx/libjava/JavaVMData.$(H) $(INCLUDE_TOP)/stx/libjava/JavaNativeMethodImpl_OpenJDK6.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaNativeMethodImpl_SunJDK6.$(O) JavaNativeMethodImpl_SunJDK6.$(H): JavaNativeMethodImpl_SunJDK6.st $(INCLUDE_TOP)/stx/libjava/JavaNativeMethodImpl_OpenJDK6.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)JavaPrimitiveMirror.$(O) JavaPrimitiveMirror.$(H): JavaPrimitiveMirror.st $(INCLUDE_TOP)/stx/libjava/JavaVMData.$(H) $(INCLUDE_TOP)/stx/libjava/JavaMirror.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodAndNode.$(O) ProxyMethodAndNode.$(H): ProxyMethodAndNode.st $(INCLUDE_TOP)/stx/libjava/ProxyMethodConditionNode.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodBlockInvocationNode.$(O) ProxyMethodBlockInvocationNode.$(H): ProxyMethodBlockInvocationNode.st $(INCLUDE_TOP)/stx/libjava/ProxyMethodInvocationNode.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodJavaFieldGetter.$(O) ProxyMethodJavaFieldGetter.$(H): ProxyMethodJavaFieldGetter.st $(INCLUDE_TOP)/stx/libjava/ProxyMethodJavaFieldAccessor.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/Make.spec Thu May 23 23:33:06 2013 +0100
+++ b/Make.spec Fri May 24 17:51:53 2013 +0100
@@ -83,7 +83,6 @@
JavaLookup \
JavaMathSupport \
JavaMetaclass \
- JavaMirror \
JavaMonitor \
JavaNameAndType2 \
JavaNativeMemory \
@@ -140,6 +139,7 @@
JavaMethod \
JavaMethodAnnotationContainer \
JavaMethodDescriptor \
+ JavaMirror \
JavaNativeMethodImpl_OpenJDK6 \
JavaRelease \
JavaStringRef2 \
@@ -151,14 +151,18 @@
ProxyMethodGuardNode \
ProxyMethodInvocationNode \
ProxyMethodJavaFieldAccessor \
+ JavaAlienMirror \
+ JavaArrayMirror \
JavaByteCodePreresolver \
JavaClass \
+ JavaClassMirror \
JavaClassPathBundle \
JavaFieldRef2 \
JavaMethodRef2 \
JavaMethodWithException \
JavaNativeMethodImpl_OpenJDK7 \
JavaNativeMethodImpl_SunJDK6 \
+ JavaPrimitiveMirror \
ProxyMethodAndNode \
ProxyMethodBlockInvocationNode \
ProxyMethodJavaFieldGetter \
@@ -210,7 +214,6 @@
$(OUTDIR_SLASH)JavaLookup.$(O) \
$(OUTDIR_SLASH)JavaMathSupport.$(O) \
$(OUTDIR_SLASH)JavaMetaclass.$(O) \
- $(OUTDIR_SLASH)JavaMirror.$(O) \
$(OUTDIR_SLASH)JavaMonitor.$(O) \
$(OUTDIR_SLASH)JavaNameAndType2.$(O) \
$(OUTDIR_SLASH)JavaNativeMemory.$(O) \
@@ -267,6 +270,7 @@
$(OUTDIR_SLASH)JavaMethod.$(O) \
$(OUTDIR_SLASH)JavaMethodAnnotationContainer.$(O) \
$(OUTDIR_SLASH)JavaMethodDescriptor.$(O) \
+ $(OUTDIR_SLASH)JavaMirror.$(O) \
$(OUTDIR_SLASH)JavaNativeMethodImpl_OpenJDK6.$(O) \
$(OUTDIR_SLASH)JavaRelease.$(O) \
$(OUTDIR_SLASH)JavaStringRef2.$(O) \
@@ -278,14 +282,18 @@
$(OUTDIR_SLASH)ProxyMethodGuardNode.$(O) \
$(OUTDIR_SLASH)ProxyMethodInvocationNode.$(O) \
$(OUTDIR_SLASH)ProxyMethodJavaFieldAccessor.$(O) \
+ $(OUTDIR_SLASH)JavaAlienMirror.$(O) \
+ $(OUTDIR_SLASH)JavaArrayMirror.$(O) \
$(OUTDIR_SLASH)JavaByteCodePreresolver.$(O) \
$(OUTDIR_SLASH)JavaClass.$(O) \
+ $(OUTDIR_SLASH)JavaClassMirror.$(O) \
$(OUTDIR_SLASH)JavaClassPathBundle.$(O) \
$(OUTDIR_SLASH)JavaFieldRef2.$(O) \
$(OUTDIR_SLASH)JavaMethodRef2.$(O) \
$(OUTDIR_SLASH)JavaMethodWithException.$(O) \
$(OUTDIR_SLASH)JavaNativeMethodImpl_OpenJDK7.$(O) \
$(OUTDIR_SLASH)JavaNativeMethodImpl_SunJDK6.$(O) \
+ $(OUTDIR_SLASH)JavaPrimitiveMirror.$(O) \
$(OUTDIR_SLASH)ProxyMethodAndNode.$(O) \
$(OUTDIR_SLASH)ProxyMethodBlockInvocationNode.$(O) \
$(OUTDIR_SLASH)ProxyMethodJavaFieldGetter.$(O) \
--- a/bc.mak Thu May 23 23:33:06 2013 +0100
+++ b/bc.mak Fri May 24 17:51:53 2013 +0100
@@ -129,7 +129,6 @@
$(OUTDIR)JavaLookup.$(O) JavaLookup.$(H): JavaLookup.st $(INCLUDE_TOP)\stx\libbasic\Lookup.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaMathSupport.$(O) JavaMathSupport.$(H): JavaMathSupport.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaMetaclass.$(O) JavaMetaclass.$(H): JavaMetaclass.st $(INCLUDE_TOP)\stx\libbasic\Metaclass.$(H) $(INCLUDE_TOP)\stx\libbasic\ClassDescription.$(H) $(INCLUDE_TOP)\stx\libbasic\Behavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)JavaMirror.$(O) JavaMirror.$(H): JavaMirror.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaMonitor.$(O) JavaMonitor.$(H): JavaMonitor.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaNameAndType2.$(O) JavaNameAndType2.$(H): JavaNameAndType2.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaNativeMemory.$(O) JavaNativeMemory.$(H): JavaNativeMemory.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Link.$(H) $(STCHDR)
@@ -186,6 +185,7 @@
$(OUTDIR)JavaMethod.$(O) JavaMethod.$(H): JavaMethod.st $(INCLUDE_TOP)\stx\libjava\JavaConstants.$(H) $(INCLUDE_TOP)\stx\libbasic\CompiledCode.$(H) $(INCLUDE_TOP)\stx\libbasic\ExecutableFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodAnnotationContainer.$(O) JavaMethodAnnotationContainer.$(H): JavaMethodAnnotationContainer.st $(INCLUDE_TOP)\stx\libjava\JavaAnnotationContainer.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodDescriptor.$(O) JavaMethodDescriptor.$(H): JavaMethodDescriptor.st $(INCLUDE_TOP)\stx\libjava\JavaDescriptor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)JavaMirror.$(O) JavaMirror.$(H): JavaMirror.st $(INCLUDE_TOP)\stx\libjava\JavaVMData.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaNativeMethodImpl_OpenJDK6.$(O) JavaNativeMethodImpl_OpenJDK6.$(H): JavaNativeMethodImpl_OpenJDK6.st $(INCLUDE_TOP)\stx\libjava\JavaVMData.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaRelease.$(O) JavaRelease.$(H): JavaRelease.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaStringRef2.$(O) JavaStringRef2.$(H): JavaStringRef2.st $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -197,14 +197,18 @@
$(OUTDIR)ProxyMethodGuardNode.$(O) ProxyMethodGuardNode.$(H): ProxyMethodGuardNode.st $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodInvocationNode.$(O) ProxyMethodInvocationNode.$(H): ProxyMethodInvocationNode.st $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodJavaFieldAccessor.$(O) ProxyMethodJavaFieldAccessor.$(H): ProxyMethodJavaFieldAccessor.st $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)JavaAlienMirror.$(O) JavaAlienMirror.$(H): JavaAlienMirror.st $(INCLUDE_TOP)\stx\libjava\JavaVMData.$(H) $(INCLUDE_TOP)\stx\libjava\JavaMirror.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)JavaArrayMirror.$(O) JavaArrayMirror.$(H): JavaArrayMirror.st $(INCLUDE_TOP)\stx\libjava\JavaVMData.$(H) $(INCLUDE_TOP)\stx\libjava\JavaMirror.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaByteCodePreresolver.$(O) JavaByteCodePreresolver.$(H): JavaByteCodePreresolver.st $(INCLUDE_TOP)\stx\libjava\JavaByteCodeProcessorAdapter.$(H) $(INCLUDE_TOP)\stx\libjava\JavaByteCodeProcessor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaClass.$(O) JavaClass.$(H): JavaClass.st $(INCLUDE_TOP)\stx\libjava\JavaConstants.$(H) $(INCLUDE_TOP)\stx\libjava\JavaBehavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Class.$(H) $(INCLUDE_TOP)\stx\libbasic\ClassDescription.$(H) $(INCLUDE_TOP)\stx\libbasic\Behavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)JavaClassMirror.$(O) JavaClassMirror.$(H): JavaClassMirror.st $(INCLUDE_TOP)\stx\libjava\JavaVMData.$(H) $(INCLUDE_TOP)\stx\libjava\JavaMirror.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaClassPathBundle.$(O) JavaClassPathBundle.$(H): JavaClassPathBundle.st $(INCLUDE_TOP)\stx\libjava\JavaCodeBundle.$(H) $(INCLUDE_TOP)\stx\libjava\JavaCodeLibraryOrBundle.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaFieldRef2.$(O) JavaFieldRef2.$(H): JavaFieldRef2.st $(INCLUDE_TOP)\stx\libjava\JavaClassContentRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodRef2.$(O) JavaMethodRef2.$(H): JavaMethodRef2.st $(INCLUDE_TOP)\stx\libjava\JavaClassContentRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodWithException.$(O) JavaMethodWithException.$(H): JavaMethodWithException.st $(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)JavaNativeMethodImpl_OpenJDK7.$(O) JavaNativeMethodImpl_OpenJDK7.$(H): JavaNativeMethodImpl_OpenJDK7.st $(INCLUDE_TOP)\stx\libjava\JavaVMData.$(H) $(INCLUDE_TOP)\stx\libjava\JavaNativeMethodImpl_OpenJDK6.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaNativeMethodImpl_SunJDK6.$(O) JavaNativeMethodImpl_SunJDK6.$(H): JavaNativeMethodImpl_SunJDK6.st $(INCLUDE_TOP)\stx\libjava\JavaNativeMethodImpl_OpenJDK6.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)JavaPrimitiveMirror.$(O) JavaPrimitiveMirror.$(H): JavaPrimitiveMirror.st $(INCLUDE_TOP)\stx\libjava\JavaVMData.$(H) $(INCLUDE_TOP)\stx\libjava\JavaMirror.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodAndNode.$(O) ProxyMethodAndNode.$(H): ProxyMethodAndNode.st $(INCLUDE_TOP)\stx\libjava\ProxyMethodConditionNode.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodBlockInvocationNode.$(O) ProxyMethodBlockInvocationNode.$(H): ProxyMethodBlockInvocationNode.st $(INCLUDE_TOP)\stx\libjava\ProxyMethodInvocationNode.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodJavaFieldGetter.$(O) ProxyMethodJavaFieldGetter.$(H): ProxyMethodJavaFieldGetter.st $(INCLUDE_TOP)\stx\libjava\ProxyMethodJavaFieldAccessor.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/bmake.bat Thu May 23 23:33:06 2013 +0100
+++ b/bmake.bat Fri May 24 17:51:53 2013 +0100
@@ -10,6 +10,13 @@
make.exe -N -f bc.mak %DEFINES% %*
@echo "***********************************"
+@echo "Buildung stx/libjava/tools
+@echo "***********************************"
+@cd tools
+@call bmake %1 %2
+@cd ..
+
+@echo "***********************************"
@echo "Buildung stx/libjava/experiments
@echo "***********************************"
@cd experiments
--- a/lccmake.bat Thu May 23 23:33:06 2013 +0100
+++ b/lccmake.bat Fri May 24 17:51:53 2013 +0100
@@ -6,6 +6,13 @@
make.exe -N -f bc.mak -DUSELCC=1 %*
@echo "***********************************"
+@echo "Buildung stx/libjava/tools
+@echo "***********************************"
+@cd tools
+@call lccmake %1 %2
+@cd ..
+
+@echo "***********************************"
@echo "Buildung stx/libjava/experiments
@echo "***********************************"
@cd experiments
--- a/libInit.cc Thu May 23 23:33:06 2013 +0100
+++ b/libInit.cc Fri May 24 17:51:53 2013 +0100
@@ -60,7 +60,6 @@
_JavaLookup_Init(pass,__pRT__,snd);
_JavaMathSupport_Init(pass,__pRT__,snd);
_JavaMetaclass_Init(pass,__pRT__,snd);
-_JavaMirror_Init(pass,__pRT__,snd);
_JavaMonitor_Init(pass,__pRT__,snd);
_JavaNameAndType2_Init(pass,__pRT__,snd);
_JavaNativeMemory_Init(pass,__pRT__,snd);
@@ -117,6 +116,7 @@
_JavaMethod_Init(pass,__pRT__,snd);
_JavaMethodAnnotationContainer_Init(pass,__pRT__,snd);
_JavaMethodDescriptor_Init(pass,__pRT__,snd);
+_JavaMirror_Init(pass,__pRT__,snd);
_JavaNativeMethodImpl_137OpenJDK6_Init(pass,__pRT__,snd);
_JavaRelease_Init(pass,__pRT__,snd);
_JavaStringRef2_Init(pass,__pRT__,snd);
@@ -128,14 +128,18 @@
_ProxyMethodGuardNode_Init(pass,__pRT__,snd);
_ProxyMethodInvocationNode_Init(pass,__pRT__,snd);
_ProxyMethodJavaFieldAccessor_Init(pass,__pRT__,snd);
+_JavaAlienMirror_Init(pass,__pRT__,snd);
+_JavaArrayMirror_Init(pass,__pRT__,snd);
_JavaByteCodePreresolver_Init(pass,__pRT__,snd);
_JavaClass_Init(pass,__pRT__,snd);
+_JavaClassMirror_Init(pass,__pRT__,snd);
_JavaClassPathBundle_Init(pass,__pRT__,snd);
_JavaFieldRef2_Init(pass,__pRT__,snd);
_JavaMethodRef2_Init(pass,__pRT__,snd);
_JavaMethodWithException_Init(pass,__pRT__,snd);
_JavaNativeMethodImpl_137OpenJDK7_Init(pass,__pRT__,snd);
_JavaNativeMethodImpl_137SunJDK6_Init(pass,__pRT__,snd);
+_JavaPrimitiveMirror_Init(pass,__pRT__,snd);
_ProxyMethodAndNode_Init(pass,__pRT__,snd);
_ProxyMethodBlockInvocationNode_Init(pass,__pRT__,snd);
_ProxyMethodJavaFieldGetter_Init(pass,__pRT__,snd);
--- a/libjava.rc Thu May 23 23:33:06 2013 +0100
+++ b/libjava.rc Fri May 24 17:51:53 2013 +0100
@@ -25,7 +25,7 @@
VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\nCopyright Jan Vrany, Jan Kurs and Marcel Hlopko\n SWING Research Group, Czech Technical University In Prague\0"
VALUE "ProductName", "Smalltalk/X\0"
VALUE "ProductVersion", "6.2.3.0\0"
- VALUE "ProductDate", "Tue, 21 May 2013 16:19:53 GMT\0"
+ VALUE "ProductDate", "Fri, 24 May 2013 10:27:22 GMT\0"
END
END
--- a/mingwmake.bat Thu May 23 23:33:06 2013 +0100
+++ b/mingwmake.bat Fri May 24 17:51:53 2013 +0100
@@ -14,6 +14,13 @@
make.exe -N -f bc.mak %DEFINES% %USEMINGW_ARG% %*
@echo "***********************************"
+@echo "Buildung stx/libjava/tools
+@echo "***********************************"
+@cd tools
+@call mingwmake %1 %2
+@cd ..
+
+@echo "***********************************"
@echo "Buildung stx/libjava/experiments
@echo "***********************************"
@cd experiments
--- a/stx_libjava.st Thu May 23 23:33:06 2013 +0100
+++ b/stx_libjava.st Fri May 24 17:51:53 2013 +0100
@@ -158,7 +158,6 @@
exclude individual packages in the #excludedFromPreRequisites method."
^ #(
- #'stx:goodies/sunit' "TestAsserter - superclass of JavaByteCodeProcessorTests "
#'stx:libbasic' "AbstractNumberVector - extended "
#'stx:libbasic2' "BitArray - extended "
#'stx:libbasic3' "WrappedMethod - extended "
@@ -175,6 +174,7 @@
exclude individual packages in the #excludedFromPreRequisites method."
^ #(
+ #'stx:goodies/sunit' "TestSuite - referenced by JavaTestsLoader class>>buildSuiteFrom: "
#'stx:libcomp' "BlockNode - referenced by JavaNativeMethod>>numberOfArgs: "
#'stx:libhtml' "URL - referenced by JavaEmbeddedFrameView>>setupAppletFrameIn:initializeJava: "
#'stx:libjava/experiments' "JavaByteCodeInterpreter - referenced by JavaMethod>>interpretWithReceiver:arguments: "
@@ -193,6 +193,7 @@
for those, redefine requiredPrerequisites"
^ #(
+ #'stx:libjava/tools'
#'stx:libjava/experiments'
)
! !
@@ -357,6 +358,7 @@
JavaMathSupport
JavaMetaclass
(JavaMethodRefTests autoload)
+ JavaVMData
JavaMirror
JavaMonitor
(JavaMonitorsTests autoload)
@@ -387,7 +389,6 @@
JavaUnresolvedCompilationError
JavaUnresolvedConstant
JavaUtilities
- JavaVMData
JavaView
JavaZipSupport
ProxyMethod
@@ -399,17 +400,20 @@
#'stx_libjava'
GroovyMetaclass
Java
+ JavaAlienMirror
JavaAnnotationArrayValue
JavaAnnotationClassValue
JavaAnnotationEnumValue
JavaAnnotationNestedAnnotationValue
JavaAnnotationPrimitiveValue
+ JavaArrayMirror
JavaBehavior
JavaByteCodeDisassembler
JavaByteCodeEnumerator
JavaByteCodeProcessorAdapter
JavaClassAnnotationContainer
JavaClassContentRef2
+ JavaClassMirror
JavaClassReader
JavaClassRef2
JavaClassRegistry
@@ -424,6 +428,7 @@
JavaMethodAnnotationContainer
JavaMethodDescriptor
#'JavaNativeMethodImpl_OpenJDK6'
+ JavaPrimitiveMirror
JavaRelease
JavaStringRef2
JavaUnhandledExceptionError
@@ -456,6 +461,8 @@
ProxyMethodJavaTypeCheckNode
JavaNativeMethod
)
+
+ "Modified: / 24-05-2013 / 11:26:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
extensionMethodNames
--- a/vcmake.bat Thu May 23 23:33:06 2013 +0100
+++ b/vcmake.bat Fri May 24 17:51:53 2013 +0100
@@ -18,6 +18,13 @@
@echo "***********************************"
+@echo "Buildung stx/libjava/tools
+@echo "***********************************"
+@cd tools
+@call vcmake %1 %2
+@cd ..
+
+@echo "***********************************"
@echo "Buildung stx/libjava/experiments
@echo "***********************************"
@cd experiments