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 |
|
1
|
15 |
Object subclass:#JavaNameandType
|
|
16 |
instanceVariableNames:'name signature'
|
90
|
17 |
classVariableNames:'KnownNamesAndTypes'
|
1
|
18 |
poolDictionaries:''
|
4
|
19 |
category:'Java-Reader-Support'
|
1
|
20 |
!
|
|
21 |
|
454
|
22 |
!JavaNameandType class methodsFor:'documentation'!
|
|
23 |
|
|
24 |
copyright
|
|
25 |
"
|
|
26 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
27 |
All Rights Reserved
|
|
28 |
|
|
29 |
This software is furnished under a license and may be used
|
|
30 |
only in accordance with the terms of that license and with the
|
|
31 |
inclusion of the above copyright notice. This software may not
|
|
32 |
be provided or otherwise made available to, or used by, any
|
|
33 |
other person. No title to or ownership of the software is
|
|
34 |
hereby transferred.
|
|
35 |
"
|
|
36 |
|
|
37 |
|
|
38 |
! !
|
1
|
39 |
|
135
|
40 |
!JavaNameandType class methodsFor:'instance creation'!
|
1
|
41 |
|
|
42 |
name:aString signature:signature
|
356
|
43 |
|idx nt|
|
1
|
44 |
|
356
|
45 |
"/ KnownNamesAndTypes notNil ifTrue:[
|
|
46 |
"/ idx := KnownNamesAndTypes findFirst:[:nt | nt signature == signature and:[nt name = aString]].
|
|
47 |
"/ idx ~~ 0 ifTrue:[
|
|
48 |
"/ nt := KnownNamesAndTypes at:idx.
|
|
49 |
"/ (nt ~~ 0 and:[nt notNil]) ifTrue:[
|
|
50 |
"/ ^ nt
|
|
51 |
"/ ]
|
|
52 |
"/ ]
|
|
53 |
"/ ].
|
|
54 |
nt := self new name:aString signature:signature.
|
|
55 |
"/ KnownNamesAndTypes isNil ifTrue:[
|
|
56 |
"/ KnownNamesAndTypes := WeakIdentitySet new.
|
|
57 |
"/ ].
|
|
58 |
"/ KnownNamesAndTypes add:nt.
|
|
59 |
^ nt
|
|
60 |
|
|
61 |
"Created: / 15.4.1996 / 16:17:14 / cg"
|
|
62 |
"Modified: / 16.5.1998 / 02:59:54 / cg"
|
1
|
63 |
! !
|
|
64 |
|
|
65 |
!JavaNameandType methodsFor:'accessing'!
|
|
66 |
|
27
|
67 |
name
|
|
68 |
^ name
|
|
69 |
|
|
70 |
"Created: 15.4.1996 / 16:16:47 / cg"
|
|
71 |
!
|
|
72 |
|
1
|
73 |
name:aString signature:aSignature
|
90
|
74 |
name := aString asSymbol.
|
|
75 |
signature := aSignature asSymbol
|
1
|
76 |
|
|
77 |
"Created: 15.4.1996 / 16:16:47 / cg"
|
27
|
78 |
!
|
|
79 |
|
|
80 |
signature
|
|
81 |
^ signature
|
|
82 |
|
|
83 |
"Created: 15.4.1996 / 16:16:47 / cg"
|
1
|
84 |
! !
|
|
85 |
|
244
|
86 |
!JavaNameandType methodsFor:'comparing'!
|
|
87 |
|
|
88 |
= aNameandType
|
|
89 |
name ~= aNameandType name ifTrue:[^ false].
|
|
90 |
^ signature = aNameandType signature
|
|
91 |
|
|
92 |
"Created: 19.8.1997 / 13:58:29 / cg"
|
|
93 |
!
|
|
94 |
|
|
95 |
hash
|
|
96 |
^ name hash bitXor:signature hash
|
|
97 |
|
|
98 |
"Created: 19.8.1997 / 13:59:03 / cg"
|
|
99 |
! !
|
|
100 |
|
1
|
101 |
!JavaNameandType methodsFor:'printing & storing'!
|
|
102 |
|
|
103 |
displayString
|
90
|
104 |
^ self class name , '(name:' , name displayString, ' signature:' , signature displayString , ')'
|
1
|
105 |
|
|
106 |
"Created: 15.4.1996 / 16:32:40 / cg"
|
|
107 |
! !
|
|
108 |
|
90
|
109 |
!JavaNameandType methodsFor:'queries'!
|
|
110 |
|
619
|
111 |
isJavaMethodRef
|
|
112 |
^ false
|
|
113 |
|
|
114 |
"Created: / 9.11.1999 / 15:50:01 / cg"
|
|
115 |
!
|
|
116 |
|
90
|
117 |
isUnresolved
|
|
118 |
^ false
|
|
119 |
|
|
120 |
|
|
121 |
! !
|
|
122 |
|
203
|
123 |
!JavaNameandType methodsFor:'special'!
|
|
124 |
|
|
125 |
updateClassRefsFrom:oldClass to:newClass
|
|
126 |
"/ nothing done here
|
|
127 |
|
|
128 |
"Created: 7.8.1997 / 15:12:25 / cg"
|
|
129 |
! !
|
|
130 |
|
135
|
131 |
!JavaNameandType class methodsFor:'documentation'!
|
1
|
132 |
|
|
133 |
version
|
619
|
134 |
^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaNameandType.st,v 1.10 1999/11/09 14:55:00 cg Exp $'
|
1
|
135 |
! !
|