1
|
1 |
JavaUnresolvedConstant subclass:#JavaUnresolvedClassConstant
|
21
|
2 |
instanceVariableNames:'fullName pool poolIndex'
|
1
|
3 |
classVariableNames:''
|
|
4 |
poolDictionaries:''
|
|
5 |
category:'Java-Reader-Support'
|
|
6 |
!
|
|
7 |
|
|
8 |
|
|
9 |
!JavaUnresolvedClassConstant class methodsFor:'instance creation'!
|
|
10 |
|
21
|
11 |
nameIndex:index pool:aConstantPool slotIndex:slotIndex
|
|
12 |
^ self new index:index pool:aConstantPool slotIndex:slotIndex
|
|
13 |
! !
|
|
14 |
|
|
15 |
!JavaUnresolvedClassConstant methodsFor:'accessing'!
|
|
16 |
|
|
17 |
fullName
|
|
18 |
^ fullName
|
|
19 |
|
|
20 |
!
|
|
21 |
|
|
22 |
index:index pool:aConstantPool slotIndex:slotIndex
|
|
23 |
super index:index.
|
|
24 |
pool := aConstantPool.
|
|
25 |
poolIndex := slotIndex.
|
|
26 |
|
1
|
27 |
! !
|
|
28 |
|
41
|
29 |
!JavaUnresolvedClassConstant methodsFor:'printing & storing'!
|
|
30 |
|
|
31 |
displayString
|
|
32 |
^ 'Unresolved(' , (fullName copy replaceAll:$/ by:$.) , ')'
|
|
33 |
! !
|
|
34 |
|
1
|
35 |
!JavaUnresolvedClassConstant methodsFor:'resolving'!
|
|
36 |
|
21
|
37 |
resolve
|
50
|
38 |
|cls|
|
|
39 |
|
|
40 |
cls := Java classNamed:fullName.
|
|
41 |
cls isNil ifTrue:[^ self].
|
|
42 |
|
|
43 |
pool notNil ifTrue:[
|
|
44 |
pool at:poolIndex put:cls
|
|
45 |
].
|
|
46 |
^ cls
|
21
|
47 |
|
|
48 |
"Created: 15.4.1996 / 15:51:42 / cg"
|
|
49 |
"Modified: 15.4.1996 / 16:26:05 / cg"
|
|
50 |
!
|
|
51 |
|
1
|
52 |
resolveFrom:aConstantTable
|
21
|
53 |
|cls|
|
1
|
54 |
|
21
|
55 |
|
|
56 |
fullName := self class resolve:(aConstantTable at:index) from:aConstantTable.
|
32
|
57 |
cls := Java classNamed:fullName.
|
21
|
58 |
cls notNil ifTrue:[
|
|
59 |
^ cls
|
|
60 |
].
|
|
61 |
Java rememberUnresolved:self.
|
|
62 |
^ self
|
|
63 |
"/ ^ JavaClass fullName:fullName
|
1
|
64 |
|
|
65 |
"Created: 15.4.1996 / 15:51:42 / cg"
|
|
66 |
"Modified: 15.4.1996 / 16:26:05 / cg"
|
|
67 |
! !
|
|
68 |
|
|
69 |
!JavaUnresolvedClassConstant class methodsFor:'documentation'!
|
|
70 |
|
|
71 |
version
|
50
|
72 |
^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaUnresolvedClassConstant.st,v 1.8 1996/05/06 10:07:09 cg Exp $'
|
1
|
73 |
! !
|