752
|
1 |
"{ Package: 'stx:libjava' }"
|
|
2 |
|
|
3 |
JavaRef2 subclass:#JavaClassContentRef2
|
777
|
4 |
instanceVariableNames:'classRefIndex nameAndTypeIndex'
|
752
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'Languages-Java-Reader-Support-new'
|
|
8 |
!
|
|
9 |
|
|
10 |
|
758
|
11 |
!JavaClassContentRef2 class methodsFor:'instance creation'!
|
|
12 |
|
777
|
13 |
in: aJavaConstantPool withNameAndTypeAt: nameAndTypeCPIndex andClassAt: classRefCPIndex
|
|
14 |
^ self basicNew
|
|
15 |
initializeIn: aJavaConstantPool
|
|
16 |
withNameAndTypeAt: nameAndTypeCPIndex
|
|
17 |
andClassAt: classRefCPIndex.
|
758
|
18 |
|
777
|
19 |
"Created: / 12-05-2011 / 18:36:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
758
|
20 |
! !
|
|
21 |
|
|
22 |
!JavaClassContentRef2 methodsFor:'accessing'!
|
|
23 |
|
|
24 |
classRef
|
777
|
25 |
^ constantPool at: classRefIndex.
|
|
26 |
|
|
27 |
"Modified: / 12-05-2011 / 18:38:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
758
|
28 |
!
|
|
29 |
|
|
30 |
descriptor
|
777
|
31 |
^ self nameAndType descriptor.
|
758
|
32 |
|
|
33 |
"Created: / 08-04-2011 / 15:08:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
777
|
34 |
"Modified: / 12-05-2011 / 18:39:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
758
|
35 |
!
|
|
36 |
|
|
37 |
name
|
777
|
38 |
^ self nameAndType name.
|
758
|
39 |
|
|
40 |
"Created: / 08-04-2011 / 13:54:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
777
|
41 |
"Modified: / 12-05-2011 / 18:39:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
761
|
42 |
!
|
|
43 |
|
|
44 |
nameAndType
|
777
|
45 |
^ constantPool at: nameAndTypeIndex.
|
761
|
46 |
|
|
47 |
"Created: / 11-04-2011 / 19:57:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
777
|
48 |
"Modified: / 12-05-2011 / 18:39:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
761
|
49 |
!
|
|
50 |
|
|
51 |
selector
|
777
|
52 |
^ self nameAndType selector.
|
761
|
53 |
|
|
54 |
"Created: / 11-04-2011 / 20:38:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
777
|
55 |
"Modified: / 12-05-2011 / 18:39:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
758
|
56 |
! !
|
|
57 |
|
752
|
58 |
!JavaClassContentRef2 methodsFor:'comparing'!
|
|
59 |
|
|
60 |
= anotherJavaRef
|
|
61 |
"superclass JavaRef2 says that I am responsible to implement this method"
|
|
62 |
|
|
63 |
^ self shouldImplement
|
|
64 |
!
|
|
65 |
|
|
66 |
hash
|
|
67 |
"superclass JavaRef2 says that I am responsible to implement this method"
|
|
68 |
|
|
69 |
^ self shouldImplement
|
|
70 |
! !
|
|
71 |
|
758
|
72 |
!JavaClassContentRef2 methodsFor:'initialization'!
|
|
73 |
|
777
|
74 |
initializeIn: aJavaConstantPool withNameAndTypeAt: nameAndTypeCPIndex andClassAt: classRefCPIndex
|
|
75 |
constantPool := aJavaConstantPool.
|
|
76 |
classRefIndex := classRefCPIndex.
|
|
77 |
nameAndTypeIndex := nameAndTypeCPIndex.
|
758
|
78 |
super initialize.
|
|
79 |
|
777
|
80 |
"Created: / 12-05-2011 / 18:37:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
771
|
81 |
! !
|
|
82 |
|
|
83 |
!JavaClassContentRef2 methodsFor:'printing'!
|
|
84 |
|
|
85 |
printString
|
777
|
86 |
^ 'JavaClassContentRef: class=[' , self classRef printString , '] name=['
|
|
87 |
, self nameAndType printString , ']'.
|
771
|
88 |
|
|
89 |
"Created: / 10-05-2011 / 14:15:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
777
|
90 |
"Modified: / 12-05-2011 / 18:40:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
758
|
91 |
! !
|
|
92 |
|
|
93 |
!JavaClassContentRef2 methodsFor:'resolving'!
|
|
94 |
|
761
|
95 |
invalidate
|
777
|
96 |
self classRef invalidate.
|
|
97 |
self nameAndType invalidate.
|
771
|
98 |
super invalidate.
|
761
|
99 |
|
|
100 |
"Created: / 13-04-2011 / 12:21:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
777
|
101 |
"Modified: / 12-05-2011 / 18:40:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
761
|
102 |
!
|
|
103 |
|
758
|
104 |
invalidateForClass: internalJavaClassName
|
|
105 |
"Invalidate (means call invalidate) reference if it has something to do with given class (e.g Class named internalJavaClassName was unloaded).
|
|
106 |
Return true, if reference was invalidated."
|
|
107 |
|
777
|
108 |
(self classRef invalidateForClass: internalJavaClassName)
|
|
109 |
ifTrue:
|
|
110 |
[ self invalidate.
|
|
111 |
^ true ].
|
|
112 |
^ false.
|
758
|
113 |
|
777
|
114 |
"Modified: / 12-05-2011 / 18:40:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
758
|
115 |
! !
|
|
116 |
|
752
|
117 |
!JavaClassContentRef2 class methodsFor:'documentation'!
|
|
118 |
|
|
119 |
version_SVN
|
|
120 |
^ '$Id$'
|
|
121 |
! !
|