--- a/ObjFHandle.st Fri Sep 15 13:38:21 1995 +0200
+++ b/ObjFHandle.st Fri Sep 15 16:54:06 1995 +0200
@@ -11,13 +11,14 @@
version
"
-$Header: /cvs/stx/stx/libcomp/Attic/ObjFHandle.st,v 1.3 1995-09-15 11:38:21 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/ObjFHandle.st,v 1.4 1995-09-15 14:54:02 claus Exp $
"
!
documentation
"
- not for public use - used by ObjectFileLoader to keep track of loaded modules
+ not for public use - used by ObjectFileLoader to keep track of loaded modules,
+ associating objectFile names and moduleIDs to classes/methods.
"
"Created: 14.9.1995 / 21:10:55 / claus"
@@ -46,11 +47,28 @@
!ObjectFileHandle methodsFor:'queries'!
isClassLibHandle
+ "return true, if I am a handle for a class library"
+
^ handleType == #classLibraryObject
!
isMethodHandle
+ "return true, if I am a handle for a single compiled method"
+
^ handleType == #methodObject
+!
+
+isObsolete
+ "return true, if my clases/method has already been removed from
+ the image. I.e. if the object file can be unloaded without danger."
+
+ handleType == #classLibraryObject ifTrue:[
+ ^ (weakClassRefs findFirst:[:x | x notNil]) == 0
+ ].
+ handleType == #methodObject ifTrue:[
+ ^ (weakMethodRef at:1) isNil
+ ].
+ ^ false
! !
!ObjectFileHandle methodsFor:'accessing'!