1
|
1 |
JavaUnresolvedRefConstant subclass:#JavaUnresolvedFieldrefConstant
|
90
|
2 |
instanceVariableNames:'classIndex'
|
1
|
3 |
classVariableNames:''
|
|
4 |
poolDictionaries:''
|
|
5 |
category:'Java-Reader-Support'
|
|
6 |
!
|
|
7 |
|
|
8 |
|
135
|
9 |
!JavaUnresolvedFieldrefConstant class methodsFor:'instance creation'!
|
90
|
10 |
|
|
11 |
pool:aPool poolIndex:idx classIndex:cIdx nameandTypeIndex:nmIdx
|
|
12 |
^ self new
|
|
13 |
pool:aPool poolIndex:idx classIndex:cIdx nameandTypeIndex:nmIdx
|
|
14 |
|
|
15 |
|
|
16 |
! !
|
|
17 |
|
|
18 |
!JavaUnresolvedFieldrefConstant methodsFor:'accessing'!
|
|
19 |
|
163
|
20 |
name
|
|
21 |
|ref cls nameAndType|
|
|
22 |
|
|
23 |
self isUnresolved ifTrue:[
|
|
24 |
ref := self preResolve.
|
|
25 |
ref isUnresolved ifFalse:[
|
|
26 |
^ ref name
|
|
27 |
].
|
|
28 |
nameAndType := (constantPool at:nameandTypeIndex).
|
|
29 |
nameAndType isUnresolved ifTrue:[
|
|
30 |
nameAndType displayString printCR.
|
|
31 |
].
|
|
32 |
^ nameAndType name
|
|
33 |
].
|
|
34 |
('unresolved type: ' , self displayString) printCR.
|
|
35 |
^ self
|
|
36 |
|
|
37 |
"Modified: 24.3.1997 / 13:02:56 / cg"
|
|
38 |
"Created: 24.3.1997 / 13:09:26 / cg"
|
|
39 |
!
|
|
40 |
|
90
|
41 |
pool:aPool poolIndex:slotIndex classIndex:cIdx nameandTypeIndex:nmIdx
|
|
42 |
constantPool := aPool.
|
|
43 |
constantPoolIndex := slotIndex.
|
|
44 |
classIndex := cIdx.
|
|
45 |
nameandTypeIndex := nmIdx
|
|
46 |
|
|
47 |
|
|
48 |
|
163
|
49 |
!
|
|
50 |
|
|
51 |
type
|
|
52 |
|ref cls nameAndType|
|
|
53 |
|
|
54 |
self isUnresolved ifTrue:[
|
|
55 |
ref := self preResolve.
|
|
56 |
ref isUnresolved ifFalse:[
|
|
57 |
^ ref type
|
|
58 |
].
|
|
59 |
nameAndType := (constantPool at:nameandTypeIndex).
|
|
60 |
nameAndType isUnresolved ifTrue:[
|
|
61 |
nameAndType displayString printCR.
|
|
62 |
].
|
255
|
63 |
^ JavaMethod typeFromSignature:nameAndType signature in:nil.
|
163
|
64 |
].
|
|
65 |
('unresolved type: ' , self displayString) printCR.
|
|
66 |
^ self
|
|
67 |
|
255
|
68 |
"Modified: / 8.1.1998 / 19:14:05 / cg"
|
90
|
69 |
! !
|
|
70 |
|
1
|
71 |
!JavaUnresolvedFieldrefConstant methodsFor:'resolving'!
|
|
72 |
|
90
|
73 |
preResolve
|
|
74 |
|className class nameAndType ref|
|
|
75 |
|
|
76 |
class := (constantPool at:classIndex).
|
|
77 |
class isUnresolved ifTrue:[
|
|
78 |
class := class preResolve.
|
|
79 |
].
|
|
80 |
class isUnresolved ifFalse:[
|
|
81 |
nameAndType := (constantPool at:nameandTypeIndex).
|
|
82 |
nameAndType isUnresolved ifTrue:[
|
|
83 |
nameAndType := nameAndType preResolve.
|
|
84 |
].
|
|
85 |
nameAndType isUnresolved ifFalse:[
|
|
86 |
"/ good - class is there
|
|
87 |
|
|
88 |
ref := JavaFieldref class:class nameandType:nameAndType.
|
|
89 |
constantPool at:constantPoolIndex put:ref.
|
|
90 |
^ ref
|
|
91 |
]
|
|
92 |
].
|
|
93 |
|
|
94 |
self rememberForResolveWith:(class fullName).
|
|
95 |
^ self
|
|
96 |
|
|
97 |
"Created: 15.4.1996 / 16:05:50 / cg"
|
|
98 |
"Modified: 15.4.1996 / 16:26:44 / cg"
|
|
99 |
! !
|
|
100 |
|
135
|
101 |
!JavaUnresolvedFieldrefConstant class methodsFor:'documentation'!
|
1
|
102 |
|
|
103 |
version
|
264
|
104 |
^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaUnresolvedFieldrefConstant.st,v 1.10 1998/01/17 14:43:17 cg Exp $'
|
1
|
105 |
! !
|