454
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
|
|
14 |
|
713
|
15 |
"{ Package: 'stx:libjava' }"
|
|
16 |
|
1
|
17 |
Object subclass:#JavaRef
|
|
18 |
instanceVariableNames:'class nameandType'
|
|
19 |
classVariableNames:''
|
|
20 |
poolDictionaries:''
|
713
|
21 |
category:'Languages-Java-Reader-Support'
|
1
|
22 |
!
|
|
23 |
|
454
|
24 |
!JavaRef class methodsFor:'documentation'!
|
|
25 |
|
|
26 |
copyright
|
|
27 |
"
|
|
28 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
29 |
All Rights Reserved
|
|
30 |
|
|
31 |
This software is furnished under a license and may be used
|
|
32 |
only in accordance with the terms of that license and with the
|
|
33 |
inclusion of the above copyright notice. This software may not
|
|
34 |
be provided or otherwise made available to, or used by, any
|
|
35 |
other person. No title to or ownership of the software is
|
|
36 |
hereby transferred.
|
|
37 |
"
|
|
38 |
|
|
39 |
|
|
40 |
! !
|
1
|
41 |
|
135
|
42 |
!JavaRef class methodsFor:'instance creation'!
|
1
|
43 |
|
|
44 |
class:aJavaClass nameandType:nameAndType
|
|
45 |
^ self new class:aJavaClass nameandType:nameAndType
|
|
46 |
|
|
47 |
"Created: 15.4.1996 / 16:10:49 / cg"
|
|
48 |
! !
|
|
49 |
|
151
|
50 |
!JavaRef class methodsFor:'validation'!
|
|
51 |
|
|
52 |
validateAll
|
|
53 |
self allSubInstancesDo:[:ref |
|
|
54 |
ref validateClass
|
|
55 |
]
|
|
56 |
|
|
57 |
"
|
|
58 |
self validateAll
|
|
59 |
"
|
|
60 |
|
|
61 |
"Created: 20.3.1997 / 00:13:55 / cg"
|
|
62 |
"Modified: 20.3.1997 / 00:14:24 / cg"
|
|
63 |
! !
|
|
64 |
|
1
|
65 |
!JavaRef methodsFor:'accessing'!
|
|
66 |
|
|
67 |
class:aJavaClass nameandType:aJavanameAndType
|
|
68 |
class := aJavaClass.
|
87
|
69 |
nameandType := aJavanameAndType.
|
|
70 |
class isNil ifTrue:[self halt].
|
|
71 |
|
1
|
72 |
|
|
73 |
"Modified: 15.4.1996 / 16:08:39 / cg"
|
|
74 |
"Created: 15.4.1996 / 16:10:37 / cg"
|
43
|
75 |
!
|
|
76 |
|
|
77 |
javaClass
|
|
78 |
^ class
|
386
|
79 |
!
|
|
80 |
|
|
81 |
nameandType
|
|
82 |
^ nameandType
|
|
83 |
|
|
84 |
"Created: / 15.10.1998 / 23:50:44 / cg"
|
1
|
85 |
! !
|
|
86 |
|
|
87 |
!JavaRef methodsFor:'printing & storing'!
|
|
88 |
|
|
89 |
displayString
|
168
|
90 |
|clsName|
|
|
91 |
|
|
92 |
class isJavaClass ifTrue:[
|
|
93 |
clsName := class fullName
|
|
94 |
] ifFalse:[
|
|
95 |
clsName := class name
|
|
96 |
].
|
|
97 |
^ self class name , '(class:' , clsName , ' ; name&type: ' , nameandType displayString , ')'
|
1
|
98 |
|
|
99 |
"Created: 15.4.1996 / 16:18:54 / cg"
|
168
|
100 |
"Modified: 7.4.1997 / 13:43:29 / cg"
|
1
|
101 |
! !
|
|
102 |
|
90
|
103 |
!JavaRef methodsFor:'queries'!
|
|
104 |
|
|
105 |
isUnresolved
|
|
106 |
^ false
|
|
107 |
|
|
108 |
|
|
109 |
! !
|
|
110 |
|
203
|
111 |
!JavaRef methodsFor:'special'!
|
|
112 |
|
|
113 |
updateClassRefsFrom:oldClass to:newClass
|
|
114 |
class == oldClass ifTrue:[
|
313
|
115 |
newClass isNil ifTrue:[
|
|
116 |
class := JavaUnresolvedClassConstant fullName:(class fullName)
|
|
117 |
] ifFalse:[
|
|
118 |
class := newClass
|
|
119 |
]
|
206
|
120 |
] ifFalse:[
|
|
121 |
class isJavaClass ifTrue:[
|
|
122 |
class fullName = oldClass fullName ifTrue:[
|
|
123 |
'JAVA: class update by name.' infoPrintCR.
|
|
124 |
class := newClass
|
|
125 |
]
|
|
126 |
]
|
203
|
127 |
]
|
|
128 |
|
313
|
129 |
"Created: / 7.8.1997 / 15:01:09 / cg"
|
|
130 |
"Modified: / 4.2.1998 / 22:19:23 / cg"
|
203
|
131 |
! !
|
|
132 |
|
151
|
133 |
!JavaRef methodsFor:'validation'!
|
|
134 |
|
|
135 |
validateClass
|
|
136 |
|actualClass|
|
|
137 |
|
|
138 |
class notNil ifTrue:[
|
|
139 |
class isJavaClass ifTrue:[
|
|
140 |
class ~~ (actualClass := Java at:(class fullName)) ifTrue:[
|
|
141 |
Transcript showCR:'updated ref to: ' , class fullName.
|
|
142 |
class := actualClass
|
|
143 |
]
|
|
144 |
]
|
|
145 |
].
|
|
146 |
|
|
147 |
"Created: 20.3.1997 / 00:13:27 / cg"
|
|
148 |
"Modified: 20.3.1997 / 00:16:54 / cg"
|
|
149 |
! !
|
|
150 |
|
135
|
151 |
!JavaRef class methodsFor:'documentation'!
|
1
|
152 |
|
|
153 |
version
|
2108
|
154 |
^ '$Header: /cvs/stx/stx/libjava/Attic/JavaRef.st,v 1.19 2002-11-22 20:11:46 cg Exp $'
|
1
|
155 |
! !
|