author | Marcel Hlopko <marcel.hlopko@gmail.com> |
Sat, 25 Jan 2014 21:35:58 +0100 | |
branch | development |
changeset 3002 | c1ec15d94457 |
parent 2956 | 17be352f0130 |
child 3100 | cf2d8949d5a5 |
permissions | -rw-r--r-- |
722 | 1 |
" |
2151 | 2 |
COPYRIGHT (c) 1996-2011 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 |
|
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 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
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 |
||
23 |
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
|
24 |
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
|
25 |
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
|
26 |
poolDictionaries:'JavaConstants' |
722 | 27 |
category:'Languages-Java-Classes' |
28 |
! |
|
29 |
||
30 |
!JavaBehavior class methodsFor:'documentation'! |
|
31 |
||
32 |
copyright |
|
33 |
" |
|
2151 | 34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
722 | 35 |
|
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
|
36 |
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
|
37 |
|
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 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
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 |
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
|
40 |
|
722 | 41 |
This software is furnished under a license and may be used |
42 |
only in accordance with the terms of that license and with the |
|
43 |
inclusion of the above copyright notice. This software may not |
|
44 |
be provided or otherwise made available to, or used by, any |
|
45 |
other person. No title to or ownership of the software is |
|
46 |
hereby transferred. |
|
2151 | 47 |
|
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
|
48 |
[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
|
49 |
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
|
50 |
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
|
51 |
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
|
52 |
|
722 | 53 |
" |
54 |
! |
|
55 |
||
56 |
documentation |
|
57 |
" |
|
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
|
58 |
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
|
59 |
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
|
60 |
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
|
61 |
|
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 |
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
|
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 |
[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
|
65 |
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
|
66 |
|
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 |
[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
|
68 |
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
|
69 |
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
|
70 |
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
|
71 |
[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
|
72 |
|
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 |
[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
|
74 |
|
722 | 75 |
" |
76 |
! ! |
|
77 |
||
78 |
!JavaBehavior class methodsFor:'initialization'! |
|
79 |
||
80 |
initialize |
|
81 |
||
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
|
82 |
"/ 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
|
83 |
"/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
|
84 |
ACX_ABSTRACT_OR_INTERFACE := 16r0000400 bitOr: 16r0000200. |
722 | 85 |
|
86 |
InitialValuePerType := IdentityDictionary new. |
|
87 |
InitialValuePerType at:$B put:0. |
|
88 |
InitialValuePerType at:$C put:0. |
|
89 |
InitialValuePerType at:$D put:0.0. |
|
90 |
InitialValuePerType at:$F put:(0.0 asShortFloat). |
|
91 |
InitialValuePerType at:$I put:0. |
|
92 |
InitialValuePerType at:$J put:0. |
|
93 |
InitialValuePerType at:$S put:0. |
|
94 |
InitialValuePerType at:$Z put:0. |
|
95 |
InitialValuePerType at:$L put:nil. |
|
96 |
InitialValuePerType at:$[ put:nil. |
|
97 |
||
98 |
" |
|
99 |
JavaBehavior initialize |
|
100 |
" |
|
101 |
||
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
|
102 |
"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
|
103 |
"Modified: / 11-02-2012 / 16:55:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
722 | 104 |
! ! |
105 |
||
106 |
!JavaBehavior class methodsFor:'constants'! |
|
107 |
||
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
|
108 |
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
|
109 |
^ ACC_NATIVE |
722 | 110 |
|
111 |
"Created: / 16.5.1998 / 01:18:43 / cg" |
|
112 |
! |
|
113 |
||
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
|
114 |
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
|
115 |
^ ACC_PUBLIC |
722 | 116 |
|
117 |
"Created: / 13.5.1998 / 13:03:18 / cg" |
|
118 |
! |
|
119 |
||
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
|
120 |
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
|
121 |
^ ACC_STATIC |
722 | 122 |
|
123 |
"Created: / 16.5.1998 / 00:02:07 / cg" |
|
124 |
! ! |
|
125 |
||
126 |
!JavaBehavior class methodsFor:'signature parsing'! |
|
127 |
||
128 |
initialValueFromSignature:aSignature |
|
129 |
"given a signature, return an initializer value" |
|
130 |
||
131 |
|s| |
|
132 |
||
133 |
s := aSignature readStream. |
|
134 |
^ self initialValueFromStream:s. |
|
135 |
||
136 |
" |
|
137 |
JavaBehavior initialValueFromSignature:'LObject;' |
|
138 |
JavaBehavior initialValueFromSignature:'B' |
|
139 |
JavaBehavior initialValueFromSignature:'I' |
|
140 |
" |
|
141 |
! |
|
142 |
||
143 |
initialValueFromStream:s |
|
144 |
"parse a fieldTypeSpec - see java doc" |
|
145 |
||
146 |
|typeChar| |
|
147 |
||
148 |
typeChar := s next. |
|
149 |
^ InitialValuePerType at:typeChar ifAbsent:nil. |
|
150 |
! ! |
|
151 |
||
152 |
!JavaBehavior methodsFor:'accessing'! |
|
153 |
||
2151 | 154 |
accessFlags |
155 |
^ accessFlags |
|
156 |
! |
|
157 |
||
722 | 158 |
constantPool |
159 |
^ constantPool |
|
160 |
! |
|
161 |
||
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
|
162 |
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
|
163 |
"Returns set of intefaces as java names (dotted)" |
2841
6fa1bcf9c997
JavaClass>>#name vs. #binaryName refactoring
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2757
diff
changeset
|
164 |
^( interfaces ? #() ) collect:[:e|e isJavaClassRef ifTrue:[e javaClassName] ifFalse:[e javaName]]. |
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
|
165 |
|
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 |
"Created: / 13-02-2013 / 09:33:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2841
6fa1bcf9c997
JavaClass>>#name vs. #binaryName refactoring
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2757
diff
changeset
|
167 |
"Modified: / 08-10-2013 / 22:40:56 / 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
|
168 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
169 |
|
722 | 170 |
interfaces |
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
|
171 |
interfaces notNil |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
172 |
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
|
173 |
[ interfaces := interfaces collect: |
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 |
[:clsRef | clsRef javaClass ] ]. |
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 |
|
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 |
^ 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
|
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 |
"Modified: / 31-05-2011 / 09:40:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
722 | 179 |
! ! |
180 |
||
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
|
181 |
!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
|
182 |
|
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
183 |
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
|
184 |
"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
|
185 |
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
|
186 |
- 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
|
187 |
- 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
|
188 |
" |
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
189 |
|
17be352f0130
Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2916
diff
changeset
|
190 |
^ _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
|
191 |
|
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 |
"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
|
193 |
"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
|
194 |
! |
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 |
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
|
197 |
"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
|
198 |
|
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 |
"/ 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
|
200 |
"/ 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
|
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 |
_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
|
203 |
_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
|
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 |
^_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
|
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 |
"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
|
208 |
"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
|
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 |
|
2151 | 211 |
!JavaBehavior methodsFor:'compiler interface'! |
212 |
||
213 |
programmingLanguage |
|
214 |
||
215 |
^JavaLanguage instance |
|
216 |
||
217 |
"Created: / 26-10-2010 / 23:42:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
218 |
! ! |
|
219 |
||
722 | 220 |
!JavaBehavior methodsFor:'private accessing'! |
221 |
||
2730
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
222 |
getInterfaces |
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
223 |
^ interfaces |
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
224 |
|
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
225 |
"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
|
226 |
! |
272689c14005
Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2504
diff
changeset
|
227 |
|
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
228 |
hasMultipleVersions |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
229 |
" |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
230 |
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
|
231 |
" |
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
232 |
^ ((accessFlags bitAnd:ACX_HASMULTIVERS) == 0) not. |
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
233 |
|
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
234 |
"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
|
235 |
"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
|
236 |
! |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
237 |
|
722 | 238 |
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
|
239 |
accessFlags := accessFlags bitOr:ACC_OBSOLETE |
722 | 240 |
|
241 |
"Created: 7.8.1997 / 19:04:48 / cg" |
|
242 |
! |
|
243 |
||
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
244 |
markMultipleVersions |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
245 |
" |
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
246 |
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
|
247 |
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
|
248 |
|
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
249 |
self hasMultipleVersions not ifTrue: [ |
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
250 |
accessFlags := accessFlags bitXor: ACX_HASMULTIVERS |
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
251 |
]. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
252 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
253 |
"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
|
254 |
"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
|
255 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
256 |
|
2757
66f842986836
cleanup multiple Java class versions handling
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2732
diff
changeset
|
257 |
markNonMultipleVersions |
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 cacheable - references to this class dont have to be |
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
260 |
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
|
261 |
|
2896
edaa0c80646e
fix JavaBehavior>>hasMultipleVersions
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
2841
diff
changeset
|
262 |
self hasMultipleVersions 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:25:23 / 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: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
|
268 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
269 |
|
722 | 270 |
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
|
271 |
(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
|
272 |
accessFlags := accessFlags bitXor:ACX_INITIALIZED |
722 | 273 |
]. |
274 |
! |
|
275 |
||
276 |
setAccessFlags:flags |
|
277 |
accessFlags := flags. |
|
278 |
||
279 |
"Created: 15.4.1996 / 16:42:52 / cg" |
|
280 |
! |
|
281 |
||
2151 | 282 |
setConstantPool: aJavaConstantPool |
283 |
constantPool := aJavaConstantPool. |
|
284 |
constantPool ifNotNil:[constantPool owner: self]. |
|
722 | 285 |
|
2151 | 286 |
"Created: / 15-04-1996 / 16:42:52 / cg" |
287 |
"Modified: / 22-05-2011 / 13:16:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
722 | 288 |
! |
289 |
||
290 |
setInterfaces:i |
|
291 |
i size > 0 ifTrue:[ |
|
292 |
interfaces := i |
|
293 |
] ifFalse:[ |
|
294 |
interfaces := nil |
|
295 |
] |
|
296 |
||
297 |
"Modified: 7.4.1997 / 15:44:53 / cg" |
|
2139 | 298 |
! ! |
722 | 299 |
|
300 |
!JavaBehavior methodsFor:'queries'! |
|
301 |
||
302 |
hasInterface:aJavaInterface |
|
303 |
"return true, if I respond to all methods as |
|
304 |
required by the argument, an aJavaInterface" |
|
305 |
||
306 |
interfaces size > 0 ifTrue:[ |
|
307 |
self interfaces do:[:if | |
|
308 |
aJavaInterface == if ifTrue:[ |
|
309 |
^ true |
|
310 |
]. |
|
311 |
] |
|
312 |
]. |
|
313 |
superclass isJavaClass ifTrue:[ |
|
314 |
^ superclass hasInterface:aJavaInterface |
|
315 |
]. |
|
316 |
^ false. |
|
317 |
||
318 |
"/ aJavaInterface methodDictionary keysAndValuesDo:[:sel :mthd | |
|
319 |
"/ (self canUnderstand:sel) ifFalse:[ |
|
320 |
"/ ^ false. |
|
321 |
"/ ] |
|
322 |
"/ ]. |
|
323 |
^ true |
|
324 |
||
325 |
"Modified: / 28.1.1998 / 01:46:16 / cg" |
|
326 |
||
327 |
! |
|
328 |
||
329 |
isAbstract |
|
330 |
"return true, if the receiver is abstract |
|
331 |
(i.e. may not have instances)" |
|
332 |
||
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
|
333 |
^ (accessFlags bitAnd:ACC_ABSTRACT) ~~ 0 |
722 | 334 |
|
335 |
"Modified: / 7.5.1998 / 12:24:42 / cg" |
|
336 |
! |
|
337 |
||
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
|
338 |
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
|
339 |
"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
|
340 |
|
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_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
|
342 |
|
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 |
"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
|
344 |
"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
|
345 |
! |
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 |
|
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 |
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
|
348 |
"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
|
349 |
|
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 |
^ (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
|
351 |
|
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 |
"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
|
353 |
"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
|
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 |
|
722 | 356 |
isFinal |
357 |
"return true, if the receiver is final |
|
358 |
(i.e. may not be subclassed)" |
|
359 |
||
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
|
360 |
^ (accessFlags bitAnd:ACC_FINAL) ~~ 0 |
722 | 361 |
|
362 |
"Modified: / 7.5.1998 / 12:24:21 / cg" |
|
363 |
! |
|
364 |
||
365 |
isInitialized |
|
366 |
"return true, if the receiver is initialized" |
|
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:ACX_INITIALIZED) ~~ 0 |
722 | 369 |
|
370 |
"Modified: / 7.5.1998 / 12:23:54 / cg" |
|
371 |
! |
|
372 |
||
373 |
isInterface |
|
374 |
"return true, if the receiver is an interface" |
|
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:ACC_INTERFACE) ~~ 0 |
722 | 377 |
|
378 |
"Modified: / 7.5.1998 / 12:23:39 / cg" |
|
379 |
! |
|
380 |
||
381 |
isObsolete |
|
382 |
"return true, if the receiver is obsolete |
|
383 |
Java classes are never." |
|
384 |
||
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
|
385 |
^ (accessFlags bitAnd:ACC_OBSOLETE) ~~ 0. |
722 | 386 |
|
387 |
"Modified: 7.8.1997 / 19:04:28 / cg" |
|
388 |
! |
|
389 |
||
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
|
390 |
isPackagePrivate |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
391 |
^ (accessFlags bitAnd:ACC_PRIVATE | ACC_PUBLIC | 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
|
392 |
|
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 |
"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
|
394 |
! |
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 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
396 |
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
|
397 |
"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
|
398 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
399 |
^ (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
|
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 |
"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
|
402 |
"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
|
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 |
|
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 |
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
|
406 |
"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
|
407 |
|
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 |
^ (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
|
409 |
|
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 |
"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
|
411 |
"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
|
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 |
|
722 | 414 |
isPublic |
415 |
"return true, if the receiver is public" |
|
416 |
||
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
|
417 |
^ (accessFlags bitAnd:ACC_PUBLIC) ~~ 0 |
722 | 418 |
|
419 |
"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
|
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 |
|
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 |
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
|
423 |
"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
|
424 |
(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
|
425 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
426 |
^ (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
|
427 |
|
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 |
"Created: / 13-04-2012 / 18:51:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
722 | 429 |
! ! |
430 |
||
431 |
!JavaBehavior class methodsFor:'documentation'! |
|
432 |
||
433 |
version |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
434 |
^ '$Header: /cvs/stx/stx/libjava/JavaBehavior.st,v 1.9 2013-09-06 00:41:12 vrany Exp $' |
2146 | 435 |
! |
436 |
||
437 |
version_CVS |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
438 |
^ '$Header: /cvs/stx/stx/libjava/JavaBehavior.st,v 1.9 2013-09-06 00:41:12 vrany Exp $' |
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
|
439 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
440 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
441 |
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
|
442 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2298
diff
changeset
|
443 |
^ '$Changeset: <not expanded> $' |
2151 | 444 |
! |
445 |
||
446 |
version_SVN |
|
2731
13f5be2bf83b
Merged d87e89dd5276 and fe83a843a7bf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
447 |
^ 'Id' |
722 | 448 |
! ! |
449 |
||
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
|
450 |
|
2118 | 451 |
JavaBehavior initialize! |