author | Claus Gittinger <cg@exept.de> |
Wed, 18 Dec 2019 22:52:35 +0100 | |
branch | cvs_MAIN |
changeset 3985 | 720bed28bf32 |
parent 3956 | 9d3fd717c20a |
permissions | -rw-r--r-- |
3956 | 1 |
"{ Encoding: utf8 }" |
2 |
||
722 | 3 |
" |
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3290
diff
changeset
|
4 |
COPYRIGHT (c) 1996-2015 by Claus Gittinger |
722 | 5 |
|
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
|
6 |
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
|
7 |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3290
diff
changeset
|
8 |
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
|
9 |
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
|
10 |
|
722 | 11 |
This software is furnished under a license and may be used |
12 |
only in accordance with the terms of that license and with the |
|
13 |
inclusion of the above copyright notice. This software may not |
|
14 |
be provided or otherwise made available to, or used by, any |
|
15 |
other person. No title to or ownership of the software is |
|
16 |
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
|
17 |
|
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 |
[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
|
19 |
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
|
20 |
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
|
21 |
as of 1.9.2010 |
2118 | 22 |
" |
722 | 23 |
"{ Package: 'stx:libjava' }" |
24 |
||
3520 | 25 |
"{ NameSpace: Smalltalk }" |
26 |
||
722 | 27 |
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
|
28 |
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
|
29 |
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
|
30 |
poolDictionaries:'JavaConstants' |
722 | 31 |
category:'Languages-Java-Classes' |
32 |
! |
|
33 |
||
34 |
!JavaBehavior class methodsFor:'documentation'! |
|
35 |
||
36 |
copyright |
|
37 |
" |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3290
diff
changeset
|
38 |
COPYRIGHT (c) 1996-2015 by Claus Gittinger |
722 | 39 |
|
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
|
40 |
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
|
41 |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3290
diff
changeset
|
42 |
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
|
43 |
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
|
44 |
|
722 | 45 |
This software is furnished under a license and may be used |
46 |
only in accordance with the terms of that license and with the |
|
47 |
inclusion of the above copyright notice. This software may not |
|
48 |
be provided or otherwise made available to, or used by, any |
|
49 |
other person. No title to or ownership of the software is |
|
50 |
hereby transferred. |
|
2151 | 51 |
|
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
|
52 |
[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
|
53 |
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
|
54 |
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
|
55 |
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
|
56 |
|
722 | 57 |
" |
58 |
! |
|
59 |
||
60 |
documentation |
|
61 |
" |
|
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
|
62 |
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
|
63 |
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
|
64 |
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
|
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 |
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
|
67 |
|
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 |
[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
|
69 |
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
|
70 |
|
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 |
[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
|
72 |
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
|
73 |
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
|
74 |
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
|
75 |
[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
|
76 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
77 |
[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
|
78 |
|
722 | 79 |
" |
80 |
! ! |
|
81 |
||
82 |
!JavaBehavior class methodsFor:'initialization'! |
|
83 |
||
84 |
initialize |
|
85 |
||
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
|
86 |
"/ 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
|
87 |
"/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
|
88 |
ACX_ABSTRACT_OR_INTERFACE := 16r0000400 bitOr: 16r0000200. |
722 | 89 |
|
90 |
InitialValuePerType := IdentityDictionary new. |
|
91 |
InitialValuePerType at:$B put:0. |
|
92 |
InitialValuePerType at:$C put:0. |
|
93 |
InitialValuePerType at:$D put:0.0. |
|
94 |
InitialValuePerType at:$F put:(0.0 asShortFloat). |
|
95 |
InitialValuePerType at:$I put:0. |
|
96 |
InitialValuePerType at:$J put:0. |
|
97 |
InitialValuePerType at:$S put:0. |
|
98 |
InitialValuePerType at:$Z put:0. |
|
99 |
InitialValuePerType at:$L put:nil. |
|
100 |
InitialValuePerType at:$[ put:nil. |
|
101 |
||
102 |
" |
|
103 |
JavaBehavior initialize |
|
104 |
" |
|
105 |
||
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
|
106 |
"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
|
107 |
"Modified: / 11-02-2012 / 16:55:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
722 | 108 |
! ! |
109 |
||
110 |
!JavaBehavior class methodsFor:'constants'! |
|
111 |
||
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
|
112 |
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
|
113 |
^ ACC_NATIVE |
722 | 114 |
|
115 |
"Created: / 16.5.1998 / 01:18:43 / cg" |
|
116 |
! |
|
117 |
||
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
|
118 |
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
|
119 |
^ ACC_PUBLIC |
722 | 120 |
|
121 |
"Created: / 13.5.1998 / 13:03:18 / cg" |
|
122 |
! |
|
123 |
||
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
|
124 |
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
|
125 |
^ ACC_STATIC |
722 | 126 |
|
127 |
"Created: / 16.5.1998 / 00:02:07 / cg" |
|
128 |
! ! |
|
129 |
||
130 |
!JavaBehavior class methodsFor:'signature parsing'! |
|
131 |
||
132 |
initialValueFromSignature:aSignature |
|
133 |
"given a signature, return an initializer value" |
|
134 |
||
135 |
|s| |
|
136 |
||
137 |
s := aSignature readStream. |
|
138 |
^ self initialValueFromStream:s. |
|
139 |
||
140 |
" |
|
141 |
JavaBehavior initialValueFromSignature:'LObject;' |
|
142 |
JavaBehavior initialValueFromSignature:'B' |
|
143 |
JavaBehavior initialValueFromSignature:'I' |
|
144 |
" |
|
145 |
! |
|
146 |
||
147 |
initialValueFromStream:s |
|
148 |
"parse a fieldTypeSpec - see java doc" |
|
149 |
||
150 |
|typeChar| |
|
151 |
||
152 |
typeChar := s next. |
|
153 |
^ InitialValuePerType at:typeChar ifAbsent:nil. |
|
154 |
! ! |
|
155 |
||
156 |
!JavaBehavior methodsFor:'accessing'! |
|
157 |
||
2151 | 158 |
accessFlags |
159 |
^ accessFlags |
|
160 |
! |
|
161 |
||
722 | 162 |
constantPool |
163 |
^ constantPool |
|
164 |
! |
|
165 |
||
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
|
166 |
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
|
167 |
"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
|
168 |
|
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
169 |
| cp | |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
170 |
|
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
171 |
cp := self constantPool. |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
172 |
interfaces notNil ifTrue:[ |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
173 |
^ 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
|
174 |
]. |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
175 |
^ #() |
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
|
176 |
|
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 |
"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
|
178 |
"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
|
179 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
180 |
|
722 | 181 |
interfaces |
3290
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
182 |
| 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
|
183 |
|
3290
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
184 |
cp := self constantPool. |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
185 |
interfaces notNil ifTrue:[ |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
186 |
^ interfaces collect: [:ifaceRefIndex | (cp at: ifaceRefIndex) javaClass ] |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
187 |
]. |
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
|
188 |
|
3290
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
189 |
^ #() |
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
190 |
|
76d4443744ed
JavaClass memory optimization (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
191 |
"Modified: / 27-11-2014 / 16:58:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
722 | 192 |
! ! |
193 |
||
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
|
194 |
!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
|
195 |
|
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 |
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
|
197 |
"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
|
198 |
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
|
199 |
- 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
|
200 |
- 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
|
201 |
" |
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 |
^ _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
|
204 |
|
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 |
"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
|
206 |
"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
|
207 |
! |
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 |
|
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 |
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
|
210 |
"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
|
211 |
|
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 |
"/ 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
|
213 |
"/ 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
|
214 |
|
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 |
_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
|
216 |
_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
|
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 |
^_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
|
219 |
|
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 |
"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
|
221 |
"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
|
222 |
! ! |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
223 |
|
2151 | 224 |
!JavaBehavior methodsFor:'compiler interface'! |
225 |
||
226 |
programmingLanguage |
|
227 |
||
228 |
^JavaLanguage instance |
|
229 |
||
230 |
"Created: / 26-10-2010 / 23:42:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
231 |
! ! |
|
232 |
||
722 | 233 |
!JavaBehavior methodsFor:'private accessing'! |
234 |
||
2730
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
235 |
getInterfaces |
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
236 |
^ interfaces |
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 |
"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
|
239 |
! |
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
240 |
|
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
241 |
hasMultipleVersions |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
242 |
" |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
243 |
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
|
244 |
" |
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
245 |
^ ((accessFlags bitAnd:ACX_HASMULTIVERS) == 0) not. |
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
246 |
|
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
247 |
"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
|
248 |
"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
|
249 |
! |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
250 |
|
722 | 251 |
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
|
252 |
accessFlags := accessFlags bitOr:ACC_OBSOLETE |
722 | 253 |
|
254 |
"Created: 7.8.1997 / 19:04:48 / cg" |
|
255 |
! |
|
256 |
||
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
257 |
markMultipleVersions |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
258 |
" |
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
259 |
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
|
260 |
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
|
261 |
|
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
262 |
self hasMultipleVersions not ifTrue: [ |
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
263 |
accessFlags := accessFlags bitXor: ACX_HASMULTIVERS |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
264 |
]. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
265 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
266 |
"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
|
267 |
"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
|
268 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
269 |
|
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
270 |
markNonMultipleVersions |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
271 |
" |
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
272 |
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
|
273 |
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
|
274 |
|
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
275 |
self hasMultipleVersions ifTrue: [ |
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
276 |
accessFlags := accessFlags bitXor: ACX_HASMULTIVERS |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
277 |
]. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
278 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
279 |
"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
|
280 |
"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
|
281 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
282 |
|
722 | 283 |
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
|
284 |
(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
|
285 |
accessFlags := accessFlags bitXor:ACX_INITIALIZED |
722 | 286 |
]. |
287 |
! |
|
288 |
||
289 |
setAccessFlags:flags |
|
290 |
accessFlags := flags. |
|
291 |
||
292 |
"Created: 15.4.1996 / 16:42:52 / cg" |
|
293 |
! |
|
294 |
||
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 |
setConstantPool:aJavaConstantPool |
2151 | 296 |
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
|
297 |
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
|
298 |
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
|
299 |
]. |
722 | 300 |
|
2151 | 301 |
"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
|
302 |
"Modified: / 04-08-2014 / 15:51:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
722 | 303 |
! |
304 |
||
3100
cf2d8949d5a5
Better coding style of JavaClass/JavaBehaviour>>setInterfaces:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2956
diff
changeset
|
305 |
setInterfaces:aCollection |
cf2d8949d5a5
Better coding style of JavaClass/JavaBehaviour>>setInterfaces:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2956
diff
changeset
|
306 |
interfaces := aCollection asNilIfEmpty |
722 | 307 |
|
3100
cf2d8949d5a5
Better coding style of JavaClass/JavaBehaviour>>setInterfaces:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2956
diff
changeset
|
308 |
"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
|
309 |
"Modified: / 05-05-2014 / 09:44:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2139 | 310 |
! ! |
722 | 311 |
|
312 |
!JavaBehavior methodsFor:'queries'! |
|
313 |
||
314 |
hasInterface:aJavaInterface |
|
315 |
"return true, if I respond to all methods as |
|
316 |
required by the argument, an aJavaInterface" |
|
317 |
||
3698 | 318 |
interfaces notEmptyOrNil ifTrue:[ |
319 |
(self interfaces includesIdentical:aJavaInterface) ifTrue:[ |
|
320 |
^ true |
|
321 |
] |
|
722 | 322 |
]. |
323 |
superclass isJavaClass ifTrue:[ |
|
3698 | 324 |
^ superclass hasInterface:aJavaInterface |
722 | 325 |
]. |
326 |
^ false. |
|
327 |
||
328 |
"/ aJavaInterface methodDictionary keysAndValuesDo:[:sel :mthd | |
|
329 |
"/ (self canUnderstand:sel) ifFalse:[ |
|
330 |
"/ ^ false. |
|
331 |
"/ ] |
|
332 |
"/ ]. |
|
3698 | 333 |
"/ ^ true |
722 | 334 |
|
3698 | 335 |
"Modified: / 28-01-1998 / 01:46:16 / cg" |
336 |
"Modified: / 14-02-2017 / 10:17:30 / stefan" |
|
722 | 337 |
! |
338 |
||
339 |
isAbstract |
|
340 |
"return true, if the receiver is abstract |
|
341 |
(i.e. may not have instances)" |
|
342 |
||
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
|
343 |
^ (accessFlags bitAnd:ACC_ABSTRACT) ~~ 0 |
722 | 344 |
|
345 |
"Modified: / 7.5.1998 / 12:24:42 / cg" |
|
346 |
! |
|
347 |
||
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
|
348 |
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
|
349 |
"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
|
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 |
^ (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
|
352 |
|
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 |
"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
|
354 |
"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
|
355 |
! |
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 |
|
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 |
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
|
358 |
"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
|
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 |
^ (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
|
361 |
|
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 |
"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
|
363 |
"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
|
364 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
365 |
|
722 | 366 |
isFinal |
367 |
"return true, if the receiver is final |
|
368 |
(i.e. may not be subclassed)" |
|
369 |
||
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
|
370 |
^ (accessFlags bitAnd:ACC_FINAL) ~~ 0 |
722 | 371 |
|
372 |
"Modified: / 7.5.1998 / 12:24:21 / cg" |
|
373 |
! |
|
374 |
||
375 |
isInitialized |
|
376 |
"return true, if the receiver is initialized" |
|
377 |
||
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
|
378 |
^ (accessFlags bitAnd:ACX_INITIALIZED) ~~ 0 |
722 | 379 |
|
380 |
"Modified: / 7.5.1998 / 12:23:54 / cg" |
|
381 |
! |
|
382 |
||
383 |
isInterface |
|
384 |
"return true, if the receiver is an interface" |
|
385 |
||
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
|
386 |
^ (accessFlags bitAnd:ACC_INTERFACE) ~~ 0 |
722 | 387 |
|
388 |
"Modified: / 7.5.1998 / 12:23:39 / cg" |
|
389 |
! |
|
390 |
||
391 |
isObsolete |
|
392 |
"return true, if the receiver is obsolete |
|
393 |
Java classes are never." |
|
394 |
||
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
|
395 |
^ (accessFlags bitAnd:ACC_OBSOLETE) ~~ 0. |
722 | 396 |
|
397 |
"Modified: 7.8.1997 / 19:04:28 / cg" |
|
398 |
! |
|
399 |
||
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 |
isPackagePrivate |
3956 | 401 |
^ (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
|
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 |
"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
|
404 |
! |
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 |
|
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 |
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
|
407 |
"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
|
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 |
^ (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
|
410 |
|
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 |
"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
|
412 |
"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
|
413 |
! |
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 |
|
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 |
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
|
416 |
"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
|
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 |
^ (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
|
419 |
|
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 |
"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
|
421 |
"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
|
422 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
423 |
|
722 | 424 |
isPublic |
425 |
"return true, if the receiver is public" |
|
426 |
||
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
|
427 |
^ (accessFlags bitAnd:ACC_PUBLIC) ~~ 0 |
722 | 428 |
|
429 |
"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
|
430 |
! |
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 |
|
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 |
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
|
433 |
"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
|
434 |
(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
|
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 |
^ (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
|
437 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
438 |
"Created: / 13-04-2012 / 18:51:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
722 | 439 |
! ! |
440 |
||
441 |
!JavaBehavior class methodsFor:'documentation'! |
|
442 |
||
443 |
version |
|
3520 | 444 |
^ '$Header$' |
2146 | 445 |
! |
446 |
||
447 |
version_CVS |
|
3520 | 448 |
^ '$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
|
449 |
! |
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 |
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
|
452 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
453 |
^ '$Changeset: <not expanded> $' |
2151 | 454 |
! |
455 |
||
456 |
version_SVN |
|
3520 | 457 |
^ '$Id$' |
722 | 458 |
! ! |
459 |
||
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
|
460 |
|
2118 | 461 |
JavaBehavior initialize! |