author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 31 Jan 2013 13:45:17 +0000 | |
branch | refactoring-vmdata |
changeset 2019 | e1291a81f215 |
parent 1987 | 596f7d5cb7cd |
child 2037 | 6b93bf17087a |
permissions | -rw-r--r-- |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1 |
"{ Package: 'stx:libjava' }"! |
1353 | 2 |
|
1376 | 3 |
!Behavior methodsFor:'queries'! |
4 |
||
5 |
isInterface |
|
6 |
"return true, if the receiver is a Java interface" |
|
7 |
||
8 |
^ false |
|
9 |
||
10 |
" |
|
11 |
True isInterface |
|
12 |
" |
|
13 |
||
14 |
"Created: / 22-02-2012 / 21:53:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
15 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
16 |
|
1674 | 17 |
!Behavior methodsFor:'queries'! |
18 |
||
19 |
isJavaPrimitiveType |
|
20 |
||
21 |
^false |
|
22 |
||
23 |
"Created: / 20-12-2010 / 21:52:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
24 |
! ! |
|
25 |
||
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
26 |
!Boolean class methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
27 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
28 |
isJavaPrimitiveType |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
29 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
30 |
^true |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
31 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
32 |
"Created: / 25-02-2011 / 08:22:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
33 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
34 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
35 |
!Boolean class methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
36 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
37 |
javaArrayClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
38 |
^ BooleanArray |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
39 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
40 |
"Created: / 25-02-2011 / 08:27:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
41 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
42 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
43 |
!Boolean class methodsFor:'autoboxing support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
44 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
45 |
javaBox: anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
46 |
| wrapper | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
47 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
48 |
wrapper := (JavaVM classForName: 'java.lang.Boolean') new. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
49 |
wrapper perform: #'<init>(Z)V' with: anObject. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
50 |
^ wrapper |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
51 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
52 |
"Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
53 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
54 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
55 |
!Boolean class methodsFor:'accessing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
56 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
57 |
javaName |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
58 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
59 |
^'boolean'. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
60 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
61 |
"Modified: / 25-02-2011 / 18:58:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
62 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
63 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
64 |
!Boolean class methodsFor:'autoboxing support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
65 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
66 |
javaUnbox: object onError: errorBlock |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
67 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
68 |
| value | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
69 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
70 |
(object class name = 'java/lang/Boolean') ifFalse:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
71 |
errorBlock value. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
72 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
73 |
value := object instVarNamed: #value. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
74 |
(value ~~ 0 and:[value ~~ 1]) ifTrue:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
75 |
errorBlock value. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
76 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
77 |
^value |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
78 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
79 |
"Created: / 22-11-2011 / 11:52:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
80 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
81 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
82 |
!Boolean class methodsFor:'autoboxing support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
83 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
84 |
javaUnwrap: zeroOrOne |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
85 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
86 |
^zeroOrOne == 1 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
87 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
88 |
"Created: / 10-12-2011 / 20:00:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
89 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
90 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
91 |
!Boolean class methodsFor:'autoboxing support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
92 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
93 |
javaWrap: boolean |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
94 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
95 |
^boolean ifTrue:[1] ifFalse:[0]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
96 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
97 |
"Created: / 18-03-2012 / 22:03:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
98 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
99 |
|
1840 | 100 |
!Boolean class methodsFor:'autoboxing support'! |
101 |
||
102 |
javaWrapRequired |
|
103 |
^true |
|
104 |
||
105 |
"Created: / 29-11-2012 / 23:02:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
106 |
! ! |
|
107 |
||
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
108 |
!Boolean class methodsFor:'accessing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
109 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
110 |
javaWrapperClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
111 |
^(Java classForName: 'java.lang.Boolean') |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
112 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
113 |
"Created: / 24-02-2012 / 19:43:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
114 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
115 |
|
752 | 116 |
!BooleanArray methodsFor:'queries'! |
117 |
||
826
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
118 |
isInterface |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
119 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
120 |
^false |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
121 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
122 |
"Created: / 31-05-2011 / 16:07:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
123 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
124 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
125 |
!BooleanArray class methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
126 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
127 |
isInterface |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
128 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
129 |
^false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
130 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
131 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
132 |
!BooleanArray class methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
133 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
134 |
isJavaArrayClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
135 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
136 |
^true |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
137 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
138 |
"Created: / 20-12-2010 / 22:47:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
139 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
140 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
141 |
!BooleanArray class methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
142 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
143 |
isJavaReferenceType |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
144 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
145 |
"Java arrays are reference types" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
146 |
^true |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
147 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
148 |
"Created: / 20-12-2010 / 22:30:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
149 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
150 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
151 |
!BooleanArray class methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
152 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
153 |
javaArrayClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
154 |
^ JavaArray javaArrayClassFor: self |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
155 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
156 |
"Created: / 06-12-2011 / 17:29:22 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
157 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
158 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
159 |
!BooleanArray class methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
160 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
161 |
javaComponentClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
162 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
163 |
^Boolean |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
164 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
165 |
"Created: / 20-12-2010 / 22:13:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
166 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
167 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
168 |
!BooleanArray class methodsFor:'accessing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
169 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
170 |
javaName |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
171 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
172 |
^'[Z'. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
173 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
174 |
"Modified: / 31-08-2011 / 23:57:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
175 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
176 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
177 |
!ByteArray class methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
178 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
179 |
isInterface |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
180 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
181 |
^false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
182 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
183 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
184 |
!ByteArray class methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
185 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
186 |
isJavaArrayClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
187 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
188 |
^true |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
189 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
190 |
"Created: / 05-02-2011 / 22:45:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
191 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
192 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
193 |
!ByteArray class methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
194 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
195 |
isJavaReferenceType |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
196 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
197 |
"Java arrays are reference types" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
198 |
^true |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
199 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
200 |
"Created: / 20-12-2010 / 22:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
201 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
202 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
203 |
!ByteArray class methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
204 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
205 |
javaArrayClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
206 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
207 |
^JavaArray javaArrayClassFor: self |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
208 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
209 |
"Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
210 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
211 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
212 |
!ByteArray class methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
213 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
214 |
javaComponentClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
215 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
216 |
^JavaByte |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
217 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
218 |
"Created: / 20-12-2010 / 22:05:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
219 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
220 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
221 |
!ByteArray class methodsFor:'accessing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
222 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
223 |
javaName |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
224 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
225 |
^'[B'. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
226 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
227 |
"Modified: / 25-02-2011 / 19:02:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
228 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
229 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
230 |
!Character class methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
231 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
232 |
isJavaPrimitiveType |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
233 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
234 |
^true |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
235 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
236 |
"Created: / 20-12-2010 / 22:18:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
237 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
238 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
239 |
!Character class methodsFor:'accessing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
240 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
241 |
javaArrayClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
242 |
^ String |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
243 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
244 |
"Created: / 11-02-2011 / 10:44:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
245 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
246 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
247 |
!Character class methodsFor:'autoboxing support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
248 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
249 |
javaBox: anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
250 |
| wrapper | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
251 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
252 |
wrapper := (JavaVM classForName: 'java.lang.Character') new. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
253 |
wrapper perform: #'<init>(C)V' with: anObject codePoint. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
254 |
^ wrapper |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
255 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
256 |
"Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
257 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
258 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
259 |
!Character class methodsFor:'accessing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
260 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
261 |
javaName |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
262 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
263 |
^'char'. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
264 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
265 |
"Modified: / 25-02-2011 / 18:58:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
266 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
267 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
268 |
!Character class methodsFor:'autoboxing support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
269 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
270 |
javaUnbox: object onError: errorBlock |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
271 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
272 |
| value | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
273 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
274 |
(object class name = 'java/lang/Character') ifFalse:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
275 |
errorBlock value. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
276 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
277 |
value := object instVarNamed: #value. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
278 |
(value between: 0 and: 255) ifFalse:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
279 |
errorBlock value. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
280 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
281 |
^value |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
282 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
283 |
"Created: / 22-11-2011 / 11:52:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
284 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
285 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
286 |
!Character class methodsFor:'accessing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
287 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
288 |
javaWrapperClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
289 |
^(Java classForName: 'java.lang.Character') |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
290 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
291 |
"Created: / 24-02-2012 / 19:42:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
292 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
293 |
|
1032 | 294 |
!CharacterArray methodsFor:'java conversions'! |
295 |
||
1061 | 296 |
asDottedJavaClassName |
297 |
||
298 |
" |
|
299 |
examples: |
|
1159 | 300 |
java.lang.String |
1061 | 301 |
[[[Ljava/lang/Object; => java.lang.Object |
302 |
" |
|
303 |
||
304 |
||
305 |
| nm | |
|
306 |
nm := self asJavaComponentClassName. |
|
307 |
(nm startsWith: $L) ifTrue: [ |
|
1159 | 308 |
nm := nm copyFrom: 2 to: nm size - 1 |
1061 | 309 |
]. |
310 |
(nm includes: $/) ifTrue: [ |
|
1159 | 311 |
nm := nm asString copyReplaceAll: $/ with: $. |
1061 | 312 |
]. |
313 |
^ nm. |
|
314 |
||
315 |
"Created: / 21-10-2011 / 12:31:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
316 |
"Created: / 30-10-2011 / 17:41:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
317 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
318 |
|
1061 | 319 |
!CharacterArray methodsFor:'java conversions'! |
320 |
||
1036 | 321 |
asInternalJavaClassName |
1060 | 322 |
|
323 |
<resource: #obsolete> |
|
324 |
||
325 |
^self asSlashedJavaClassName |
|
1036 | 326 |
|
327 |
"Created: / 21-10-2011 / 12:31:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1060 | 328 |
"Modified: / 30-10-2011 / 17:40:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1036 | 329 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
330 |
|
1036 | 331 |
!CharacterArray methodsFor:'java conversions'! |
332 |
||
1032 | 333 |
asJavaComponentClassName |
334 |
| componentClassName | |
|
335 |
||
336 |
componentClassName := self utf8Encoded. |
|
337 |
(componentClassName matches: '*\[*') ifTrue: [ |
|
1159 | 338 |
componentClassName := componentClassName |
339 |
copyFrom: (componentClassName lastIndexOf: $[) + 1 |
|
340 |
to: componentClassName size. |
|
341 |
]. |
|
1032 | 342 |
^ componentClassName. |
343 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
344 |
|
1032 | 345 |
!CharacterArray methodsFor:'java conversions'! |
346 |
||
1036 | 347 |
asJavaishClassName |
1060 | 348 |
|
349 |
<resource: #obsolete> |
|
350 |
||
351 |
^self asDottedJavaClassName. |
|
1036 | 352 |
|
353 |
"Created: / 21-10-2011 / 12:33:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1060 | 354 |
"Modified: / 30-10-2011 / 17:41:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1036 | 355 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
356 |
|
1036 | 357 |
!CharacterArray methodsFor:'java conversions'! |
358 |
||
1032 | 359 |
asNiceJavaClassName |
360 |
| niceName | |
|
361 |
||
362 |
niceName := self asJavaComponentClassName asSTXInternalJavaClassName. |
|
363 |
(self occurrencesOf: $[) timesRepeat: [ niceName := niceName , '[]' ]. |
|
364 |
niceName := niceName asString copyReplaceAll: $/ with: $.. |
|
365 |
^ niceName. |
|
366 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
367 |
|
1032 | 368 |
!CharacterArray methodsFor:'java conversions'! |
369 |
||
370 |
asSTXInternalJavaClassName |
|
371 |
| internalName | |
|
372 |
||
373 |
internalName := self asJavaComponentClassName. |
|
374 |
(internalName startsWith: $L) ifTrue: [ |
|
1159 | 375 |
internalName := internalName copyFrom: 2 to: internalName size - 1 |
1032 | 376 |
]. |
377 |
(internalName includes: $.) ifTrue: [ |
|
1159 | 378 |
internalName := internalName asString copyReplaceAll: $. with: $/ |
1032 | 379 |
]. |
380 |
^internalName. |
|
381 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
382 |
|
1061 | 383 |
!CharacterArray methodsFor:'java conversions'! |
384 |
||
385 |
asSlashedJavaClassName |
|
386 |
"removes square brackets and adds slashes" |
|
387 |
| internalName | |
|
388 |
internalName := self asJavaComponentClassName. |
|
389 |
(internalName startsWith: $L) ifTrue: [ |
|
1159 | 390 |
internalName := internalName copyFrom: 2 to: internalName size - 1 |
1061 | 391 |
]. |
392 |
(internalName includes: $.) ifTrue: [ |
|
1159 | 393 |
internalName := internalName asString copyReplaceAll: $. with: $/ |
1061 | 394 |
]. |
395 |
^ internalName. |
|
396 |
||
397 |
"Created: / 21-10-2011 / 12:31:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
398 |
"Created: / 30-10-2011 / 17:40:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
399 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
400 |
|
1032 | 401 |
!CharacterArray methodsFor:'java queries'! |
402 |
||
403 |
isJavaArrayDescriptor |
|
404 |
^ self startsWith:$[. |
|
405 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
406 |
|
1032 | 407 |
!CharacterArray methodsFor:'java queries'! |
408 |
||
409 |
isJavaPrimitiveTypeDescriptor |
|
410 |
^ (self size = 1 and: [ JavaDescriptor baseTypes includesKey: self first ]). |
|
411 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
412 |
|
1868 | 413 |
!CharacterArray methodsFor:'special string converting'! |
414 |
||
415 |
withoutSuffix: aString |
|
416 |
"if the receiver endsWith aString, return a copy without it. |
|
417 |
Otherwise return the receiver" |
|
418 |
||
419 |
(self endsWith: aString) ifTrue: [ |
|
420 |
^ self copyFrom: 1 to: self size - aString size |
|
421 |
]. |
|
422 |
^ self |
|
423 |
||
424 |
" |
|
425 |
'helloworld' withoutSuffix:'world' |
|
426 |
'helloworld' withoutSuffix:'foo'" |
|
427 |
||
428 |
"Created: / 08-12-2012 / 20:26:27 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>" |
|
429 |
! ! |
|
430 |
||
752 | 431 |
!CharacterArray class methodsFor:'encoding & decoding'! |
432 |
||
1159 | 433 |
decodeFromJavaUTF8: bytes |
752 | 434 |
"Decodes a string from modified UTF8 encoding |
435 |
as used in Java .class files. see |
|
436 |
'The class file format specification', section 4.5.7" |
|
1159 | 437 |
|
752 | 438 |
| string i s b codePoint realLength | |
439 |
||
440 |
string := String new: bytes size. |
|
441 |
realLength := bytes size. |
|
442 |
s := bytes readStream. |
|
443 |
i := 1. |
|
1159 | 444 |
[ s atEnd ] whileFalse: |
1253 | 445 |
[ b := s next. |
446 |
(b & 2r10000000) == 0 |
|
447 |
ifTrue: [ codePoint := b ] |
|
448 |
ifFalse: |
|
449 |
[ self assert: (b & 2r01000000) = 2r01000000. |
|
450 |
(b & 2r00100000) = 0 |
|
451 |
ifTrue: |
|
452 |
[ "two byte utf char" |
|
453 |
realLength := realLength - 1. |
|
454 |
self assert: s size > 0. |
|
455 |
self assert: (b & 2r01000000) = 2r01000000. |
|
456 |
string bitsPerCharacter < 16 |
|
457 |
ifTrue: [ string := Unicode16String fromString: string ]. |
|
458 |
codePoint := (b & 2r00011111) << 6. |
|
459 |
b := s next. |
|
460 |
self assert: (b & 2r11000000) = 2r10000000. |
|
461 |
codePoint := codePoint + (b & 2r00111111). ] |
|
462 |
ifFalse: |
|
463 |
[ "at lease 3 byte utf char" |
|
464 |
realLength := realLength - 2. |
|
465 |
string bitsPerCharacter < 16"was: 32" |
|
466 |
ifTrue: [ string := Unicode16String"was: Unicode32String" fromString: string ]. |
|
467 |
self assert: s size > 1. |
|
468 |
(b & 2r00010000) = 0 |
|
469 |
ifTrue: |
|
470 |
[ | utf32Possible utf32Value | |
|
752 | 471 |
|
1253 | 472 |
"3 or 6 byte utf char" |
473 |
self assert: s size > 1. |
|
474 |
s size < 5 |
|
475 |
ifTrue: [ utf32Possible := false ] |
|
476 |
ifFalse: [ utf32Possible := true ]. |
|
477 |
b ~= 2r11101101 ifTrue: [ utf32Possible := false ]. |
|
478 |
codePoint := (b & 2r00001111) << 12. |
|
479 |
b := s next. |
|
480 |
self assert: (b & 2r11000000) = 2r10000000. |
|
481 |
((b & 2r11110000) = 2r10100000 and: [ utf32Possible ]) |
|
482 |
ifTrue: [ utf32Value := 2r00010000 + ((b & 2r00001111) << 16) ] |
|
483 |
ifFalse: [ utf32Possible := false ]. |
|
484 |
codePoint := codePoint + ((b & 2r00111111) << 6). |
|
485 |
b := s next. |
|
486 |
self assert: (b & 2r11000000) = 2r10000000. |
|
487 |
utf32Possible |
|
488 |
ifTrue: [ utf32Value := utf32Value + ((b & 2r00111111) << 10) ]. |
|
489 |
codePoint := codePoint + (b & 2r00111111). |
|
490 |
utf32Possible |
|
491 |
ifTrue: |
|
492 |
[ | tmpB | |
|
752 | 493 |
|
1253 | 494 |
string bitsPerCharacter < 32 |
495 |
ifTrue: [ string := Unicode32String fromString: string ]. |
|
496 |
tmpB := s copy. |
|
497 |
b := tmpB next. |
|
498 |
b = 2r11101101 |
|
499 |
ifTrue: |
|
500 |
[ b := tmpB next. |
|
501 |
(b & 2r11110000) = 2r10110000 |
|
502 |
ifTrue: |
|
503 |
[ utf32Value := utf32Value + ((b & 2r00001111) << 6). |
|
504 |
b := tmpB next. |
|
505 |
self assert: (b & 2r11000000) = 2r10000000. |
|
506 |
utf32Value := utf32Value + (b & 2r00111111). |
|
507 |
codePoint := utf32Value. |
|
508 |
realLength := realLength - 3. s position: tmpB position.] ] ] ] |
|
509 |
ifFalse: |
|
510 |
[ "should not happen, ask mh" |
|
511 |
self halt. ] ] ]. |
|
512 |
string at: i put: (Character codePoint: codePoint). |
|
513 |
i := i + 1. ]. |
|
752 | 514 |
^ string subString: 1 to: realLength. |
515 |
||
516 |
" |
|
1253 | 517 |
String decodeFromJavaUTF8: 'Hello world' asByteArray" |
752 | 518 |
|
519 |
"Created: / 22-12-2010 / 23:45:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
520 |
"Modified: / 09-02-2011 / 01:12:25 / Marcel Hlopko <hlopik@gmail.com>" |
|
521 |
"Modified: / 13-03-2011 / 15:52:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1253 | 522 |
"Modified: / 09-12-2011 / 19:49:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
752 | 523 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
524 |
|
752 | 525 |
!CharacterArray class methodsFor:'instance creation'! |
526 |
||
527 |
fromJavaUTF8Bytes:aByteCollection |
|
528 |
"return a new string which represents the characters as decoded |
|
1159 | 529 |
from the modified utf8 encoded bytes as specified in |
752 | 530 |
The class file format specification, section 4.5.7" |
531 |
||
532 |
^ self decodeFromJavaUTF8:aByteCollection. |
|
533 |
||
534 |
" |
|
535 |
CharacterArray fromUTF8Bytes:#[ 16r41 16r42 ] |
|
536 |
CharacterArray fromUTF8Bytes:#[ 16rC1 16r02 ] |
|
537 |
CharacterArray fromUTF8Bytes:#[ 16rE0 16r81 16r02 ] |
|
538 |
CharacterArray fromUTF8Bytes:#[ 16rEF 16rBF 16rBF ] |
|
539 |
||
540 |
rfc2279 examples: |
|
541 |
CharacterArray fromUTF8Bytes:#[ 16r41 16rE2 16r89 16rA2 16rCE 16r91 16r2E ] |
|
542 |
CharacterArray fromUTF8Bytes:#[ 16rED 16r95 16r9C 16rEA 16rB5 16rAD 16rEC 16r96 16rB4 ] |
|
543 |
CharacterArray fromUTF8Bytes:#[ 16rE6 16r97 16rA5 16rE6 16r9C 16rAC 16rE8 16rAA 16r9E ] |
|
544 |
||
545 |
invalid: |
|
546 |
CharacterArray fromUTF8Bytes:#[ 16rC0 16r80 ] |
|
547 |
CharacterArray fromUTF8Bytes:#[ 16rE0 16r80 16r80 ] |
|
548 |
" |
|
549 |
||
550 |
"Created: / 23-12-2010 / 09:01:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
551 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
552 |
|
865 | 553 |
!CharacterArray class methodsFor:'queries'! |
554 |
||
555 |
isJavaArrayClass |
|
556 |
||
557 |
^true |
|
558 |
||
559 |
"Created: / 05-02-2011 / 22:45:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
560 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
561 |
|
865 | 562 |
!CharacterArray class methodsFor:'accessing-java'! |
563 |
||
564 |
javaArrayClass |
|
565 |
||
901 | 566 |
^JavaArray javaArrayClassFor: Unicode16String |
865 | 567 |
|
568 |
"Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
901 | 569 |
"Modified: / 10-08-2011 / 13:18:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
865 | 570 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
571 |
|
865 | 572 |
!CharacterArray class methodsFor:'accessing-java'! |
573 |
||
574 |
javaComponentClass |
|
575 |
||
576 |
^Character |
|
577 |
||
578 |
"Created: / 20-12-2010 / 22:05:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
579 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
580 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
581 |
!Class methodsFor:'accessing - java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
582 |
|
1649
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
583 |
classLoader |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
584 |
JavaVM smalltalkClassLoader |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
585 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
586 |
"Created: / 22-08-2012 / 13:00:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
587 |
! ! |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
588 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
589 |
!Class methodsFor:'accessing - java'! |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
590 |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
591 |
javaMirror |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
592 |
^self javaMirrorClass forClass: self. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
593 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
594 |
"Created: / 31-07-2012 / 17:39:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
595 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
596 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
597 |
!Class methodsFor:'accessing - java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
598 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
599 |
javaMirrorClass |
1695 | 600 |
"Returns a Java mirror class to be used by Java reflection" |
601 |
||
602 |
self isJavaPrimitiveType ifTrue:[ ^ JavaMirror mirrorClassForJavaPrimitive ]. |
|
603 |
self isJavaArrayClass ifTrue:[ ^ JavaMirror mirrorClassForJavaArray ]. |
|
604 |
^JavaMirror mirrorClassForAlienClass |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
605 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
606 |
"Created: / 31-07-2012 / 17:39:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
607 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
608 |
|
1656
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
609 |
!Class methodsFor:'accessing - java'! |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
610 |
|
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
611 |
lookupMethodByNameAndType: nameAndType |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
612 |
| descriptor selector | |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
613 |
|
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
614 |
descriptor := JavaMethodDescriptor fromString: (nameAndType descriptor). |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
615 |
selector := nameAndType name copyReplaceAll: $_ with: $:. |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
616 |
descriptor numArgs > 0 ifTrue:[selector := selector , ':']. |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
617 |
selector := selector asSymbol. |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
618 |
|
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
619 |
^self lookupMethodFor: selector |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
620 |
|
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
621 |
"Created: / 22-08-2012 / 13:11:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
622 |
! ! |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
623 |
|
1368 | 624 |
!ConfigurableFeatures class methodsFor:'queries-features'! |
625 |
||
626 |
hasJavaSupport |
|
627 |
"/ use Smalltalk-at to trick the dependency/prerequisite generator |
|
628 |
^ (Smalltalk at: #'JavaVM' ifAbsent:nil) notNil |
|
629 |
||
630 |
" |
|
631 |
ConfigurableFeatures hasJavaSupport |
|
632 |
ConfigurableFeatures includesFeature:#JavaSupport |
|
633 |
" |
|
634 |
||
635 |
"Created: / 03-01-2012 / 15:36:03 / cg" |
|
636 |
"Created: / 18-02-2012 / 16:42:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
637 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
638 |
|
2019
e1291a81f215
Finished uncached trampoline.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1987
diff
changeset
|
639 |
!Context methodsFor:'accessing'! |
e1291a81f215
Finished uncached trampoline.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1987
diff
changeset
|
640 |
|
e1291a81f215
Finished uncached trampoline.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1987
diff
changeset
|
641 |
arg1Index |
e1291a81f215
Finished uncached trampoline.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1987
diff
changeset
|
642 |
^1 |
e1291a81f215
Finished uncached trampoline.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1987
diff
changeset
|
643 |
|
e1291a81f215
Finished uncached trampoline.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1987
diff
changeset
|
644 |
"Created: / 31-01-2013 / 13:29:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e1291a81f215
Finished uncached trampoline.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1987
diff
changeset
|
645 |
! ! |
e1291a81f215
Finished uncached trampoline.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1987
diff
changeset
|
646 |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
647 |
!Delay methodsFor:'delaying'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
648 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
649 |
waitWithState:state |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
650 |
"suspend the current process until either the relative time delta |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
651 |
has passed (if millisecondDelta is non-nil), or the absolute millisecondTime |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
652 |
has been reached (if resumptionTime non-nil)." |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
653 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
654 |
| wasBlocked currentDelta dueTime now then | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
655 |
isInterrupted := false. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
656 |
millisecondDelta notNil ifTrue: [ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
657 |
now := OperatingSystem getMillisecondTime. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
658 |
currentDelta := millisecondDelta rounded. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
659 |
currentDelta > 16r0fffffff ifTrue: [ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
660 |
"NOTE: the microsecondTime is increasing monotonically, |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
661 |
while millisecondTime is wrapping at 16r1fffffff. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
662 |
So use the microsecondTime to check when we are finished" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
663 |
dueTime := OperatingSystem getMicrosecondTime + (currentDelta * 1000). |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
664 |
currentDelta := 16r0fffffff. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
665 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
666 |
then := OperatingSystem millisecondTimeAdd: now and: currentDelta. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
667 |
] ifFalse: [ then := resumptionTime. ]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
668 |
wasBlocked := OperatingSystem blockInterrupts. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
669 |
[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
670 |
[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
671 |
Processor signal: delaySemaphore atMilliseconds: then. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
672 |
Processor activeProcess state: state. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
673 |
delaySemaphore wait. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
674 |
] doWhile: [ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
675 |
(dueTime notNil |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
676 |
and: [ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
677 |
isInterrupted not |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
678 |
and: [ (currentDelta := dueTime - OperatingSystem getMicrosecondTime) > 0 ] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
679 |
]) |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
680 |
ifTrue: [ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
681 |
currentDelta := (currentDelta // 1000) min: 16r0fffffff. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
682 |
now := OperatingSystem getMillisecondTime. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
683 |
then := OperatingSystem millisecondTimeAdd: now and: currentDelta. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
684 |
true. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
685 |
] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
686 |
ifFalse: [ false ] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
687 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
688 |
] ensure: [ wasBlocked ifFalse: [ OperatingSystem unblockInterrupts ]. ] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
689 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
690 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
691 |
Transcript showCR:'1'. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
692 |
(Delay forSeconds:10) wait. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
693 |
Transcript showCR:'2'." |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
694 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
695 |
"Modified: / 26-02-1997 / 15:21:35 / cg" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
696 |
"Modified: / 18-04-1997 / 11:56:46 / stefan" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
697 |
"Created: / 30-11-2011 / 13:38:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
698 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
699 |
|
826
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
700 |
!DoubleArray class methodsFor:'testing'! |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
701 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
702 |
isInterface |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
703 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
704 |
^false |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
705 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
706 |
|
752 | 707 |
!DoubleArray class methodsFor:'queries'! |
708 |
||
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
709 |
isJavaArrayClass |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
710 |
|
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
711 |
^true |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
712 |
|
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
713 |
"Created: / 20-12-2010 / 22:47:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
714 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
715 |
|
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
716 |
!DoubleArray class methodsFor:'queries'! |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
717 |
|
752 | 718 |
isJavaReferenceType |
719 |
||
720 |
"Java arrays are reference types" |
|
721 |
^true |
|
722 |
||
723 |
"Created: / 20-12-2010 / 22:30:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
724 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
725 |
|
752 | 726 |
!DoubleArray class methodsFor:'accessing-java'! |
727 |
||
1226 | 728 |
javaArrayClass |
729 |
^ JavaArray javaArrayClassFor: self. |
|
730 |
||
731 |
"Created: / 06-12-2011 / 17:28:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
732 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
733 |
|
1226 | 734 |
!DoubleArray class methodsFor:'accessing-java'! |
735 |
||
752 | 736 |
javaComponentClass |
737 |
||
738 |
^Float |
|
739 |
||
740 |
"Created: / 20-12-2010 / 22:06:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
741 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
742 |
|
752 | 743 |
!DoubleArray class methodsFor:'accessing'! |
744 |
||
745 |
javaName |
|
746 |
||
747 |
^'[D'. |
|
748 |
||
749 |
"Modified: / 25-02-2011 / 19:03:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
750 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
751 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
752 |
!ExecutableFunction methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
753 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
754 |
isJavaConstructor |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
755 |
^ false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
756 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
757 |
"Created: / 31-07-2012 / 18:42:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
758 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
759 |
|
1893
167f2898b9ad
bugfix - interop - narrowed return type synthetic methods
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1886
diff
changeset
|
760 |
!ExecutableFunction methodsFor:'queries'! |
167f2898b9ad
bugfix - interop - narrowed return type synthetic methods
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1886
diff
changeset
|
761 |
|
167f2898b9ad
bugfix - interop - narrowed return type synthetic methods
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1886
diff
changeset
|
762 |
isProxyMethod |
167f2898b9ad
bugfix - interop - narrowed return type synthetic methods
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1886
diff
changeset
|
763 |
"return true, if the receiver is a proxy method. |
167f2898b9ad
bugfix - interop - narrowed return type synthetic methods
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1886
diff
changeset
|
764 |
false is returned here, true is returned in ProxyMethod." |
167f2898b9ad
bugfix - interop - narrowed return type synthetic methods
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1886
diff
changeset
|
765 |
|
167f2898b9ad
bugfix - interop - narrowed return type synthetic methods
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1886
diff
changeset
|
766 |
^ false. |
167f2898b9ad
bugfix - interop - narrowed return type synthetic methods
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1886
diff
changeset
|
767 |
|
167f2898b9ad
bugfix - interop - narrowed return type synthetic methods
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1886
diff
changeset
|
768 |
"Created: / 16-12-2012 / 13:35:41 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>" |
167f2898b9ad
bugfix - interop - narrowed return type synthetic methods
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1886
diff
changeset
|
769 |
! ! |
167f2898b9ad
bugfix - interop - narrowed return type synthetic methods
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1886
diff
changeset
|
770 |
|
752 | 771 |
!Float class methodsFor:'queries'! |
772 |
||
773 |
isJavaPrimitiveType |
|
774 |
||
775 |
^true |
|
776 |
||
777 |
"Created: / 06-02-2011 / 17:21:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
778 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
779 |
|
752 | 780 |
!Float class methodsFor:'accessing'! |
781 |
||
851 | 782 |
javaArrayClass |
783 |
^ DoubleArray |
|
784 |
||
785 |
"Created: / 11-02-2011 / 10:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
786 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
787 |
|
917 | 788 |
!Float class methodsFor:'autoboxing support'! |
789 |
||
1159 | 790 |
javaBox: anObject |
917 | 791 |
| wrapper | |
792 |
||
1033 | 793 |
wrapper := (JavaVM classForName: 'java.lang.Double') new. |
917 | 794 |
wrapper perform: #'<init>(D)V' with: anObject. |
1033 | 795 |
^ wrapper |
917 | 796 |
|
797 |
"Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
798 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
799 |
|
851 | 800 |
!Float class methodsFor:'accessing'! |
801 |
||
752 | 802 |
javaName |
803 |
||
804 |
^'double'. |
|
805 |
||
806 |
"Modified: / 25-02-2011 / 18:59:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
807 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
808 |
|
1386 | 809 |
!Float class methodsFor:'accessing'! |
810 |
||
811 |
javaWrapperClass |
|
812 |
^(Java classForName: 'java.lang.Double') |
|
813 |
||
814 |
"Created: / 24-02-2012 / 19:42:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
815 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
816 |
|
826
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
817 |
!FloatArray class methodsFor:'testing'! |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
818 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
819 |
isInterface |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
820 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
821 |
^false |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
822 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
823 |
|
752 | 824 |
!FloatArray class methodsFor:'queries'! |
825 |
||
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
826 |
isJavaArrayClass |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
827 |
|
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
828 |
^true |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
829 |
|
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
830 |
"Created: / 20-12-2010 / 22:47:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
831 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
832 |
|
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
833 |
!FloatArray class methodsFor:'queries'! |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
834 |
|
752 | 835 |
isJavaReferenceType |
836 |
||
837 |
"Java arrays are reference types" |
|
838 |
^true |
|
839 |
||
840 |
"Created: / 20-12-2010 / 22:30:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
841 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
842 |
|
752 | 843 |
!FloatArray class methodsFor:'accessing-java'! |
844 |
||
1226 | 845 |
javaArrayClass |
846 |
^ JavaArray javaArrayClassFor: self. |
|
847 |
||
848 |
"Created: / 06-12-2011 / 17:29:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
849 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
850 |
|
1226 | 851 |
!FloatArray class methodsFor:'accessing-java'! |
852 |
||
752 | 853 |
javaComponentClass |
854 |
||
855 |
^ShortFloat |
|
856 |
||
857 |
"Created: / 20-12-2010 / 22:06:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
858 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
859 |
|
752 | 860 |
!FloatArray class methodsFor:'accessing'! |
861 |
||
862 |
javaName |
|
863 |
||
864 |
^'[F'. |
|
865 |
||
866 |
"Modified: / 25-02-2011 / 19:03:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
867 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
868 |
|
752 | 869 |
!Integer class methodsFor:'queries'! |
870 |
||
871 |
isJavaPrimitiveType |
|
872 |
||
873 |
^true |
|
874 |
||
875 |
"Created: / 11-02-2011 / 11:12:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
876 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
877 |
|
752 | 878 |
!Integer class methodsFor:'accessing'! |
879 |
||
851 | 880 |
javaArrayClass |
873
933263bd2d27
Fixes for primitive array types (uses Signed* variant of an array)
vranyj1
parents:
866
diff
changeset
|
881 |
^ SignedIntegerArray |
851 | 882 |
|
883 |
"Created: / 11-02-2011 / 10:51:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
884 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
885 |
|
917 | 886 |
!Integer class methodsFor:'autoboxing support'! |
887 |
||
1159 | 888 |
javaBox: anObject |
917 | 889 |
| wrapper | |
890 |
||
1033 | 891 |
wrapper := (JavaVM classForName: 'java.lang.Integer') new. |
917 | 892 |
wrapper perform: #'<init>(I)V' with: anObject. |
1033 | 893 |
^ wrapper |
917 | 894 |
|
895 |
"Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
896 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
897 |
|
851 | 898 |
!Integer class methodsFor:'accessing'! |
899 |
||
752 | 900 |
javaName |
901 |
||
902 |
^'int'. |
|
903 |
||
904 |
"Modified: / 25-02-2011 / 18:59:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
905 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
906 |
|
1204 | 907 |
!Integer class methodsFor:'autoboxing support'! |
908 |
||
909 |
javaUnbox: object onError: errorBlock |
|
910 |
||
911 |
^self javaUnbox: object onError: errorBlock |
|
912 |
min: "Integer.MIN_VALUE"-2147483648 |
|
913 |
max: "Integer.MAX_VALUE" 2147483647 |
|
914 |
||
915 |
"Created: / 25-11-2011 / 19:10:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
916 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
917 |
|
1205 | 918 |
!Integer class methodsFor:'autoboxing support'! |
919 |
||
920 |
javaUnbox: object onError: errorBlock min: min max: max |
|
921 |
||
922 |
| value | |
|
923 |
||
924 |
(#( 'java/lang/Byte' |
|
925 |
'java/lang/Short' |
|
926 |
'java/lang/Integer' |
|
927 |
"'java/lang/Long'" ) includes: object class name) ifFalse:[ |
|
928 |
errorBlock value. |
|
929 |
]. |
|
930 |
||
931 |
value := object instVarNamed:#value. |
|
932 |
(value between: min and: max) ifFalse:[ |
|
933 |
errorBlock value. |
|
934 |
]. |
|
935 |
^value |
|
936 |
||
937 |
"Created: / 22-11-2011 / 11:43:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
938 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
939 |
|
1386 | 940 |
!Integer class methodsFor:'accessing'! |
941 |
||
942 |
javaWrapperClass |
|
943 |
^(Java classForName: 'java.lang.Integer') |
|
944 |
||
945 |
"Created: / 24-02-2012 / 19:41:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
946 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
947 |
|
752 | 948 |
!LargeInteger class methodsFor:'queries'! |
949 |
||
950 |
isJavaPrimitiveType |
|
951 |
||
952 |
^true |
|
953 |
||
954 |
"Created: / 04-02-2011 / 11:55:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
955 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
956 |
|
752 | 957 |
!LargeInteger class methodsFor:'accessing'! |
958 |
||
851 | 959 |
javaArrayClass |
873
933263bd2d27
Fixes for primitive array types (uses Signed* variant of an array)
vranyj1
parents:
866
diff
changeset
|
960 |
^ SignedLongIntegerArray |
851 | 961 |
|
962 |
"Created: / 11-02-2011 / 10:51:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
963 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
964 |
|
917 | 965 |
!LargeInteger class methodsFor:'autoboxing support'! |
966 |
||
1159 | 967 |
javaBox: anObject |
917 | 968 |
| wrapper | |
969 |
||
1033 | 970 |
wrapper := (JavaVM classForName: 'java.lang.Long') new. |
917 | 971 |
wrapper perform: #'<init>(J)V' with: anObject. |
1033 | 972 |
^ wrapper |
917 | 973 |
|
974 |
"Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
975 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
976 |
|
851 | 977 |
!LargeInteger class methodsFor:'accessing'! |
978 |
||
752 | 979 |
javaName |
980 |
||
981 |
^'long'. |
|
982 |
||
983 |
"Modified: / 25-02-2011 / 18:59:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
984 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
985 |
|
1204 | 986 |
!LargeInteger class methodsFor:'autoboxing support'! |
987 |
||
988 |
javaUnbox: object onError: errorBlock |
|
989 |
||
990 |
| value | |
|
991 |
||
992 |
(object class name = 'java/lang/Long') ifFalse:[ |
|
993 |
errorBlock value. |
|
994 |
]. |
|
995 |
||
996 |
value := object instVarNamed:#value. |
|
997 |
(value between: "Integer.MIN_VALUE"-9223372036854775808 and: "Integer.MAX_VALUE" 9223372036854775807) ifFalse:[ |
|
998 |
errorBlock value. |
|
999 |
]. |
|
1000 |
^value |
|
1001 |
||
1002 |
"Created: / 22-11-2011 / 11:45:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1003 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1004 |
|
1386 | 1005 |
!LargeInteger class methodsFor:'accessing'! |
1006 |
||
1007 |
javaWrapperClass |
|
1008 |
^(Java classForName: 'java.lang.Long') |
|
1009 |
||
1010 |
"Created: / 24-02-2012 / 19:42:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1011 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1012 |
|
1649
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1013 |
!Method methodsFor:'queries-java'! |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1014 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1015 |
isAbstract |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1016 |
"For compatibility with Java methods" |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1017 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1018 |
^false |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1019 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1020 |
"Created: / 22-08-2012 / 13:19:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1021 |
! ! |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1022 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1023 |
!Method methodsFor:'queries-java'! |
1648 | 1024 |
|
1025 |
isStatic |
|
1026 |
"For compatibility with Java methods" |
|
1027 |
||
1028 |
^mclass notNil and:[mclass isMetaclass] |
|
1029 |
||
1030 |
"Created: / 22-08-2012 / 12:27:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1031 |
! ! |
|
1032 |
||
1649
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1033 |
!Method methodsFor:'accessing-java'! |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1034 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1035 |
javaClass |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1036 |
"For compatibiliry with JavaMethod" |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1037 |
^mclass |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1038 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1039 |
"Created: / 22-08-2012 / 13:20:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1040 |
! ! |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1041 |
|
1691 | 1042 |
!Object methodsFor:'accessing-Java'! |
1043 |
||
1044 |
getJavaLockWord |
|
1045 |
"Returns a Java lock word for given object. The returned |
|
1046 |
value is |
|
1047 |
- either SmallInteger that encodes the thinlock |
|
1048 |
- or a fat lock, instance of JavaMonitor |
|
1049 |
" |
|
1050 |
||
1051 |
"/For nonJava objects, always return fatlock |
|
1052 |
||
1053 |
^self getJavaMonitor |
|
1054 |
||
1055 |
"Created: / 26-08-2012 / 14:03:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1056 |
! ! |
|
1057 |
||
1058 |
!Object methodsFor:'accessing-Java'! |
|
1059 |
||
1060 |
getJavaMonitor |
|
1061 |
"Returns fat JavaMonitor associated with the receiver" |
|
1062 |
||
1063 |
^JavaVM getJavaMonitorFor: self |
|
1064 |
||
1065 |
"Created: / 26-08-2012 / 18:35:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1066 |
! ! |
|
1067 |
||
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1068 |
!Object methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1069 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1070 |
isGroovyClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1071 |
^false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1072 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1073 |
"Created: / 18-02-2012 / 20:29:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1074 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1075 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1076 |
!Object methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1077 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1078 |
isJavaArray |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1079 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1080 |
^self class isJavaArrayClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1081 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1082 |
"Created: / 19-12-2010 / 17:05:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1083 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1084 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1085 |
!Object methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1086 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1087 |
isJavaNameAndType |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1088 |
"return true, if given object represents name and type struct in java constant pool" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1089 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1090 |
^ false. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1091 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1092 |
"Created: / 10-05-2011 / 12:21:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1093 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1094 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1095 |
!Object methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1096 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1097 |
isJavaPackage |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1098 |
"return true, if the receiver is a java package. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1099 |
False is returned here - the method is only redefined in JavaPackage." |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1100 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1101 |
^ false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1102 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1103 |
"Created: / 09-08-2011 / 09:35:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1104 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1105 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1106 |
!Object methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1107 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1108 |
isJavaRef |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1109 |
"return true, if given object represents reference in java constant pool" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1110 |
^ false. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1111 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1112 |
"Created: / 08-04-2011 / 16:12:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1113 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1114 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1115 |
!Object methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1116 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1117 |
isJavaWrapperClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1118 |
"return true, if this is a java wrapper class, i.e, java.lang.Integer, java.lang.Boolean etc." |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1119 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1120 |
^ false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1121 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1122 |
"Created: / 01-01-2012 / 17:25:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1123 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1124 |
|
1617 | 1125 |
!Object methodsFor:'testing'! |
1126 |
||
1127 |
isSocket |
|
1128 |
"return true, if the receiver is some kind of socket; |
|
1129 |
false returned here - the method is only redefined in Socket." |
|
1130 |
||
1131 |
^ false |
|
1132 |
||
1133 |
"Created: / 17-08-2012 / 15:32:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1134 |
! ! |
|
1135 |
||
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1136 |
!Object methodsFor:'autoboxing support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1137 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1138 |
javaBox: anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1139 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1140 |
^anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1141 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1142 |
"Created: / 15-08-2011 / 10:52:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1143 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1144 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1145 |
!Object methodsFor:'autoboxing support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1146 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1147 |
javaUnwrap: anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1148 |
"Unwraps the objects. Possibly call on the wrapped class" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1149 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1150 |
^anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1151 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1152 |
"Created: / 10-12-2011 / 19:51:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1153 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1154 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1155 |
!Object methodsFor:'autoboxing support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1156 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1157 |
javaUnwrapFrom: javaType |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1158 |
^ self. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1159 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1160 |
"Created: / 10-12-2011 / 19:51:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1161 |
"Created: / 30-12-2011 / 15:22:06 / kursjan <kursjan@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1162 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1163 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1164 |
!Object methodsFor:'autoboxing support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1165 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1166 |
javaWrap: anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1167 |
"Wraps the receiver into corresponding Java object" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1168 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1169 |
^anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1170 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1171 |
"Created: / 26-12-2011 / 00:57:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1172 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1173 |
|
1807 | 1174 |
!Object methodsFor:'autoboxing support'! |
1175 |
||
1176 |
javaWrapRequired |
|
1177 |
"Returns true, if a #javaWrap: has to be called |
|
1178 |
prior an instance of Smalltalk object is passed |
|
1179 |
as an argument to Java method, whoose formal tyoe |
|
1180 |
is the receiver. |
|
1181 |
||
1182 |
Example: |
|
1183 |
Let's say the Java method is declared as |
|
1184 |
||
1185 |
publid void setCount(int c) { ... } |
|
1186 |
||
1187 |
and Smalltalk calls |
|
1188 |
||
1189 |
obj setCount: 0 |
|
1190 |
||
1191 |
then 'Integer javaWrapRequired' should return false as there |
|
1192 |
is no need to wrap SmallInt as it represent java int values. |
|
1193 |
(Integer is formal type of argument c. |
|
1194 |
||
1195 |
If the method is declared as: |
|
1196 |
||
1197 |
publid void setCount(java.lang.Integer c) { ... } |
|
1198 |
||
1199 |
then 'java.lang.Integer javaWrapRequired' should return true |
|
1200 |
as the integer value must be wrapped into an instance of |
|
1201 |
java.lang.Integer before it is passed to a Java method. |
|
1202 |
||
1203 |
" |
|
1204 |
||
1205 |
^false |
|
1206 |
||
1207 |
"Created: / 05-11-2012 / 00:29:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1208 |
! ! |
|
1209 |
||
752 | 1210 |
!Object class methodsFor:'queries'! |
1211 |
||
1212 |
isJavaArrayClass |
|
1213 |
||
1214 |
^false |
|
1215 |
||
1216 |
"Created: / 19-12-2010 / 17:05:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1217 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1218 |
|
752 | 1219 |
!Object class methodsFor:'queries'! |
1220 |
||
1221 |
isJavaClassType |
|
1222 |
||
1223 |
^false |
|
1224 |
||
1225 |
"Created: / 11-02-2011 / 08:08:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1226 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1227 |
|
752 | 1228 |
!Object class methodsFor:'queries'! |
1229 |
||
1230 |
isJavaReferenceType |
|
1231 |
||
1232 |
^false |
|
1233 |
||
1234 |
"Created: / 20-12-2010 / 21:52:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1235 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1236 |
|
752 | 1237 |
!Object class methodsFor:'queries'! |
1238 |
||
1239 |
isJavaType |
|
1240 |
||
1241 |
^false |
|
1242 |
||
1243 |
"Created: / 20-12-2010 / 21:52:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1244 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1245 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1246 |
!Process methodsFor:'Java protocol'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1247 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1248 |
clearInterrupted |
1615 | 1249 |
JavaVM clearInterrupted: self |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1250 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1251 |
"Created: / 30-11-2011 / 10:44:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
1615 | 1252 |
"Modified: / 16-08-2012 / 22:03:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1253 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1254 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1255 |
!Process methodsFor:'Java protocol'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1256 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1257 |
isInterrupted |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1258 |
|
1615 | 1259 |
^ JavaVM isInterrupted: self. |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1260 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1261 |
"Created: / 30-11-2011 / 12:12:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
1615 | 1262 |
"Modified: / 16-08-2012 / 21:56:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1263 |
! ! |
|
1264 |
||
1265 |
!Process methodsFor:'queries'! |
|
1266 |
||
1267 |
isParked |
|
1268 |
"return true, iff the receiver is parked (by means of sun.misc.Unsafe.park() )" |
|
1269 |
||
1270 |
^ (state == #parked) |
|
1271 |
||
1272 |
"Created: / 16-08-2012 / 22:13:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1273 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1274 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1275 |
!Process methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1276 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1277 |
isSleeping |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1278 |
"return true, iff the receiver is sleeping on Delay" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1279 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1280 |
^ (state == #sleep) |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1281 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1282 |
"Created: / 30-11-2011 / 13:35:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1283 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1284 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1285 |
!Process methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1286 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1287 |
isWaiting |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1288 |
"return true, iff the receiver is waiting on semaphore or something" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1289 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1290 |
^ (state == #wait) |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1291 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1292 |
"Created: / 20-11-2011 / 20:55:11 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1293 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1294 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1295 |
!Process methodsFor:'Java protocol'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1296 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1297 |
javaInterrupt |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1298 |
self isWaiting ifTrue: [ |
1615 | 1299 |
self interruptWith: [ |
1300 |
JavaVM throwInterruptedException: 'thread has been interrupted during wait'. |
|
1301 |
self terminate |
|
1302 |
]. |
|
1303 |
^self |
|
1304 |
]. |
|
1305 |
||
1306 |
self isSleeping ifTrue: [ |
|
1307 |
self interruptWith: [ |
|
1308 |
JavaVM throwInterruptedException: 'thread has been interrupted during sleep'. |
|
1309 |
self terminate |
|
1310 |
]. |
|
1311 |
^self |
|
1312 |
]. |
|
1313 |
||
1314 |
self isParked ifTrue:[ |
|
1315 |
self setInterrupted. |
|
1316 |
JavaVM unpark: self. |
|
1317 |
^self. |
|
1318 |
]. |
|
1319 |
||
1320 |
self setInterrupted |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1321 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1322 |
"Created: / 30-11-2011 / 13:35:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
1615 | 1323 |
"Modified: / 16-08-2012 / 22:14:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1324 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1325 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1326 |
!Process methodsFor:'Java protocol'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1327 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1328 |
setInterrupted |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1329 |
|
1615 | 1330 |
JavaVM setInterrupted: self |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1331 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1332 |
"Created: / 30-11-2011 / 10:44:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
1615 | 1333 |
"Modified: / 16-08-2012 / 22:03:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1334 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1335 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1336 |
!ProgrammingLanguage methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1337 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1338 |
isGroovy |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1339 |
"true iff this is a Groovy language" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1340 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1341 |
^ false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1342 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1343 |
"Created: / 13-04-2012 / 17:47:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1344 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1345 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1346 |
!ProgrammingLanguage methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1347 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1348 |
isJavaLike |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1349 |
"true if receiver is kind of Java language (based on Java)" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1350 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1351 |
^ false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1352 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1353 |
"Created: / 13-04-2012 / 17:48:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1354 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1355 |
|
1276
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1356 |
!ProjectDefinition class methodsFor:'description - java'! |
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1357 |
|
1951
4759acf61df0
Initial implementation of code libraries & bundles finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1893
diff
changeset
|
1358 |
javaBundle |
4759acf61df0
Initial implementation of code libraries & bundles finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1893
diff
changeset
|
1359 |
"Defines a Java code bundle provided by this package. |
4759acf61df0
Initial implementation of code libraries & bundles finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1893
diff
changeset
|
1360 |
Used by STX:LIBJAVA" |
4759acf61df0
Initial implementation of code libraries & bundles finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1893
diff
changeset
|
1361 |
|
4759acf61df0
Initial implementation of code libraries & bundles finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1893
diff
changeset
|
1362 |
^nil |
4759acf61df0
Initial implementation of code libraries & bundles finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1893
diff
changeset
|
1363 |
|
4759acf61df0
Initial implementation of code libraries & bundles finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1893
diff
changeset
|
1364 |
"Created: / 15-01-2013 / 16:49:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
4759acf61df0
Initial implementation of code libraries & bundles finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1893
diff
changeset
|
1365 |
! ! |
4759acf61df0
Initial implementation of code libraries & bundles finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1893
diff
changeset
|
1366 |
|
4759acf61df0
Initial implementation of code libraries & bundles finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1893
diff
changeset
|
1367 |
!ProjectDefinition class methodsFor:'description - java'! |
4759acf61df0
Initial implementation of code libraries & bundles finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1893
diff
changeset
|
1368 |
|
1276
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1369 |
javaClassPath |
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1370 |
|
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1371 |
"Defines a Java class path containing java classes/jars |
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1372 |
required by this package" |
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1373 |
|
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1374 |
^#() |
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1375 |
|
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1376 |
"Created: / 13-12-2011 / 23:48:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1377 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1378 |
|
1276
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1379 |
!ProjectDefinition class methodsFor:'description - java'! |
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1380 |
|
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1381 |
javaSourcePath |
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1382 |
|
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1383 |
"Defines paths to Java source files (for packages that |
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1384 |
contains Java code" |
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1385 |
^#() |
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1386 |
|
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1387 |
"Created: / 13-12-2011 / 23:49:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5a302466ecb8
Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents:
1263
diff
changeset
|
1388 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1389 |
|
1615 | 1390 |
!Semaphore methodsFor:'waiting'! |
1391 |
||
1392 |
parkWithTimeoutMs:milliSeconds |
|
1393 |
"Same as #waitWithTimeoutMs: but sets the state to #parked. |
|
1394 |
||
1395 |
Stupid, that I have to copy-paste this method... |
|
1396 |
" |
|
1397 |
||
1398 |
|activeProcess timeoutOccured wasBlocked timeoutBlock now endTime| |
|
1399 |
||
1400 |
wasBlocked := OperatingSystem blockInterrupts. |
|
1401 |
||
1402 |
count <= 0 ifTrue:[ |
|
1403 |
"with zero-timeout, this is a poll" |
|
1404 |
milliSeconds == 0 ifTrue:[ |
|
1405 |
wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
|
1406 |
^ nil |
|
1407 |
]. |
|
1408 |
||
1409 |
activeProcess := Processor activeProcess. |
|
1410 |
timeoutOccured := false. |
|
1411 |
||
1412 |
milliSeconds notNil ifTrue:[ |
|
1413 |
"Wait with timeout: calculate the end-time" |
|
1414 |
now := OperatingSystem getMillisecondTime. |
|
1415 |
endTime := OperatingSystem millisecondTimeAdd:now and:milliSeconds. |
|
1416 |
||
1417 |
timeoutBlock := [timeoutOccured := true. timeoutBlock:= nil. Processor resume:activeProcess]. |
|
1418 |
Processor addTimedBlock:timeoutBlock for:activeProcess atMilliseconds:endTime. |
|
1419 |
]. |
|
1420 |
||
1421 |
" |
|
1422 |
need a while-loop here, since more than one process may |
|
1423 |
wait for it and another one may also wake up. |
|
1424 |
Thus, the count is not always non-zero after returning from |
|
1425 |
suspend. |
|
1426 |
" |
|
1427 |
[ |
|
1428 |
self addWaitingProcess:activeProcess. |
|
1429 |
||
1430 |
" |
|
1431 |
for some more descriptive info in processMonitor ... |
|
1432 |
... set the state to #wait (instead of #suspend) |
|
1433 |
" |
|
1434 |
[ |
|
1435 |
"sleep until resumed..." |
|
1436 |
activeProcess suspendWithState:#parked. |
|
1437 |
] ifCurtailed:[ |
|
1438 |
"interrupts are not blocked when entered through Processor>>#interruptActive" |
|
1439 |
OperatingSystem blockInterrupts. |
|
1440 |
timeoutBlock notNil ifTrue:[ |
|
1441 |
Processor removeTimedBlock:timeoutBlock. |
|
1442 |
timeoutBlock := nil. |
|
1443 |
]. |
|
1444 |
self removeWaitingProcess:activeProcess. |
|
1445 |
wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
|
1446 |
]. |
|
1447 |
||
1448 |
self removeWaitingProcess:activeProcess. |
|
1449 |
timeoutOccured ifTrue:[ |
|
1450 |
wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
|
1451 |
^ nil |
|
1452 |
]. |
|
1453 |
] doUntil:[count > 0]. |
|
1454 |
||
1455 |
timeoutBlock notNil ifTrue:[ |
|
1456 |
Processor removeTimedBlock:timeoutBlock. |
|
1457 |
timeoutBlock := nil. |
|
1458 |
]. |
|
1459 |
]. |
|
1460 |
||
1461 |
"if we come here, we have accquired the semaphore" |
|
1462 |
count := count - 1. |
|
1463 |
count == 0 ifTrue:[ |
|
1464 |
lastOwner := Processor activeProcess. |
|
1465 |
]. |
|
1466 |
wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
|
1467 |
^ self |
|
1468 |
||
1469 |
"Created: / 16-08-2012 / 20:53:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1470 |
! ! |
|
1471 |
||
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1472 |
!Set methodsFor:'javaProtocol'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1473 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1474 |
java__contains:anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1475 |
^ self contains: [:el | anObject = el ] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1476 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1477 |
|
752 | 1478 |
!ShortFloat class methodsFor:'queries'! |
1479 |
||
1480 |
isJavaPrimitiveType |
|
1481 |
||
1482 |
^true |
|
1483 |
||
1484 |
"Created: / 06-02-2011 / 17:21:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1485 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1486 |
|
752 | 1487 |
!ShortFloat class methodsFor:'accessing'! |
1488 |
||
851 | 1489 |
javaArrayClass |
1490 |
^ FloatArray |
|
1491 |
||
1492 |
"Created: / 11-02-2011 / 10:50:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1493 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1494 |
|
917 | 1495 |
!ShortFloat class methodsFor:'autoboxing support'! |
1496 |
||
1159 | 1497 |
javaBox: anObject |
917 | 1498 |
| wrapper | |
1499 |
||
1033 | 1500 |
wrapper := (JavaVM classForName: 'java.lang.Float') new. |
917 | 1501 |
wrapper perform: #'<init>(F)V' with: anObject. |
1033 | 1502 |
^ wrapper |
917 | 1503 |
|
1504 |
"Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1505 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1506 |
|
851 | 1507 |
!ShortFloat class methodsFor:'accessing'! |
1508 |
||
752 | 1509 |
javaName |
1510 |
||
1511 |
^'float'. |
|
1512 |
||
1513 |
"Modified: / 25-02-2011 / 18:59:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1514 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1515 |
|
1386 | 1516 |
!ShortFloat class methodsFor:'accessing'! |
1517 |
||
1518 |
javaWrapperClass |
|
1519 |
^(Java classForName: 'java.lang.Float') |
|
1520 |
||
1521 |
"Created: / 24-02-2012 / 19:42:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1522 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1523 |
|
866 | 1524 |
!SignedIntegerArray class methodsFor:'testing'! |
1525 |
||
1526 |
isInterface |
|
1527 |
||
1528 |
^false |
|
1529 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1530 |
|
866 | 1531 |
!SignedIntegerArray class methodsFor:'queries'! |
1532 |
||
1533 |
isJavaArrayClass |
|
1534 |
||
1535 |
^true |
|
1536 |
||
1537 |
"Created: / 06-02-2011 / 15:16:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1538 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1539 |
|
905 | 1540 |
!SignedIntegerArray class methodsFor:'accessing-java'! |
1541 |
||
1542 |
javaArrayClass |
|
1543 |
||
1544 |
^JavaArray javaArrayClassFor: SignedIntegerArray |
|
1545 |
||
1546 |
"Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1547 |
"Modified: / 10-08-2011 / 22:47:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1548 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1549 |
|
866 | 1550 |
!SignedIntegerArray class methodsFor:'accessing'! |
1551 |
||
1552 |
javaComponentClass |
|
1553 |
||
1554 |
^ Integer |
|
1555 |
||
1556 |
"Created: / 25-06-2011 / 08:38:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1557 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1558 |
|
866 | 1559 |
!SignedIntegerArray class methodsFor:'accessing'! |
1560 |
||
1561 |
javaName |
|
1562 |
||
1563 |
^'[I'. |
|
1564 |
||
1565 |
"Modified: / 25-02-2011 / 19:03:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1566 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1567 |
|
866 | 1568 |
!SignedLongIntegerArray class methodsFor:'testing'! |
1569 |
||
1570 |
isInterface |
|
1571 |
||
1572 |
^false |
|
1573 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1574 |
|
866 | 1575 |
!SignedLongIntegerArray class methodsFor:'queries'! |
1576 |
||
1577 |
isJavaArrayClass |
|
1578 |
||
1579 |
^true |
|
1580 |
||
1581 |
"Created: / 20-12-2010 / 22:47:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1582 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1583 |
|
866 | 1584 |
!SignedLongIntegerArray class methodsFor:'queries'! |
1585 |
||
1586 |
isJavaReferenceType |
|
1587 |
||
1588 |
"Java arrays are reference types" |
|
1589 |
^true |
|
1590 |
||
1591 |
"Created: / 20-12-2010 / 22:30:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1592 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1593 |
|
927 | 1594 |
!SignedLongIntegerArray class methodsFor:'accessing-java'! |
1595 |
||
1596 |
javaArrayClass |
|
1597 |
||
1598 |
^JavaArray javaArrayClassFor: SignedLongIntegerArray |
|
1599 |
||
1600 |
"Modified: / 10-08-2011 / 22:47:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1601 |
"Created: / 26-08-2011 / 18:29:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1602 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1603 |
|
866 | 1604 |
!SignedLongIntegerArray class methodsFor:'accessing'! |
1605 |
||
1606 |
javaComponentClass |
|
1607 |
||
1608 |
^LargeInteger |
|
1609 |
||
1610 |
"Modified: / 25-06-2011 / 08:38:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1611 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1612 |
|
866 | 1613 |
!SignedLongIntegerArray class methodsFor:'accessing'! |
1614 |
||
1615 |
javaName |
|
1616 |
||
1617 |
^'[J'. |
|
1618 |
||
1619 |
"Modified: / 25-02-2011 / 19:03:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1620 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1621 |
|
1384
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1622 |
!SignedWordArray class methodsFor:'queries'! |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1623 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1624 |
isJavaArrayClass |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1625 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1626 |
^true |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1627 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1628 |
"Created: / 20-12-2010 / 22:47:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1629 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1630 |
|
1384
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1631 |
!SignedWordArray class methodsFor:'queries'! |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1632 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1633 |
isJavaReferenceType |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1634 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1635 |
"Java arrays are reference types" |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1636 |
^true |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1637 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1638 |
"Created: / 20-12-2010 / 22:30:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1639 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1640 |
|
1384
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1641 |
!SignedWordArray class methodsFor:'accessing'! |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1642 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1643 |
javaComponentClass |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1644 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1645 |
^JavaShort |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1646 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1647 |
"Modified: / 24-02-2012 / 17:46:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1648 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1649 |
|
1384
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1650 |
!SignedWordArray class methodsFor:'accessing'! |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1651 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1652 |
javaName |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1653 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1654 |
^'[S'. |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1655 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1656 |
"Modified: / 24-02-2012 / 17:46:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1657 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1658 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1659 |
!SmallInteger methodsFor:'autoboxing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1660 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1661 |
javaUnwrapFrom: javaType |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1662 |
javaType = #boolean ifTrue: [ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1663 |
^ self = 1 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1664 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1665 |
^ self |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1666 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1667 |
"Created: / 30-12-2011 / 15:22:52 / kursjan <kursjan@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1668 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1669 |
|
1617 | 1670 |
!Socket methodsFor:'testing'! |
1671 |
||
1672 |
isSocket |
|
1673 |
^true |
|
1674 |
||
1675 |
"Created: / 17-08-2012 / 15:32:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1676 |
! ! |
|
1677 |
||
1678 |
!Socket methodsFor:'special'! |
|
1679 |
||
1680 |
reOpenIfPossible |
|
1681 |
"If the socket was listening (server-sockets), try to reopen it" |
|
1682 |
||
1683 |
| pno | |
|
1684 |
||
1685 |
listening ifFalse:[ ^ self ]. |
|
1686 |
pno := port. |
|
1687 |
[ |
|
1688 |
self domain: domain type: socketType protocol: protocol reuseAddress:true. |
|
1689 |
self bindTo:port address:nil. |
|
1690 |
self listenFor: 5 |
|
1691 |
] on: OpenError do:[ |
|
1692 |
"Notning, socket could not be reopened" |
|
1693 |
]. |
|
1694 |
||
1695 |
"Created: / 17-08-2012 / 15:43:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1696 |
! ! |
|
1697 |
||
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1698 |
!String methodsFor:'converting'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1699 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1700 |
asArrayOfSubstringsSeparatedBy:aSeparator |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1701 |
"Modified version of asArrayOfSubstrings" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1702 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1703 |
|substrings start end| |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1704 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1705 |
substrings := OrderedCollection new. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1706 |
start := 1. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1707 |
[start <= self size] whileTrue:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1708 |
(self at:start) = aSeparator ifFalse:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1709 |
end := start + 1. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1710 |
[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1711 |
end <= self size and:[(self at:end) ~= aSeparator] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1712 |
] whileTrue:[end := end + 1]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1713 |
substrings add:(self copyFrom:start to:end - 1). |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1714 |
start := end - 1 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1715 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1716 |
start := start + 1 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1717 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1718 |
^ substrings asArray |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1719 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1720 |
"Created: / 07-02-2011 / 11:18:03 / Marcel Hlopko <hlopik@gmail.com>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1721 |
"Modified: / 08-02-2011 / 01:08:15 / Marcel Hlopko <hlopik@gmail.com>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1722 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1723 |
|
1959
11cd2c406930
Bugfix: added lost method String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1953
diff
changeset
|
1724 |
!String class methodsFor:'accessing'! |
11cd2c406930
Bugfix: added lost method String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1953
diff
changeset
|
1725 |
|
11cd2c406930
Bugfix: added lost method String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1953
diff
changeset
|
1726 |
javaName |
11cd2c406930
Bugfix: added lost method String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1953
diff
changeset
|
1727 |
^ '[C' |
11cd2c406930
Bugfix: added lost method String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1953
diff
changeset
|
1728 |
|
11cd2c406930
Bugfix: added lost method String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1953
diff
changeset
|
1729 |
"Created: / 18-01-2013 / 22:27:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11cd2c406930
Bugfix: added lost method String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1953
diff
changeset
|
1730 |
! ! |
11cd2c406930
Bugfix: added lost method String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1953
diff
changeset
|
1731 |
|
752 | 1732 |
!UndefinedObject class methodsFor:'queries'! |
1733 |
||
1734 |
isJavaPrimitiveType |
|
1735 |
||
1736 |
"void" |
|
1737 |
||
1738 |
^true |
|
1739 |
||
1740 |
"Created: / 21-12-2010 / 22:52:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1741 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1742 |
|
752 | 1743 |
!UndefinedObject class methodsFor:'accessing'! |
1744 |
||
1745 |
javaName |
|
1746 |
||
1747 |
^'void'. |
|
1748 |
||
1749 |
"Modified: / 25-02-2011 / 18:59:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1750 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1751 |
|
1960
ce6c25e4838a
Bugfix: added lost method Unicode16String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1959
diff
changeset
|
1752 |
!Unicode16String class methodsFor:'accessing'! |
ce6c25e4838a
Bugfix: added lost method Unicode16String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1959
diff
changeset
|
1753 |
|
ce6c25e4838a
Bugfix: added lost method Unicode16String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1959
diff
changeset
|
1754 |
javaName |
ce6c25e4838a
Bugfix: added lost method Unicode16String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1959
diff
changeset
|
1755 |
^ '[C' |
ce6c25e4838a
Bugfix: added lost method Unicode16String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1959
diff
changeset
|
1756 |
|
ce6c25e4838a
Bugfix: added lost method Unicode16String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1959
diff
changeset
|
1757 |
"Created: / 18-01-2013 / 22:27:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
ce6c25e4838a
Bugfix: added lost method Unicode16String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1959
diff
changeset
|
1758 |
! ! |
ce6c25e4838a
Bugfix: added lost method Unicode16String class>>javaName.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1959
diff
changeset
|
1759 |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1760 |
!UserPreferences methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1761 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1762 |
javaRelease |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1763 |
"Return the Java release according to the preferences |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1764 |
or nil, if not set" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1765 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1766 |
| rel sel | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1767 |
sel := self javaReleaseSelector. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1768 |
sel notNil ifTrue:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1769 |
rel := JavaRelease perform: sel asSymbol ifNotUnderstood:[nil] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1770 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1771 |
^rel |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1772 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1773 |
"Created: / 27-07-2012 / 10:12:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1774 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1775 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1776 |
!UserPreferences methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1777 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1778 |
javaReleaseSelector |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1779 |
^ self at:#javaReleaseSelector ifAbsent:[nil]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1780 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1781 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1782 |
UserPreferences current javaReleaseSelector |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1783 |
UserPreferences current javaReleaseSelector: #openJDK6 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1784 |
UserPreferences current javaReleaseSelector: nil |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1785 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1786 |
Java release |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1787 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1788 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1789 |
"Created: / 27-07-2012 / 10:02:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1790 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1791 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1792 |
!UserPreferences methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1793 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1794 |
javaReleaseSelector: name |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1795 |
"Sets the Java release to use. selector must be one of |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1796 |
releases defined in JavaRelease, protocol 'instance creation'" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1797 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1798 |
self at:#javaReleaseSelector put: name. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1799 |
Java notNil ifTrue:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1800 |
Java reinitializeRelease |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1801 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1802 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1803 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1804 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1805 |
UserPreferences current javaReleaseSelector |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1806 |
UserPreferences current javaReleaseSelector: #openJDK7 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1807 |
UserPreferences current javaReleaseSelector: nil |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1808 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1809 |
Java release |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1810 |
Java release:nil |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1811 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1812 |
Java reinitializeRelease |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1813 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1814 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1815 |
"Created: / 27-07-2012 / 10:02:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1816 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1817 |
|
826
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
1818 |
!WordArray class methodsFor:'testing'! |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
1819 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
1820 |
isInterface |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
1821 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
1822 |
^false |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
1823 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1824 |
|
752 | 1825 |
!WordArray class methodsFor:'queries'! |
1826 |
||
1827 |
isJavaArrayClass |
|
1828 |
||
1829 |
^true |
|
1830 |
||
1831 |
"Created: / 20-12-2010 / 22:47:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1832 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1833 |
|
752 | 1834 |
!WordArray class methodsFor:'queries'! |
1835 |
||
1836 |
isJavaReferenceType |
|
1837 |
||
1838 |
"Java arrays are reference types" |
|
1839 |
^true |
|
1840 |
||
1841 |
"Created: / 20-12-2010 / 22:30:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1842 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1843 |
|
752 | 1844 |
!WordArray class methodsFor:'accessing-java'! |
1845 |
||
905 | 1846 |
javaArrayClass |
1847 |
||
1848 |
^JavaArray javaArrayClassFor: WordArray |
|
1849 |
||
1850 |
"Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1851 |
"Modified: / 10-08-2011 / 22:46:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1852 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1853 |
|
905 | 1854 |
!WordArray class methodsFor:'accessing-java'! |
1855 |
||
752 | 1856 |
javaComponentClass |
1857 |
||
1159 | 1858 |
^JavaShort |
752 | 1859 |
|
1860 |
"Created: / 20-12-2010 / 22:13:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1861 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1862 |
|
752 | 1863 |
!WordArray class methodsFor:'accessing'! |
1864 |
||
1865 |
javaName |
|
1225
30600ca8173c
ok now we enabled permissions and groovy maybe does not work :/
hlopkmar
parents:
1209
diff
changeset
|
1866 |
^ '[S'. |
752 | 1867 |
|
1225
30600ca8173c
ok now we enabled permissions and groovy maybe does not work :/
hlopkmar
parents:
1209
diff
changeset
|
1868 |
"Modified: / 06-12-2011 / 16:43:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
752 | 1869 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1870 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1871 |
!WrappedMethod methodsFor:'accessing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1872 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1873 |
descriptor |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1874 |
"Returns descriptor object (for wrapped Java methods)" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1875 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1876 |
| orig | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1877 |
orig := self originalMethod. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1878 |
^(orig respondsTo: #descriptor) ifTrue:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1879 |
orig descriptor |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1880 |
] ifFalse:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1881 |
self doesNotUnderstand: (Message selector: #descriptor) |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1882 |
] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1883 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1884 |
"Created: / 16-12-2011 / 20:03:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1885 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1886 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1887 |
!WrappedMethod methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1888 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1889 |
isAbstract |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1890 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1891 |
^self originalMethod isAbstract. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1892 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1893 |
"Created: / 04-12-2011 / 11:24:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1894 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1895 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1896 |
!ZipArchive methodsFor:'reading - java support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1897 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1898 |
nextBytes: bytesToRead of: zmember startingAt: pos into: b startingAt: off |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1899 |
|
1872 | 1900 |
file position0Based: (self dataStartOf: zmember) + startOfArchive + pos. |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1901 |
^ file nextBytes: bytesToRead into: b startingAt: off. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1902 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1903 |
"Created: / 01-05-2011 / 16:21:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1872 | 1904 |
"Modified: / 10-12-2012 / 05:41:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1865
96e851c925de
Updates in .zip support to reflect changes in ZipArchive.
vranyj1
parents:
1864
diff
changeset
|
1905 |
! ! |
96e851c925de
Updates in .zip support to reflect changes in ZipArchive.
vranyj1
parents:
1864
diff
changeset
|
1906 |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1907 |
!stx_libjava class methodsFor:'documentation'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1908 |
|
1876
482ad5ebe5da
Merged some fixes from jv's repo
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1872
diff
changeset
|
1909 |
extensionsVersion_HG |
482ad5ebe5da
Merged some fixes from jv's repo
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1872
diff
changeset
|
1910 |
|
482ad5ebe5da
Merged some fixes from jv's repo
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1872
diff
changeset
|
1911 |
^ '$Changeset: <not expanded> $' |
1886
746919e0fc34
bugfix in smalltalk2java lookup with nil arguments
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1877
diff
changeset
|
1912 |
! ! |