JavaConstantPool.st
branchdevelopment
changeset 2711 a00302fe5083
parent 2429 ebece4dcaab9
child 2731 13f5be2bf83b
equal deleted inserted replaced
2710:78c4f4a03914 2711:a00302fe5083
    18      see the differences between this version and version stx:libjava
    18      see the differences between this version and version stx:libjava
    19      as of 1.9.2010
    19      as of 1.9.2010
    20 "
    20 "
    21 "{ Package: 'stx:libjava' }"
    21 "{ Package: 'stx:libjava' }"
    22 
    22 
    23 Array subclass:#JavaConstantPool
    23 Array variableSubclass:#JavaConstantPool
    24 	instanceVariableNames:'owner'
    24 	instanceVariableNames:'owner'
    25 	classVariableNames:'ConstantPools'
    25 	classVariableNames:'ConstantPools'
    26 	poolDictionaries:''
    26 	poolDictionaries:''
    27 	category:'Languages-Java-Reader-Support'
    27 	category:'Languages-Java-Reader-Support'
    28 !
    28 !
    51      as of 1.9.2010
    51      as of 1.9.2010
    52 
    52 
    53 "
    53 "
    54 ! !
    54 ! !
    55 
    55 
    56 
       
    57 !JavaConstantPool class methodsFor:'accessing'!
    56 !JavaConstantPool class methodsFor:'accessing'!
    58 
    57 
    59 allConstantPools
    58 allConstantPools
    60     "linked list of all constant pools in system"
    59     "linked list of all constant pools in system"
    61     ^ ConstantPools.
    60     ^ ConstantPools.
    72     "Created: / 08-04-2011 / 17:07:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    71     "Created: / 08-04-2011 / 17:07:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    73     "Modified: / 09-04-2011 / 09:24:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    72     "Modified: / 09-04-2011 / 09:24:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    74     "Modified: / 11-04-2011 / 18:47:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    73     "Modified: / 11-04-2011 / 18:47:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    75 ! !
    74 ! !
    76 
    75 
    77 
       
    78 !JavaConstantPool class methodsFor:'special'!
    76 !JavaConstantPool class methodsFor:'special'!
    79 
    77 
    80 invalidateForClass: internalJavaClassName 
    78 invalidateForClass: internalJavaClassName 
    81     "Only alias, everybody calls invalidateForClass so why not me :)"
    79     "Only alias, everybody calls invalidateForClass so why not me :)"
    82     
    80     
    91     ConstantPools do: [:each | each invalidateForClass: internalJavaClassName].
    89     ConstantPools do: [:each | each invalidateForClass: internalJavaClassName].
    92 
    90 
    93     "Created: / 08-04-2011 / 16:09:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    91     "Created: / 08-04-2011 / 16:09:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    94 ! !
    92 ! !
    95 
    93 
    96 
       
    97 !JavaConstantPool methodsFor:'accessing'!
    94 !JavaConstantPool methodsFor:'accessing'!
    98 
    95 
    99 owner
    96 owner
   100     "return owner"
    97     "return owner"
   101 
    98 
   109 
   106 
   110     owner := something.
   107     owner := something.
   111 
   108 
   112     "Created: 28.6.1996 / 21:12:22 / cg"
   109     "Created: 28.6.1996 / 21:12:22 / cg"
   113 ! !
   110 ! !
   114 
       
   115 
   111 
   116 !JavaConstantPool methodsFor:'adding'!
   112 !JavaConstantPool methodsFor:'adding'!
   117 
   113 
   118 at: classRefIndex putClassRefWithNameAt: classNameIndex 
   114 at: classRefIndex putClassRefWithNameAt: classNameIndex 
   119     self at: classRefIndex
   115     self at: classRefIndex
   153     self at: nameAndTypeIndex
   149     self at: nameAndTypeIndex
   154         put: (JavaNameAndType2 in: self withNameAt: nameIndex andDescriptorAt: descriptorIndex).
   150         put: (JavaNameAndType2 in: self withNameAt: nameIndex andDescriptorAt: descriptorIndex).
   155 
   151 
   156     "Created: / 13-05-2011 / 09:05:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
   152     "Created: / 13-05-2011 / 09:05:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
   157 ! !
   153 ! !
   158 
       
   159 
   154 
   160 !JavaConstantPool methodsFor:'invalidation'!
   155 !JavaConstantPool methodsFor:'invalidation'!
   161 
   156 
   162 invalidateForClass: slashedJavaClassName
   157 invalidateForClass: slashedJavaClassName
   163     "Invalidate all resolved references to given class.
   158     "Invalidate all resolved references to given class.
   174 
   169 
   175     "Created: / 08-04-2011 / 16:11:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
   170     "Created: / 08-04-2011 / 16:11:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
   176     "Modified: / 22-02-2012 / 20:53:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   171     "Modified: / 22-02-2012 / 20:53:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   177 ! !
   172 ! !
   178 
   173 
   179 
       
   180 !JavaConstantPool methodsFor:'printing & storing'!
   174 !JavaConstantPool methodsFor:'printing & storing'!
   181 
   175 
   182 displayString
   176 displayString
   183     owner isNil ifTrue:[
   177     owner isNil ifTrue:[
   184         ^ '*** unowned ConstantPool'
   178         ^ '*** unowned ConstantPool'
   186     ^ 'ConstantPool of ' , owner fullName
   180     ^ 'ConstantPool of ' , owner fullName
   187 
   181 
   188     "Created: 28.6.1996 / 21:13:41 / cg"
   182     "Created: 28.6.1996 / 21:13:41 / cg"
   189     "Modified: 28.6.1996 / 21:20:26 / cg"
   183     "Modified: 28.6.1996 / 21:20:26 / cg"
   190 ! !
   184 ! !
   191 
       
   192 
   185 
   193 !JavaConstantPool methodsFor:'queries'!
   186 !JavaConstantPool methodsFor:'queries'!
   194 
   187 
   195 refersToMethod:aJavaMethod
   188 refersToMethod:aJavaMethod
   196 
   189 
   221 
   214 
   222     "Created: / 29-07-1997 / 17:39:24 / cg"
   215     "Created: / 29-07-1997 / 17:39:24 / cg"
   223     "Modified: / 16-10-1998 / 01:22:02 / cg"
   216     "Modified: / 16-10-1998 / 01:22:02 / cg"
   224     "Modified: / 26-07-2011 / 17:54:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   217     "Modified: / 26-07-2011 / 17:54:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   225 ! !
   218 ! !
   226 
       
   227 
   219 
   228 !JavaConstantPool methodsFor:'special'!
   220 !JavaConstantPool methodsFor:'special'!
   229 
   221 
   230 classReferencesDo:aBlock
   222 classReferencesDo:aBlock
   231     self do:[:constItem |
   223     self do:[:constItem |
   297     ]
   289     ]
   298 
   290 
   299     "Modified: / 4.2.1998 / 22:12:03 / cg"
   291     "Modified: / 4.2.1998 / 22:12:03 / cg"
   300 ! !
   292 ! !
   301 
   293 
   302 
       
   303 !JavaConstantPool class methodsFor:'documentation'!
   294 !JavaConstantPool class methodsFor:'documentation'!
   304 
   295 
   305 version
   296 version
   306     ^ '$Header: /cvs/stx/stx/libjava/JavaConstantPool.st,v 1.19 2013-02-25 11:15:31 vrany Exp $'
   297     ^ '$Header: /cvs/stx/stx/libjava/JavaConstantPool.st,v 1.19 2013-02-25 11:15:31 vrany Exp $'
   307 !
   298 !
   308 
   299 
   309 version_CVS
   300 version_CVS
   310     ^ '$Header: /cvs/stx/stx/libjava/JavaConstantPool.st,v 1.19 2013-02-25 11:15:31 vrany Exp $'
   301     ^ '$Header$'
   311 !
   302 !
   312 
   303 
   313 version_HG
   304 version_HG
   314 
   305 
   315     ^ '$Changeset: <not expanded> $'
   306     ^ '$Changeset: <not expanded> $'