author | Claus Gittinger <cg@exept.de> |
Fri, 17 Aug 2018 18:45:10 +0200 | |
branch | cvs_MAIN |
changeset 3795 | b696900fb824 |
parent 3698 | 6b3b66d7a2d8 |
child 3956 | 9d3fd717c20a |
permissions | -rw-r--r-- |
722 | 1 |
" |
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3290
diff
changeset
|
2 |
COPYRIGHT (c) 1996-2015 by Claus Gittinger |
722 | 3 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
4 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
5 |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3290
diff
changeset
|
6 |
COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
7 |
SWING Research Group, Czech Technical University in Prague |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
8 |
|
722 | 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. |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
15 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
16 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
17 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
18 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
19 |
as of 1.9.2010 |
2118 | 20 |
" |
722 | 21 |
"{ Package: 'stx:libjava' }" |
22 |
||
3520 | 23 |
"{ NameSpace: Smalltalk }" |
24 |
||
722 | 25 |
Class subclass:#JavaBehavior |
2956
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
26 |
instanceVariableNames:'constantPool interfaces accessFlags initValues _lockWord_' |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
27 |
classVariableNames:'InitialValuePerType ACX_ABSTRACT_OR_INTERFACE' |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
28 |
poolDictionaries:'JavaConstants' |
722 | 29 |
category:'Languages-Java-Classes' |
30 |
! |
|
31 |
||
32 |
!JavaBehavior class methodsFor:'documentation'! |
|
33 |
||
34 |
copyright |
|
35 |
" |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3290
diff
changeset
|
36 |
COPYRIGHT (c) 1996-2015 by Claus Gittinger |
722 | 37 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
38 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
39 |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3290
diff
changeset
|
40 |
COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
41 |
SWING Research Group, Czech Technical University in Prague |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
42 |
|
722 | 43 |
This software is furnished under a license and may be used |
44 |
only in accordance with the terms of that license and with the |
|
45 |
inclusion of the above copyright notice. This software may not |
|
46 |
be provided or otherwise made available to, or used by, any |
|
47 |
other person. No title to or ownership of the software is |
|
48 |
hereby transferred. |
|
2151 | 49 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
50 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
51 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
52 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
53 |
as of 1.9.2010 |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
54 |
|
722 | 55 |
" |
56 |
! |
|
57 |
||
58 |
documentation |
|
59 |
" |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
60 |
A base class for all Java classes. Slots & behavior defined here |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
61 |
is known to the VM. Do not change the order of slots and |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
62 |
add only to the end. You will have to modify stc.h then. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
63 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
64 |
Non-VM known stuff could be added to JavaClass safely. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
65 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
66 |
[author:] |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
67 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
68 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
69 |
[instance variables:] |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
70 |
constantPool |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
71 |
interfaces |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
72 |
accessFlags |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
73 |
[class variables:] |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
74 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
75 |
[see also:] |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
76 |
|
722 | 77 |
" |
78 |
! ! |
|
79 |
||
80 |
!JavaBehavior class methodsFor:'initialization'! |
|
81 |
||
82 |
initialize |
|
83 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
84 |
"/ Cannot do this as the constant pool may not be initialized |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
85 |
"/ACX_ABSTRACT_OR_INTERFACE := ACC_ABSTRACT bitOr:ACC_INTERFACE. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
86 |
ACX_ABSTRACT_OR_INTERFACE := 16r0000400 bitOr: 16r0000200. |
722 | 87 |
|
88 |
InitialValuePerType := IdentityDictionary new. |
|
89 |
InitialValuePerType at:$B put:0. |
|
90 |
InitialValuePerType at:$C put:0. |
|
91 |
InitialValuePerType at:$D put:0.0. |
|
92 |
InitialValuePerType at:$F put:(0.0 asShortFloat). |
|
93 |
InitialValuePerType at:$I put:0. |
|
94 |
InitialValuePerType at:$J put:0. |
|
95 |
InitialValuePerType at:$S put:0. |
|
96 |
InitialValuePerType at:$Z put:0. |
|
97 |
InitialValuePerType at:$L put:nil. |
|
98 |
InitialValuePerType at:$[ put:nil. |
|
99 |
||
100 |
" |
|
101 |
JavaBehavior initialize |
|
102 |
" |
|
103 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
104 |
"Modified: / 13-11-1998 / 14:09:52 / cg" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
105 |
"Modified: / 11-02-2012 / 16:55:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
722 | 106 |
! ! |
107 |
||
108 |
!JavaBehavior class methodsFor:'constants'! |
|
109 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
110 |
ACC_NATIVE |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
111 |
^ ACC_NATIVE |
722 | 112 |
|
113 |
"Created: / 16.5.1998 / 01:18:43 / cg" |
|
114 |
! |
|
115 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
116 |
ACC_PUBLIC |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
117 |
^ ACC_PUBLIC |
722 | 118 |
|
119 |
"Created: / 13.5.1998 / 13:03:18 / cg" |
|
120 |
! |
|
121 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
122 |
ACC_STATIC |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
123 |
^ ACC_STATIC |
722 | 124 |
|
125 |
"Created: / 16.5.1998 / 00:02:07 / cg" |
|
126 |
! ! |
|
127 |
||
128 |
!JavaBehavior class methodsFor:'signature parsing'! |
|
129 |
||
130 |
initialValueFromSignature:aSignature |
|
131 |
"given a signature, return an initializer value" |
|
132 |
||
133 |
|s| |
|
134 |
||
135 |
s := aSignature readStream. |
|
136 |
^ self initialValueFromStream:s. |
|
137 |
||
138 |
" |
|
139 |
JavaBehavior initialValueFromSignature:'LObject;' |
|
140 |
JavaBehavior initialValueFromSignature:'B' |
|
141 |
JavaBehavior initialValueFromSignature:'I' |
|
142 |
" |
|
143 |
! |
|
144 |
||
145 |
initialValueFromStream:s |
|
146 |
"parse a fieldTypeSpec - see java doc" |
|
147 |
||
148 |
|typeChar| |
|
149 |
||
150 |
typeChar := s next. |
|
151 |
^ InitialValuePerType at:typeChar ifAbsent:nil. |
|
152 |
! ! |
|
153 |
||
154 |
!JavaBehavior methodsFor:'accessing'! |
|
155 |
||
2151 | 156 |
accessFlags |
157 |
^ accessFlags |
|
158 |
! |
|
159 |
||
722 | 160 |
constantPool |
161 |
^ constantPool |
|
162 |
! |
|
163 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
164 |
interfaceNames |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
165 |
"Returns set of intefaces as java names (dotted)" |
3290
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
166 |
|
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
167 |
| cp | |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
168 |
|
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
169 |
cp := self constantPool. |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
170 |
interfaces notNil ifTrue:[ |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
171 |
^ interfaces collect:[:ifaceRefIndex | | ifaceRef | ifaceRef := cp at: ifaceRefIndex. ifaceRef isJavaClassRef ifTrue:[ifaceRef javaClassName] ifFalse:[ifaceRef javaName]]. |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
172 |
]. |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
173 |
^ #() |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
174 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
175 |
"Created: / 13-02-2013 / 09:33:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3290
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
176 |
"Modified: / 27-11-2014 / 17:00:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
177 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
178 |
|
722 | 179 |
interfaces |
3290
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
180 |
| cp | |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
181 |
|
3290
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
182 |
cp := self constantPool. |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
183 |
interfaces notNil ifTrue:[ |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
184 |
^ interfaces collect: [:ifaceRefIndex | (cp at: ifaceRefIndex) javaClass ] |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
185 |
]. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
186 |
|
3290
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
187 |
^ #() |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
188 |
|
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
189 |
"Modified: / 27-11-2014 / 16:58:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
722 | 190 |
! ! |
191 |
||
2956
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
192 |
!JavaBehavior methodsFor:'accessing-Java'! |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
193 |
|
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
194 |
getJavaLockWord |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
195 |
"Returns a Java lock word for given object. The returned |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
196 |
value is |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
197 |
- either SmallInteger that encodes the thinlock |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
198 |
- or a fat lock, instance of JavaMonitor |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
199 |
" |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
200 |
|
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
201 |
^ _lockWord_ |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
202 |
|
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
203 |
"Created: / 26-08-2012 / 14:03:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
204 |
"Modified (comment): / 06-12-2013 / 21:47:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
205 |
! |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
206 |
|
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
207 |
getJavaMonitor |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
208 |
"Returns fat JavaMonitor associated with the receiver" |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
209 |
|
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
210 |
"/ For Java objects, check if there is already a thinlock, |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
211 |
"/ inflate it and return the fatlock |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
212 |
|
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
213 |
_lockWord_ class == SmallInteger ifTrue:[ |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
214 |
_lockWord_ := JavaVM inflateLockFor: self lockword: _lockWord_. |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
215 |
]. |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
216 |
^_lockWord_ |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
217 |
|
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
218 |
"Created: / 26-08-2012 / 18:35:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
219 |
"Modified (comment): / 06-12-2013 / 21:47:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
220 |
! ! |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
221 |
|
2151 | 222 |
!JavaBehavior methodsFor:'compiler interface'! |
223 |
||
224 |
programmingLanguage |
|
225 |
||
226 |
^JavaLanguage instance |
|
227 |
||
228 |
"Created: / 26-10-2010 / 23:42:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
229 |
! ! |
|
230 |
||
722 | 231 |
!JavaBehavior methodsFor:'private accessing'! |
232 |
||
2730
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
233 |
getInterfaces |
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
234 |
^ interfaces |
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
235 |
|
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
236 |
"Created: / 15-09-2013 / 00:29:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
237 |
! |
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
238 |
|
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
239 |
hasMultipleVersions |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
240 |
" |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
241 |
return true if this class has multiple coexisting versions |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
242 |
" |
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
243 |
^ ((accessFlags bitAnd:ACX_HASMULTIVERS) == 0) not. |
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
244 |
|
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
245 |
"Created: / 02-10-2013 / 21:48:24 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>" |
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
246 |
"Modified: / 28-10-2013 / 13:01:32 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>" |
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
247 |
! |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
248 |
|
722 | 249 |
makeObsolete |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
250 |
accessFlags := accessFlags bitOr:ACC_OBSOLETE |
722 | 251 |
|
252 |
"Created: 7.8.1997 / 19:04:48 / cg" |
|
253 |
! |
|
254 |
||
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
255 |
markMultipleVersions |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
256 |
" |
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
257 |
mark this class non cacheable - references to this class have to be |
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
258 |
resolved over and over again, cannot be cached." |
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
259 |
|
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
260 |
self hasMultipleVersions not ifTrue: [ |
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
261 |
accessFlags := accessFlags bitXor: ACX_HASMULTIVERS |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
262 |
]. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
263 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
264 |
"Created: / 14-04-2013 / 14:17:38 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>" |
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
265 |
"Modified (comment): / 28-10-2013 / 14:07:35 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>" |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
266 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
267 |
|
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
268 |
markNonMultipleVersions |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
269 |
" |
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
270 |
mark this class cacheable - references to this class dont have to be |
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
271 |
resolved over and over again, can be cached." |
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
272 |
|
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
273 |
self hasMultipleVersions ifTrue: [ |
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
274 |
accessFlags := accessFlags bitXor: ACX_HASMULTIVERS |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
275 |
]. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
276 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
277 |
"Created: / 14-04-2013 / 14:25:23 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>" |
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
278 |
"Modified (comment): / 28-10-2013 / 14:07:59 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>" |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
279 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
280 |
|
722 | 281 |
markUninitialized |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
282 |
(accessFlags bitAnd:ACX_INITIALIZED) ~~ 0 ifTrue:[ |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
283 |
accessFlags := accessFlags bitXor:ACX_INITIALIZED |
722 | 284 |
]. |
285 |
! |
|
286 |
||
287 |
setAccessFlags:flags |
|
288 |
accessFlags := flags. |
|
289 |
||
290 |
"Created: 15.4.1996 / 16:42:52 / cg" |
|
291 |
! |
|
292 |
||
3196
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3100
diff
changeset
|
293 |
setConstantPool:aJavaConstantPool |
2151 | 294 |
constantPool := aJavaConstantPool. |
3196
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3100
diff
changeset
|
295 |
constantPool notNil ifTrue:[ |
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3100
diff
changeset
|
296 |
constantPool owner:self |
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3100
diff
changeset
|
297 |
]. |
722 | 298 |
|
2151 | 299 |
"Created: / 15-04-1996 / 16:42:52 / cg" |
3196
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3100
diff
changeset
|
300 |
"Modified: / 04-08-2014 / 15:51:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
722 | 301 |
! |
302 |
||
3100
cf2d8949d5a5
Better coding style of JavaClass/JavaBehaviour>>setInterfaces:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2956
diff
changeset
|
303 |
setInterfaces:aCollection |
cf2d8949d5a5
Better coding style of JavaClass/JavaBehaviour>>setInterfaces:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2956
diff
changeset
|
304 |
interfaces := aCollection asNilIfEmpty |
722 | 305 |
|
3100
cf2d8949d5a5
Better coding style of JavaClass/JavaBehaviour>>setInterfaces:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2956
diff
changeset
|
306 |
"Modified: / 07-04-1997 / 15:44:53 / cg" |
cf2d8949d5a5
Better coding style of JavaClass/JavaBehaviour>>setInterfaces:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2956
diff
changeset
|
307 |
"Modified: / 05-05-2014 / 09:44:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2139 | 308 |
! ! |
722 | 309 |
|
310 |
!JavaBehavior methodsFor:'queries'! |
|
311 |
||
312 |
hasInterface:aJavaInterface |
|
313 |
"return true, if I respond to all methods as |
|
314 |
required by the argument, an aJavaInterface" |
|
315 |
||
3698 | 316 |
interfaces notEmptyOrNil ifTrue:[ |
317 |
(self interfaces includesIdentical:aJavaInterface) ifTrue:[ |
|
318 |
^ true |
|
319 |
] |
|
722 | 320 |
]. |
321 |
superclass isJavaClass ifTrue:[ |
|
3698 | 322 |
^ superclass hasInterface:aJavaInterface |
722 | 323 |
]. |
324 |
^ false. |
|
325 |
||
326 |
"/ aJavaInterface methodDictionary keysAndValuesDo:[:sel :mthd | |
|
327 |
"/ (self canUnderstand:sel) ifFalse:[ |
|
328 |
"/ ^ false. |
|
329 |
"/ ] |
|
330 |
"/ ]. |
|
3698 | 331 |
"/ ^ true |
722 | 332 |
|
3698 | 333 |
"Modified: / 28-01-1998 / 01:46:16 / cg" |
334 |
"Modified: / 14-02-2017 / 10:17:30 / stefan" |
|
722 | 335 |
! |
336 |
||
337 |
isAbstract |
|
338 |
"return true, if the receiver is abstract |
|
339 |
(i.e. may not have instances)" |
|
340 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
341 |
^ (accessFlags bitAnd:ACC_ABSTRACT) ~~ 0 |
722 | 342 |
|
343 |
"Modified: / 7.5.1998 / 12:24:42 / cg" |
|
344 |
! |
|
345 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
346 |
isAnnotation |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
347 |
"return true, if the receiver is an interface" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
348 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
349 |
^ (accessFlags bitAnd:ACC_ANNOTATION) ~~ 0 |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
350 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
351 |
"Modified: / 07-05-1998 / 12:23:39 / cg" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
352 |
"Created: / 11-02-2012 / 16:55:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
353 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
354 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
355 |
isEnum |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
356 |
"return true, if the receiver is an interface" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
357 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
358 |
^ (accessFlags bitAnd:ACC_ENUM) ~~ 0 |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
359 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
360 |
"Modified: / 07-05-1998 / 12:23:39 / cg" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
361 |
"Created: / 11-02-2012 / 16:55:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
362 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
363 |
|
722 | 364 |
isFinal |
365 |
"return true, if the receiver is final |
|
366 |
(i.e. may not be subclassed)" |
|
367 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
368 |
^ (accessFlags bitAnd:ACC_FINAL) ~~ 0 |
722 | 369 |
|
370 |
"Modified: / 7.5.1998 / 12:24:21 / cg" |
|
371 |
! |
|
372 |
||
373 |
isInitialized |
|
374 |
"return true, if the receiver is initialized" |
|
375 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
376 |
^ (accessFlags bitAnd:ACX_INITIALIZED) ~~ 0 |
722 | 377 |
|
378 |
"Modified: / 7.5.1998 / 12:23:54 / cg" |
|
379 |
! |
|
380 |
||
381 |
isInterface |
|
382 |
"return true, if the receiver is an interface" |
|
383 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
384 |
^ (accessFlags bitAnd:ACC_INTERFACE) ~~ 0 |
722 | 385 |
|
386 |
"Modified: / 7.5.1998 / 12:23:39 / cg" |
|
387 |
! |
|
388 |
||
389 |
isObsolete |
|
390 |
"return true, if the receiver is obsolete |
|
391 |
Java classes are never." |
|
392 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
393 |
^ (accessFlags bitAnd:ACC_OBSOLETE) ~~ 0. |
722 | 394 |
|
395 |
"Modified: 7.8.1997 / 19:04:28 / cg" |
|
396 |
! |
|
397 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
398 |
isPackagePrivate |
3520 | 399 |
^ (accessFlags bitAnd:((ACC_PRIVATE bitOr: ACC_PUBLIC) bitOr: ACC_PROTECTED)) = 0 |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
400 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
401 |
"Created: / 05-07-2012 / 10:13:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
402 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
403 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
404 |
isPrivate |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
405 |
"return true, if the receiver is an interface" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
406 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
407 |
^ (accessFlags bitAnd:ACC_PRIVATE) ~~ 0 |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
408 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
409 |
"Modified: / 07-05-1998 / 12:23:39 / cg" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
410 |
"Created: / 11-02-2012 / 16:55:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
411 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
412 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
413 |
isProtected |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
414 |
"return true, if the receiver is an interface" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
415 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
416 |
^ (accessFlags bitAnd:ACC_PROTECTED) ~~ 0 |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
417 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
418 |
"Modified: / 07-05-1998 / 12:23:39 / cg" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
419 |
"Created: / 11-02-2012 / 16:56:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
420 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
421 |
|
722 | 422 |
isPublic |
423 |
"return true, if the receiver is public" |
|
424 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
425 |
^ (accessFlags bitAnd:ACC_PUBLIC) ~~ 0 |
722 | 426 |
|
427 |
"Modified: / 7.5.1998 / 12:22:44 / cg" |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
428 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
429 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
430 |
isSynthetic |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
431 |
"return true, if the receiver is a synthetic class |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
432 |
(usually a proxy generated at runtime)" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
433 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
434 |
^ (accessFlags bitAnd:ACC_SYNTHETIC) ~~ 0 |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
435 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
436 |
"Created: / 13-04-2012 / 18:51:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
722 | 437 |
! ! |
438 |
||
439 |
!JavaBehavior class methodsFor:'documentation'! |
|
440 |
||
441 |
version |
|
3520 | 442 |
^ '$Header$' |
2146 | 443 |
! |
444 |
||
445 |
version_CVS |
|
3520 | 446 |
^ '$Header$' |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
447 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
448 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
449 |
version_HG |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
450 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
451 |
^ '$Changeset: <not expanded> $' |
2151 | 452 |
! |
453 |
||
454 |
version_SVN |
|
3520 | 455 |
^ '$Id$' |
722 | 456 |
! ! |
457 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
458 |
|
2118 | 459 |
JavaBehavior initialize! |