--- a/JavaField.st Fri Nov 22 21:09:21 2002 +0100
+++ b/JavaField.st Fri Nov 22 21:14:07 2002 +0100
@@ -1,10 +1,6 @@
"
- COPYRIGHT (c) 1996-2011 by Claus Gittinger
- COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
- SWING Research Group, Czech Technical University in Prague
-
- Parts of the code written by Claus Gittinger are under following
- license:
+ COPYRIGHT (c) 1997 by eXept Software AG
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -12,40 +8,16 @@
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
-
- Parts of the code written at SWING Reasearch Group [1] are MIT licensed:
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the 'Software'), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
+"
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
- [1] Code written at SWING Research Group contain a signature
- of one of the above copright owners.
-"
"{ Package: 'stx:libjava' }"
-Object subclass:#JavaField
- instanceVariableNames:'accessFlags class name descriptor signature index constantValue
- annotations constantPool'
+JavaRef subclass:#JavaField
+ instanceVariableNames:'accessFlags name signature constantValue'
classVariableNames:'A_FINAL A_PRIVATE A_PROTECTED A_PUBLIC A_STATIC A_TRANSIENT
- A_VOLATILE A_SMALLTALK A_SYBTHETIC A_ENUM FieldTypeClasses'
+ A_VOLATILE A_SMALLTALK'
poolDictionaries:''
category:'Languages-Java-Reader-Support'
!
@@ -54,12 +26,8 @@
copyright
"
- COPYRIGHT (c) 1996-2011 by Claus Gittinger
- COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
- SWING Research Group, Czech Technical University in Prague
-
- Parts of the code written by Claus Gittinger are under following
- license:
+ COPYRIGHT (c) 1997 by eXept Software AG
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -67,34 +35,9 @@
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
-
- Parts of the code written at SWING Reasearch Group [1] are MIT licensed:
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the 'Software'), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
+"
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
-
- [1] Code written at SWING Research Group contain a signature
- of one of the above copright owners.
-
-"
! !
!JavaField class methodsFor:'class initialization'!
@@ -107,46 +50,12 @@
A_FINAL := 16r0010. "/ JavaClass A_FINAL
A_VOLATILE := 16r0040.
A_TRANSIENT := 16r0080.
- A_SYBTHETIC := 16r1000.
- A_ENUM := 16r4000.
-
- FieldTypeClasses := IdentityDictionary new
- "Base types"
- "/WARNING: If you change something here, you MUST also
- "/ change JavaDescriptor class>>#initialize !!!!!!
-
- at: #B put: Byte;
- at: #C put: Character;
- at: #D put: Float;
- at: #F put: ShortFloat;
- at: #I put: Integer; "Kludge: instances of java int are in fact SmallIntegers"
- at: #J put: LargeInteger;
- at: #S put: Short;
- at: #Z put: Boolean;
-
- "Array types"
- "/WARNING: If you change something here, you MUST also
- "/ change JavaDescriptor class>>#initialize !!!!!!
- at: #'[B' put: ByteArray;
- at: #'[C' put: Unicode16String;
- at: #'[D' put: DoubleArray;
- at: #'[F' put: FloatArray;
- at: #'[I' put: SignedIntegerArray; "Kludge: instances of java int are in fact SmallIntegers"
- at: #'[J' put: SignedLongIntegerArray;
- at: #'[S' put: WordArray;
- at: #'[Z' put: BooleanArray;
-
- yourself
-
-
-
"
self initialize
"
- "Modified: / 13-05-1998 / 14:44:43 / cg"
- "Modified: / 10-08-2011 / 00:48:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 13.5.1998 / 14:44:43 / cg"
! !
!JavaField class methodsFor:'constants'!
@@ -195,26 +104,6 @@
!JavaField methodsFor:'accessing'!
-accessFlags
- ^ accessFlags
-!
-
-annotations
- ^ annotations
-!
-
-annotations:something
- annotations := something.
-!
-
-constantPool
-
- ^ constantPool
-
- "Created: / 17-12-2010 / 18:40:23 / Marcel Hlopko <hlopik@gmail.com>"
- "Modified: / 27-07-2011 / 09:38:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
constantValue
^ constantValue
!
@@ -223,35 +112,6 @@
constantValue := aValue
!
-ensureHasAnnotations
- annotations ifNil: [ annotations := JavaAnnotationContainer for:self ].
- ^ annotations
-
- "Created: / 25-02-2011 / 16:04:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 16-03-2011 / 17:13:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
-index
-
- index ifNil:[
- self isStatic ifTrue:[
- index := class class instVarOffsetOf: name
- ] ifFalse:[
- index := class instVarOffsetOf: name
- ].
- ].
- ^ index
-
- "Modified: / 17-08-2011 / 09:26:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-javaClass
-
- ^ class
-
- "Created: / 27-07-2011 / 09:17:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
name
^ name
!
@@ -262,7 +122,15 @@
"Created: / 15.10.1998 / 10:37:06 / cg"
! !
-!JavaField methodsFor:'initialization'!
+!JavaField methodsFor:'printing & storing'!
+
+displayString
+ ^ self class name , '(name: ' , name displayString , ')'
+
+
+! !
+
+!JavaField methodsFor:'private accessing'!
setAccessFlags:flags
accessFlags := flags.
@@ -270,41 +138,12 @@
"Created: 16.4.1996 / 13:04:25 / cg"
!
-setClass: aClass
-
- class := aClass
-
- "Created: / 27-07-2011 / 09:27:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-setConstantPool:aJavaContantPool
-
- constantPool := aJavaContantPool.
-
- "Created: / 17-12-2010 / 18:41:59 / Marcel Hlopko <hlopik@gmail.com>"
- "Created: / 27-07-2011 / 09:30:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
setConstantValue:something
constantValue := something.
"Created: 16.4.1996 / 13:04:58 / cg"
!
-setDescriptor:aString
-
- descriptor := aString.
-
- "Created: / 16-04-1996 / 13:04:43 / cg"
- "Created: / 14-08-2011 / 19:40:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-setIndex:anInteger
- index := anInteger.
-
- "Created: / 22-11-2010 / 17:13:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
setName:aString
name := aString.
@@ -317,28 +156,12 @@
"Created: 16.4.1996 / 13:04:43 / cg"
! !
-!JavaField methodsFor:'printing & storing'!
-
-printOn: aStream
-
- super printOn: aStream.
- aStream
- nextPutAll:'(name: ';
- nextPutAll: name;
- nextPut:$,; space;
- nextPutAll:'descriptor: ';
- nextPutAll: signature;
- nextPut:$)
-
- "Created: / 22-05-2011 / 16:07:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
!JavaField methodsFor:'queries'!
initialValue
- ^ JavaClass initialValueFromSignature: descriptor
+ ^ JavaClass initialValueFromSignature:signature
- "Modified: / 14-08-2011 / 19:59:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+
!
isFinal
@@ -384,32 +207,15 @@
!
type
- ^ JavaMethod typeFromSignature:descriptor in:nil
-
- "Modified: / 08-01-1998 / 19:13:22 / cg"
- "Modified: / 14-08-2011 / 19:43:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
+ ^ JavaMethod typeFromSignature:signature in:nil
-typeClass
-
- ^(JavaDescriptor fromString: descriptor) javaClass.
-
- "Created: / 23-11-2010 / 17:02:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 14-08-2011 / 19:59:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 8.1.1998 / 19:13:22 / cg"
! !
!JavaField class methodsFor:'documentation'!
version
- ^ '$Id: /cvs/stx/stx/libjava/JavaField.st,v 1.18 2011/08/18 18:42:48 vrany Exp $'
-!
-
-version_CVS
- ^ '§Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaField.st,v 1.17 2009/10/09 14:04:34 cg Exp §'
-!
-
-version_SVN
- ^ '$Id: JavaField.st,v 1.18 2011/08/18 18:42:48 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libjava/JavaField.st,v 1.16 2002-11-22 20:11:30 cg Exp $'
! !
-JavaField initialize!
\ No newline at end of file
+JavaField initialize!