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:#JavaNameandType
|
|
18 |
instanceVariableNames:'name signature'
|
90
|
19 |
classVariableNames:'KnownNamesAndTypes'
|
1
|
20 |
poolDictionaries:''
|
713
|
21 |
category:'Languages-Java-Reader-Support'
|
1
|
22 |
!
|
|
23 |
|
454
|
24 |
!JavaNameandType 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 |
!JavaNameandType class methodsFor:'instance creation'!
|
1
|
43 |
|
|
44 |
name:aString signature:signature
|
356
|
45 |
|idx nt|
|
1
|
46 |
|
356
|
47 |
"/ KnownNamesAndTypes notNil ifTrue:[
|
|
48 |
"/ idx := KnownNamesAndTypes findFirst:[:nt | nt signature == signature and:[nt name = aString]].
|
|
49 |
"/ idx ~~ 0 ifTrue:[
|
|
50 |
"/ nt := KnownNamesAndTypes at:idx.
|
|
51 |
"/ (nt ~~ 0 and:[nt notNil]) ifTrue:[
|
|
52 |
"/ ^ nt
|
|
53 |
"/ ]
|
|
54 |
"/ ]
|
|
55 |
"/ ].
|
|
56 |
nt := self new name:aString signature:signature.
|
|
57 |
"/ KnownNamesAndTypes isNil ifTrue:[
|
|
58 |
"/ KnownNamesAndTypes := WeakIdentitySet new.
|
|
59 |
"/ ].
|
|
60 |
"/ KnownNamesAndTypes add:nt.
|
|
61 |
^ nt
|
|
62 |
|
|
63 |
"Created: / 15.4.1996 / 16:17:14 / cg"
|
|
64 |
"Modified: / 16.5.1998 / 02:59:54 / cg"
|
1
|
65 |
! !
|
|
66 |
|
|
67 |
!JavaNameandType methodsFor:'accessing'!
|
|
68 |
|
27
|
69 |
name
|
|
70 |
^ name
|
|
71 |
|
|
72 |
"Created: 15.4.1996 / 16:16:47 / cg"
|
|
73 |
!
|
|
74 |
|
1
|
75 |
name:aString signature:aSignature
|
90
|
76 |
name := aString asSymbol.
|
|
77 |
signature := aSignature asSymbol
|
1
|
78 |
|
|
79 |
"Created: 15.4.1996 / 16:16:47 / cg"
|
27
|
80 |
!
|
|
81 |
|
|
82 |
signature
|
|
83 |
^ signature
|
|
84 |
|
|
85 |
"Created: 15.4.1996 / 16:16:47 / cg"
|
1
|
86 |
! !
|
|
87 |
|
244
|
88 |
!JavaNameandType methodsFor:'comparing'!
|
|
89 |
|
|
90 |
= aNameandType
|
|
91 |
name ~= aNameandType name ifTrue:[^ false].
|
|
92 |
^ signature = aNameandType signature
|
|
93 |
|
|
94 |
"Created: 19.8.1997 / 13:58:29 / cg"
|
|
95 |
!
|
|
96 |
|
|
97 |
hash
|
|
98 |
^ name hash bitXor:signature hash
|
|
99 |
|
|
100 |
"Created: 19.8.1997 / 13:59:03 / cg"
|
|
101 |
! !
|
|
102 |
|
1
|
103 |
!JavaNameandType methodsFor:'printing & storing'!
|
|
104 |
|
|
105 |
displayString
|
90
|
106 |
^ self class name , '(name:' , name displayString, ' signature:' , signature displayString , ')'
|
1
|
107 |
|
|
108 |
"Created: 15.4.1996 / 16:32:40 / cg"
|
|
109 |
! !
|
|
110 |
|
90
|
111 |
!JavaNameandType methodsFor:'queries'!
|
|
112 |
|
625
|
113 |
isJavaClassRef
|
|
114 |
^ false
|
|
115 |
|
|
116 |
"Created: / 9.11.1999 / 17:13:22 / cg"
|
|
117 |
"Modified: / 9.11.1999 / 17:13:45 / cg"
|
|
118 |
!
|
|
119 |
|
619
|
120 |
isJavaMethodRef
|
|
121 |
^ false
|
|
122 |
|
|
123 |
"Created: / 9.11.1999 / 15:50:01 / cg"
|
|
124 |
!
|
|
125 |
|
90
|
126 |
isUnresolved
|
|
127 |
^ false
|
|
128 |
|
|
129 |
|
|
130 |
! !
|
|
131 |
|
203
|
132 |
!JavaNameandType methodsFor:'special'!
|
|
133 |
|
|
134 |
updateClassRefsFrom:oldClass to:newClass
|
|
135 |
"/ nothing done here
|
|
136 |
|
|
137 |
"Created: 7.8.1997 / 15:12:25 / cg"
|
|
138 |
! !
|
|
139 |
|
135
|
140 |
!JavaNameandType class methodsFor:'documentation'!
|
1
|
141 |
|
|
142 |
version
|
2108
|
143 |
^ '$Header: /cvs/stx/stx/libjava/Attic/JavaNameandType.st,v 1.12 2002-11-22 20:11:50 cg Exp $'
|
1
|
144 |
! !
|