--- a/src/JavaConstantPool.st Sat Feb 18 23:55:36 2012 +0000
+++ b/src/JavaConstantPool.st Tue Feb 21 11:29:41 2012 +0000
@@ -53,29 +53,6 @@
"
! !
-!JavaConstantPool class methodsFor:'initialization'!
-
-initialize
- ConstantPools := OrderedCollection new: 1000.
-
- "Modified: / 08-04-2011 / 17:28:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 09-04-2011 / 09:25:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaConstantPool class methodsFor:'instance creation'!
-
-new: size
- "return an initialized instance"
-
- ^ ConstantPools add: ((super new: size)
- initialize;
- yourself).
-
- "Created: / 08-04-2011 / 16:56:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 09-04-2011 / 09:24:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 11-04-2011 / 18:46:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-! !
-
!JavaConstantPool class methodsFor:'accessing'!
allConstantPools
@@ -175,15 +152,20 @@
"Created: / 13-05-2011 / 09:05:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
! !
-!JavaConstantPool methodsFor:'initialization'!
+!JavaConstantPool methodsFor:'invalidation'!
-initialize
- "Invoked when a new instance is created."
+invalidateForClass: slashedJavaClassName
+ "Invalidate all resolved references to given class.
+ Returns true if at least one ref has been invalidated,
+ false otherwise"
- "/ please change as required (and remove this comment)
- "/ owner := nil.
+ | anyInvalidated |
+ anyInvalidated := false.
+ self do:[:ref|anyInvalidated := anyInvalidated | (ref invalidateForClass: slashedJavaClassName)].
+ ^anyInvalidated
- "/ super initialize. -- commented since inherited method does nothing
+ "Created: / 08-04-2011 / 16:11:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 21-02-2012 / 10:27:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaConstantPool methodsFor:'printing & storing'!
@@ -256,14 +238,6 @@
"Created: / 13-05-2011 / 09:37:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
-invalidateForClass: internalJavaClassName
-"go over all entries and call invalidateForClass on all references"
-
-self do: [:entry | entry isJavaRef ifTrue:[entry invalidateForClass: internalJavaClassName]].
-
- "Created: / 08-04-2011 / 16:11:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
updateClassRefsFrom:oldClass to:newClass
owner == oldClass ifTrue:[
self halt.
@@ -323,5 +297,3 @@
version_SVN
^ '$Id$'
! !
-
-JavaConstantPool initialize!