author | vranyj1 |
Sun, 30 Oct 2011 22:38:19 +0000 | |
branch | jk_new_structure |
changeset 1063 | 380dfb73097a |
parent 1021 | 8ae6c261878a |
child 1068 | 508b924b7499 |
permissions | -rw-r--r-- |
877 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
3 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
|
4 |
SWING Research Group, Czech Technical University in Prague |
|
5 |
||
6 |
Parts of the code written by Claus Gittinger are under following |
|
7 |
license: |
|
8 |
||
9 |
This software is furnished under a license and may be used |
|
10 |
only in accordance with the terms of that license and with the |
|
11 |
inclusion of the above copyright notice. This software may not |
|
12 |
be provided or otherwise made available to, or used by, any |
|
13 |
other person. No title to or ownership of the software is |
|
14 |
hereby transferred. |
|
15 |
||
16 |
Parts of the code written at SWING Reasearch Group [1] are MIT licensed: |
|
17 |
||
18 |
Permission is hereby granted, free of charge, to any person |
|
19 |
obtaining a copy of this software and associated documentation |
|
20 |
files (the 'Software'), to deal in the Software without |
|
21 |
restriction, including without limitation the rights to use, |
|
22 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
23 |
copies of the Software, and to permit persons to whom the |
|
24 |
Software is furnished to do so, subject to the following |
|
25 |
conditions: |
|
26 |
||
27 |
The above copyright notice and this permission notice shall be |
|
28 |
included in all copies or substantial portions of the Software. |
|
29 |
||
30 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
31 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
32 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
33 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
34 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
35 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
36 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
37 |
OTHER DEALINGS IN THE SOFTWARE. |
|
38 |
||
39 |
[1] Code written at SWING Research Group contain a signature |
|
40 |
of one of the above copright owners. |
|
41 |
" |
|
752 | 42 |
"{ Package: 'stx:libjava' }" |
43 |
||
44 |
Object subclass:#JavaDescriptor |
|
45 |
instanceVariableNames:'' |
|
46 |
classVariableNames:'BaseTypes BaseTypesByTypeName ArrayTypes' |
|
47 |
poolDictionaries:'' |
|
48 |
category:'Languages-Java-Support' |
|
49 |
! |
|
50 |
||
877 | 51 |
!JavaDescriptor class methodsFor:'documentation'! |
52 |
||
53 |
copyright |
|
54 |
" |
|
55 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
56 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
|
57 |
SWING Research Group, Czech Technical University in Prague |
|
58 |
||
59 |
Parts of the code written by Claus Gittinger are under following |
|
60 |
license: |
|
61 |
||
62 |
This software is furnished under a license and may be used |
|
63 |
only in accordance with the terms of that license and with the |
|
64 |
inclusion of the above copyright notice. This software may not |
|
65 |
be provided or otherwise made available to, or used by, any |
|
66 |
other person. No title to or ownership of the software is |
|
67 |
hereby transferred. |
|
68 |
||
69 |
Parts of the code written at SWING Reasearch Group [1] are MIT licensed: |
|
70 |
||
71 |
Permission is hereby granted, free of charge, to any person |
|
72 |
obtaining a copy of this software and associated documentation |
|
73 |
files (the 'Software'), to deal in the Software without |
|
74 |
restriction, including without limitation the rights to use, |
|
75 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
76 |
copies of the Software, and to permit persons to whom the |
|
77 |
Software is furnished to do so, subject to the following |
|
78 |
conditions: |
|
79 |
||
80 |
The above copyright notice and this permission notice shall be |
|
81 |
included in all copies or substantial portions of the Software. |
|
82 |
||
83 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
84 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
85 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
86 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
87 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
88 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
89 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
90 |
OTHER DEALINGS IN THE SOFTWARE. |
|
91 |
||
92 |
[1] Code written at SWING Research Group contain a signature |
|
93 |
of one of the above copright owners. |
|
94 |
||
95 |
" |
|
96 |
! ! |
|
752 | 97 |
|
98 |
!JavaDescriptor class methodsFor:'instance creation'! |
|
99 |
||
100 |
fromString: aString |
|
101 |
||
102 |
^self readFromString: aString |
|
103 |
||
104 |
"Created: / 25-11-2010 / 18:20:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
105 |
! |
|
106 |
||
107 |
readFrom: aStream |
|
108 |
||
109 |
^ self |
|
110 |
readFrom:aStream |
|
111 |
onError:[ self conversionErrorSignal |
|
112 |
raiseErrorString:'invalid java descriptor'] |
|
113 |
||
114 |
"Created: / 25-11-2010 / 18:04:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
115 |
! |
|
116 |
||
117 |
readFrom:stream onError:exceptionBlock |
|
118 |
||
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
119 |
(stream peek == $( or:[stream peek == $<]) |
752 | 120 |
ifTrue: [^self readMethodDescriptorFrom: stream onError: exceptionBlock] |
121 |
ifFalse:[^self readFieldDescriptorFrom: stream onError: exceptionBlock]. |
|
122 |
||
123 |
" |
|
124 |
JavaDescriptor fromString:'Ljava/lang/Object;' |
|
125 |
JavaDescriptor fromString:'[I' |
|
126 |
JavaDescriptor fromString:'[[I' |
|
127 |
JavaDescriptor fromString:'(ILjava/lang/Object;)V' |
|
128 |
JavaDescriptor fromString:'(ILjava/lang/Object;)Ljava/lang/Class;' |
|
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
129 |
JavaDescriptor fromString:'<T:Ljava/lang/Object;>(Ljava/util/Collection<TT;>;I)Ljava/util/Collection<TT;>;' |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
130 |
|
752 | 131 |
" |
132 |
||
133 |
"Created: / 25-11-2010 / 17:50:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
134 |
"Modified: / 13-08-2011 / 01:37:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
752 | 135 |
! ! |
136 |
||
137 |
!JavaDescriptor class methodsFor:'accessing'! |
|
138 |
||
812
62e917825364
- JavaDescriptor, JavaResolver, JavaArray: fixes for primitive and array types
vranyj1
parents:
752
diff
changeset
|
139 |
baseTypes |
62e917825364
- JavaDescriptor, JavaResolver, JavaArray: fixes for primitive and array types
vranyj1
parents:
752
diff
changeset
|
140 |
|
62e917825364
- JavaDescriptor, JavaResolver, JavaArray: fixes for primitive and array types
vranyj1
parents:
752
diff
changeset
|
141 |
^BaseTypes |
62e917825364
- JavaDescriptor, JavaResolver, JavaArray: fixes for primitive and array types
vranyj1
parents:
752
diff
changeset
|
142 |
|
62e917825364
- JavaDescriptor, JavaResolver, JavaArray: fixes for primitive and array types
vranyj1
parents:
752
diff
changeset
|
143 |
"Created: / 22-05-2011 / 17:45:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
62e917825364
- JavaDescriptor, JavaResolver, JavaArray: fixes for primitive and array types
vranyj1
parents:
752
diff
changeset
|
144 |
! |
62e917825364
- JavaDescriptor, JavaResolver, JavaArray: fixes for primitive and array types
vranyj1
parents:
752
diff
changeset
|
145 |
|
752 | 146 |
baseTypesByTypeName |
147 |
||
148 |
^BaseTypesByTypeName |
|
149 |
||
150 |
"Created: / 03-02-2011 / 21:08:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
151 |
! ! |
|
152 |
||
153 |
!JavaDescriptor class methodsFor:'class initialization'! |
|
154 |
||
155 |
initialize |
|
156 |
||
157 |
" |
|
880
a9171dcee2b0
Fix in sun.reflect.NativeMethodAccessorImpl.invoke0(): unboxes
vranyj1
parents:
877
diff
changeset
|
158 |
Tools::NewSystemBrowser basicNew spawnClassBrowserFor: BaseTypes values label:'Java primitive types' in:#newBrowser |
752 | 159 |
" |
160 |
||
873
933263bd2d27
Fixes for primitive array types (uses Signed* variant of an array)
vranyj1
parents:
866
diff
changeset
|
161 |
"/WARNING: If you change something here, you MUST also |
933263bd2d27
Fixes for primitive array types (uses Signed* variant of an array)
vranyj1
parents:
866
diff
changeset
|
162 |
"/ change JavaField class>>#initialize !!!!!! |
752 | 163 |
BaseTypes := IdentityDictionary new |
164 |
at: $B put: Byte; |
|
165 |
at: $C put: Character; |
|
166 |
at: $D put: Float; |
|
167 |
at: $F put: ShortFloat; |
|
168 |
at: $I put: Integer; "Kludge: instances of java int are in fact SmallIntegers" |
|
169 |
at: $J put: LargeInteger; |
|
170 |
at: $S put: Short; |
|
171 |
at: $Z put: Boolean; |
|
172 |
at: $V put: UndefinedObject; |
|
173 |
yourself. |
|
174 |
||
175 |
BaseTypesByTypeName := Dictionary new |
|
176 |
at: 'byte' put: Byte; |
|
177 |
at: 'char' put: Character; |
|
178 |
at: 'double' put: Float; |
|
179 |
at: 'float' put: ShortFloat; |
|
180 |
at: 'int' put: Integer; "Kludge: instances of java int are in fact SmallIntegers" |
|
181 |
at: 'long' put: LargeInteger; |
|
182 |
at: 'short' put: Short; |
|
183 |
at: 'boolean' put: Boolean; |
|
184 |
at: 'void' put: UndefinedObject; |
|
185 |
yourself. |
|
186 |
||
187 |
" |
|
880
a9171dcee2b0
Fix in sun.reflect.NativeMethodAccessorImpl.invoke0(): unboxes
vranyj1
parents:
877
diff
changeset
|
188 |
Tools::NewSystemBrowser basicNew spawnClassBrowserFor: ArrayTypes values label:'Java primitive array types' in:#newBrowser |
752 | 189 |
" |
190 |
||
873
933263bd2d27
Fixes for primitive array types (uses Signed* variant of an array)
vranyj1
parents:
866
diff
changeset
|
191 |
"/WARNING: If you change something here, you MUST also |
933263bd2d27
Fixes for primitive array types (uses Signed* variant of an array)
vranyj1
parents:
866
diff
changeset
|
192 |
"/ change JavaField class>>#initialize !!!!!! |
933263bd2d27
Fixes for primitive array types (uses Signed* variant of an array)
vranyj1
parents:
866
diff
changeset
|
193 |
|
752 | 194 |
ArrayTypes := IdentityDictionary new |
195 |
at: $B put: ByteArray; |
|
900 | 196 |
at: $C put: Unicode16String; |
752 | 197 |
at: $D put: DoubleArray; |
198 |
at: $F put: FloatArray; |
|
866 | 199 |
at: $I put: SignedIntegerArray; |
200 |
at: $J put: SignedLongIntegerArray; |
|
752 | 201 |
at: $S put: WordArray; |
202 |
at: $Z put: BooleanArray; |
|
203 |
yourself |
|
204 |
||
205 |
"Created: / 25-11-2010 / 17:51:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
900 | 206 |
"Modified: / 10-08-2011 / 00:48:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
752 | 207 |
! ! |
208 |
||
1021
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
209 |
!JavaDescriptor class methodsFor:'queries'! |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
210 |
|
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
211 |
isJavaPrimitiveArrayName: className |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
212 |
| justTypeSymbol | |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
213 |
|
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
214 |
(className startsWith: $[) ifTrue: [ |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
215 |
justTypeSymbol := className copyFrom: ((className lastIndexOf: $[) + 1) |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
216 |
to: className size |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
217 |
] ifFalse: [ ^ false ]. |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
218 |
^( justTypeSymbol size = 1 ) |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
219 |
and: [BaseTypes includesKey: justTypeSymbol first]. |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
220 |
! ! |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
221 |
|
752 | 222 |
!JavaDescriptor class methodsFor:'reading-private'! |
223 |
||
1021
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
224 |
readArrayTypeFrom: stream onError: exceptionBlock |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
225 |
| p c | |
752 | 226 |
|
227 |
stream next. "eat $[" |
|
228 |
p := stream peek. |
|
1021
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
229 |
"byte" "char" "double" "float" "int" "long" "short" "boolean" (#( $B |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
230 |
$C |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
231 |
$D |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
232 |
$F |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
233 |
$I |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
234 |
$J |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
235 |
$S |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
236 |
$Z ) includes: p) ifTrue: [ |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
237 |
^ JavaFieldDescriptor javaClass: (ArrayTypes at: stream next) |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
238 |
]. |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
239 |
"OK, not a primitive array..." |
752 | 240 |
c := self readFrom: stream onError: exceptionBlock. |
1021
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
241 |
^ JavaFieldDescriptor javaClass: (JavaVM javaArrayClassFor: c javaClass) |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
242 |
"Created: / 25-11-2010 / 18:12:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8ae6c261878a
changed class loaders order, loading of primitive arrays, refactoring coming soon..
hlopkmar
parents:
912
diff
changeset
|
243 |
"Modified: / 06-02-2011 / 23:15:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
752 | 244 |
! |
245 |
||
246 |
readBaseTypeFrom: stream onError: exceptionBlock |
|
247 |
||
248 |
^JavaFieldDescriptor javaClass: (BaseTypes at: (stream next) ifAbsent: exceptionBlock) |
|
249 |
||
250 |
"Created: / 25-11-2010 / 18:11:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
251 |
! |
|
252 |
||
253 |
readFieldDescriptorFrom: stream onError: exceptionBlock |
|
254 |
||
255 |
| p | |
|
256 |
p := stream peek. |
|
257 |
||
258 |
p == $L ifTrue:[^self readObjectTypeFrom: stream onError: exceptionBlock]. |
|
259 |
p == $[ ifTrue:[^self readArrayTypeFrom: stream onError: exceptionBlock]. |
|
260 |
(#( |
|
261 |
$B "byte" |
|
262 |
$C "char" |
|
263 |
$D "double" |
|
264 |
$F "float" |
|
265 |
$I "int" |
|
266 |
$J "long" |
|
267 |
$S "short" |
|
268 |
$Z "boolean" |
|
269 |
$V "void" |
|
270 |
) includes: p) ifTrue:[^self readBaseTypeFrom: stream onError: exceptionBlock]. |
|
271 |
||
272 |
exceptionBlock value |
|
273 |
||
274 |
"Created: / 25-11-2010 / 17:55:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
275 |
"Modified: / 21-12-2010 / 22:47:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
276 |
! |
|
277 |
||
278 |
readMethodDescriptorFrom: stream onError: exceptionBlock |
|
279 |
||
280 |
| parameterDescriptors returnDescriptor | |
|
281 |
||
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
282 |
stream peek == $< ifTrue:[ |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
283 |
self readTypeVariableFrom: stream onError: exceptionBlock |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
284 |
]. |
752 | 285 |
stream next. "eat $(" |
286 |
parameterDescriptors := OrderedCollection new. |
|
287 |
[ stream peek ~= $) ] whileTrue:[ |
|
288 |
parameterDescriptors add:( self readFieldDescriptorFrom: stream onError: exceptionBlock). |
|
289 |
]. |
|
290 |
stream next. "eat $)" |
|
291 |
stream peek == $V ifFalse:[ |
|
292 |
returnDescriptor := self readFieldDescriptorFrom: stream onError: exceptionBlock. |
|
293 |
] ifTrue:[ |
|
294 |
stream next. "eat $V" |
|
295 |
]. |
|
296 |
^JavaMethodDescriptor parameters: parameterDescriptors return: returnDescriptor |
|
297 |
||
298 |
" |
|
299 |
JavaDescriptor fromString:'(ILjava/lang/Object;)V' |
|
300 |
JavaDescriptor fromString:'(ILjava/lang/Object;)Ljava/lang/Class;' |
|
301 |
" |
|
302 |
||
303 |
"Created: / 25-11-2010 / 18:36:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
304 |
"Modified: / 13-08-2011 / 01:39:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
752 | 305 |
! |
306 |
||
307 |
readObjectTypeFrom: stream onError: exceptionBlock |
|
308 |
||
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
309 |
| clsName out | |
752 | 310 |
|
311 |
stream next. "/eat $L. |
|
1063 | 312 |
out := String new writeStream. |
313 |
[ stream peek ~~ $; and:[stream peek ~~ $< ]] whileTrue:[ |
|
314 |
| c | |
|
315 |
||
316 |
c := stream next. |
|
317 |
c isNil ifTrue:[exceptionBlock value. ^nil]. |
|
318 |
out nextPut: stream next |
|
319 |
]. |
|
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
320 |
clsName := out contents. |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
321 |
stream peek == $< ifTrue:[ |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
322 |
self readTypeVariableFrom: stream onError: exceptionBlock |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
323 |
]. |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
324 |
|
752 | 325 |
"Just a check" |
326 |
stream next ~= $; ifTrue:[exceptionBlock value]. |
|
327 |
^JavaFieldDescriptor javaClassName: clsName. |
|
328 |
||
329 |
"Created: / 25-11-2010 / 18:08:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
330 |
! |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
331 |
|
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
332 |
readTypeVariableFrom: stream onError: exceptionBlock |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
333 |
|
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
334 |
| nangles | |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
335 |
|
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
336 |
stream next. "/eat $<. |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
337 |
nangles := 1. |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
338 |
[ nangles ~~ 0 ] whileTrue:[ |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
339 |
stream peek == $< ifTrue:[nangles := nangles + 1]. |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
340 |
stream peek == $> ifTrue:[nangles := nangles - 1]. |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
341 |
stream next. |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
342 |
] |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
343 |
|
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
900
diff
changeset
|
344 |
"Created: / 13-08-2011 / 01:39:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
752 | 345 |
! ! |
346 |
||
347 |
!JavaDescriptor class methodsFor:'documentation'! |
|
348 |
||
349 |
version_SVN |
|
350 |
^ '$Id$' |
|
351 |
! ! |
|
352 |
||
353 |
JavaDescriptor initialize! |