author | vranyj1 |
Thu, 29 Nov 2012 23:05:54 +0000 | |
branch | development |
changeset 1840 | abd3746f821f |
parent 1818 | 2e5ed72e7dfd |
child 1864 | 60a8dc26c8c6 |
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 |
|
752 | 413 |
!CharacterArray class methodsFor:'encoding & decoding'! |
414 |
||
1159 | 415 |
decodeFromJavaUTF8: bytes |
752 | 416 |
"Decodes a string from modified UTF8 encoding |
417 |
as used in Java .class files. see |
|
418 |
'The class file format specification', section 4.5.7" |
|
1159 | 419 |
|
752 | 420 |
| string i s b codePoint realLength | |
421 |
||
422 |
string := String new: bytes size. |
|
423 |
realLength := bytes size. |
|
424 |
s := bytes readStream. |
|
425 |
i := 1. |
|
1159 | 426 |
[ s atEnd ] whileFalse: |
1253 | 427 |
[ b := s next. |
428 |
(b & 2r10000000) == 0 |
|
429 |
ifTrue: [ codePoint := b ] |
|
430 |
ifFalse: |
|
431 |
[ self assert: (b & 2r01000000) = 2r01000000. |
|
432 |
(b & 2r00100000) = 0 |
|
433 |
ifTrue: |
|
434 |
[ "two byte utf char" |
|
435 |
realLength := realLength - 1. |
|
436 |
self assert: s size > 0. |
|
437 |
self assert: (b & 2r01000000) = 2r01000000. |
|
438 |
string bitsPerCharacter < 16 |
|
439 |
ifTrue: [ string := Unicode16String fromString: string ]. |
|
440 |
codePoint := (b & 2r00011111) << 6. |
|
441 |
b := s next. |
|
442 |
self assert: (b & 2r11000000) = 2r10000000. |
|
443 |
codePoint := codePoint + (b & 2r00111111). ] |
|
444 |
ifFalse: |
|
445 |
[ "at lease 3 byte utf char" |
|
446 |
realLength := realLength - 2. |
|
447 |
string bitsPerCharacter < 16"was: 32" |
|
448 |
ifTrue: [ string := Unicode16String"was: Unicode32String" fromString: string ]. |
|
449 |
self assert: s size > 1. |
|
450 |
(b & 2r00010000) = 0 |
|
451 |
ifTrue: |
|
452 |
[ | utf32Possible utf32Value | |
|
752 | 453 |
|
1253 | 454 |
"3 or 6 byte utf char" |
455 |
self assert: s size > 1. |
|
456 |
s size < 5 |
|
457 |
ifTrue: [ utf32Possible := false ] |
|
458 |
ifFalse: [ utf32Possible := true ]. |
|
459 |
b ~= 2r11101101 ifTrue: [ utf32Possible := false ]. |
|
460 |
codePoint := (b & 2r00001111) << 12. |
|
461 |
b := s next. |
|
462 |
self assert: (b & 2r11000000) = 2r10000000. |
|
463 |
((b & 2r11110000) = 2r10100000 and: [ utf32Possible ]) |
|
464 |
ifTrue: [ utf32Value := 2r00010000 + ((b & 2r00001111) << 16) ] |
|
465 |
ifFalse: [ utf32Possible := false ]. |
|
466 |
codePoint := codePoint + ((b & 2r00111111) << 6). |
|
467 |
b := s next. |
|
468 |
self assert: (b & 2r11000000) = 2r10000000. |
|
469 |
utf32Possible |
|
470 |
ifTrue: [ utf32Value := utf32Value + ((b & 2r00111111) << 10) ]. |
|
471 |
codePoint := codePoint + (b & 2r00111111). |
|
472 |
utf32Possible |
|
473 |
ifTrue: |
|
474 |
[ | tmpB | |
|
752 | 475 |
|
1253 | 476 |
string bitsPerCharacter < 32 |
477 |
ifTrue: [ string := Unicode32String fromString: string ]. |
|
478 |
tmpB := s copy. |
|
479 |
b := tmpB next. |
|
480 |
b = 2r11101101 |
|
481 |
ifTrue: |
|
482 |
[ b := tmpB next. |
|
483 |
(b & 2r11110000) = 2r10110000 |
|
484 |
ifTrue: |
|
485 |
[ utf32Value := utf32Value + ((b & 2r00001111) << 6). |
|
486 |
b := tmpB next. |
|
487 |
self assert: (b & 2r11000000) = 2r10000000. |
|
488 |
utf32Value := utf32Value + (b & 2r00111111). |
|
489 |
codePoint := utf32Value. |
|
490 |
realLength := realLength - 3. s position: tmpB position.] ] ] ] |
|
491 |
ifFalse: |
|
492 |
[ "should not happen, ask mh" |
|
493 |
self halt. ] ] ]. |
|
494 |
string at: i put: (Character codePoint: codePoint). |
|
495 |
i := i + 1. ]. |
|
752 | 496 |
^ string subString: 1 to: realLength. |
497 |
||
498 |
" |
|
1253 | 499 |
String decodeFromJavaUTF8: 'Hello world' asByteArray" |
752 | 500 |
|
501 |
"Created: / 22-12-2010 / 23:45:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
502 |
"Modified: / 09-02-2011 / 01:12:25 / Marcel Hlopko <hlopik@gmail.com>" |
|
503 |
"Modified: / 13-03-2011 / 15:52:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1253 | 504 |
"Modified: / 09-12-2011 / 19:49:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
752 | 505 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
506 |
|
752 | 507 |
!CharacterArray class methodsFor:'instance creation'! |
508 |
||
509 |
fromJavaUTF8Bytes:aByteCollection |
|
510 |
"return a new string which represents the characters as decoded |
|
1159 | 511 |
from the modified utf8 encoded bytes as specified in |
752 | 512 |
The class file format specification, section 4.5.7" |
513 |
||
514 |
^ self decodeFromJavaUTF8:aByteCollection. |
|
515 |
||
516 |
" |
|
517 |
CharacterArray fromUTF8Bytes:#[ 16r41 16r42 ] |
|
518 |
CharacterArray fromUTF8Bytes:#[ 16rC1 16r02 ] |
|
519 |
CharacterArray fromUTF8Bytes:#[ 16rE0 16r81 16r02 ] |
|
520 |
CharacterArray fromUTF8Bytes:#[ 16rEF 16rBF 16rBF ] |
|
521 |
||
522 |
rfc2279 examples: |
|
523 |
CharacterArray fromUTF8Bytes:#[ 16r41 16rE2 16r89 16rA2 16rCE 16r91 16r2E ] |
|
524 |
CharacterArray fromUTF8Bytes:#[ 16rED 16r95 16r9C 16rEA 16rB5 16rAD 16rEC 16r96 16rB4 ] |
|
525 |
CharacterArray fromUTF8Bytes:#[ 16rE6 16r97 16rA5 16rE6 16r9C 16rAC 16rE8 16rAA 16r9E ] |
|
526 |
||
527 |
invalid: |
|
528 |
CharacterArray fromUTF8Bytes:#[ 16rC0 16r80 ] |
|
529 |
CharacterArray fromUTF8Bytes:#[ 16rE0 16r80 16r80 ] |
|
530 |
" |
|
531 |
||
532 |
"Created: / 23-12-2010 / 09:01:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
533 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
534 |
|
865 | 535 |
!CharacterArray class methodsFor:'queries'! |
536 |
||
537 |
isJavaArrayClass |
|
538 |
||
539 |
^true |
|
540 |
||
541 |
"Created: / 05-02-2011 / 22:45:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
542 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
543 |
|
865 | 544 |
!CharacterArray class methodsFor:'accessing-java'! |
545 |
||
546 |
javaArrayClass |
|
547 |
||
901 | 548 |
^JavaArray javaArrayClassFor: Unicode16String |
865 | 549 |
|
550 |
"Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
901 | 551 |
"Modified: / 10-08-2011 / 13:18:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
865 | 552 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
553 |
|
865 | 554 |
!CharacterArray class methodsFor:'accessing-java'! |
555 |
||
556 |
javaComponentClass |
|
557 |
||
558 |
^Character |
|
559 |
||
560 |
"Created: / 20-12-2010 / 22:05:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
561 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
562 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
563 |
!Class methodsFor:'accessing - java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
564 |
|
1649
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
565 |
classLoader |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
566 |
JavaVM smalltalkClassLoader |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
567 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
568 |
"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
|
569 |
! ! |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
570 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
571 |
!Class methodsFor:'accessing - java'! |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
572 |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
573 |
javaMirror |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
574 |
^self javaMirrorClass forClass: self. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
575 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
576 |
"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
|
577 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
578 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
579 |
!Class methodsFor:'accessing - java'! |
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 |
javaMirrorClass |
1695 | 582 |
"Returns a Java mirror class to be used by Java reflection" |
583 |
||
584 |
self isJavaPrimitiveType ifTrue:[ ^ JavaMirror mirrorClassForJavaPrimitive ]. |
|
585 |
self isJavaArrayClass ifTrue:[ ^ JavaMirror mirrorClassForJavaArray ]. |
|
586 |
^JavaMirror mirrorClassForAlienClass |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
587 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
588 |
"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
|
589 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
590 |
|
1656
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
591 |
!Class methodsFor:'accessing - java'! |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
592 |
|
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
593 |
lookupMethodByNameAndType: nameAndType |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
594 |
| descriptor selector | |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
595 |
|
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
596 |
descriptor := JavaMethodDescriptor fromString: (nameAndType descriptor). |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
597 |
selector := nameAndType name copyReplaceAll: $_ with: $:. |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
598 |
descriptor numArgs > 0 ifTrue:[selector := selector , ':']. |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
599 |
selector := selector asSymbol. |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
600 |
|
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
601 |
^self lookupMethodFor: selector |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
602 |
|
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
603 |
"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
|
604 |
! ! |
c6fee8f3a640
- fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents:
1649
diff
changeset
|
605 |
|
1368 | 606 |
!ConfigurableFeatures class methodsFor:'queries-features'! |
607 |
||
608 |
hasJavaSupport |
|
609 |
"/ use Smalltalk-at to trick the dependency/prerequisite generator |
|
610 |
^ (Smalltalk at: #'JavaVM' ifAbsent:nil) notNil |
|
611 |
||
612 |
" |
|
613 |
ConfigurableFeatures hasJavaSupport |
|
614 |
ConfigurableFeatures includesFeature:#JavaSupport |
|
615 |
" |
|
616 |
||
617 |
"Created: / 03-01-2012 / 15:36:03 / cg" |
|
618 |
"Created: / 18-02-2012 / 16:42:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
619 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
620 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
621 |
!Delay methodsFor:'delaying'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
622 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
623 |
waitWithState:state |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
624 |
"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
|
625 |
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
|
626 |
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
|
627 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
628 |
| 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
|
629 |
isInterrupted := false. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
630 |
millisecondDelta notNil ifTrue: [ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
631 |
now := OperatingSystem getMillisecondTime. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
632 |
currentDelta := millisecondDelta rounded. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
633 |
currentDelta > 16r0fffffff ifTrue: [ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
634 |
"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
|
635 |
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
|
636 |
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
|
637 |
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
|
638 |
currentDelta := 16r0fffffff. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
639 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
640 |
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
|
641 |
] ifFalse: [ then := resumptionTime. ]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
642 |
wasBlocked := OperatingSystem blockInterrupts. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
643 |
[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
644 |
[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
645 |
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
|
646 |
Processor activeProcess state: state. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
647 |
delaySemaphore wait. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
648 |
] doWhile: [ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
649 |
(dueTime notNil |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
650 |
and: [ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
651 |
isInterrupted not |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
652 |
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
|
653 |
]) |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
654 |
ifTrue: [ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
655 |
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
|
656 |
now := OperatingSystem getMillisecondTime. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
657 |
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
|
658 |
true. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
659 |
] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
660 |
ifFalse: [ false ] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
661 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
662 |
] 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
|
663 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
664 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
665 |
Transcript showCR:'1'. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
666 |
(Delay forSeconds:10) wait. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
667 |
Transcript showCR:'2'." |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
668 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
669 |
"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
|
670 |
"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
|
671 |
"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
|
672 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
673 |
|
826
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
674 |
!DoubleArray class methodsFor:'testing'! |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
675 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
676 |
isInterface |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
677 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
678 |
^false |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
679 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
680 |
|
752 | 681 |
!DoubleArray class methodsFor:'queries'! |
682 |
||
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
683 |
isJavaArrayClass |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
684 |
|
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
685 |
^true |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
686 |
|
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
687 |
"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
|
688 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
689 |
|
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
690 |
!DoubleArray class methodsFor:'queries'! |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
691 |
|
752 | 692 |
isJavaReferenceType |
693 |
||
694 |
"Java arrays are reference types" |
|
695 |
^true |
|
696 |
||
697 |
"Created: / 20-12-2010 / 22:30:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
698 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
699 |
|
752 | 700 |
!DoubleArray class methodsFor:'accessing-java'! |
701 |
||
1226 | 702 |
javaArrayClass |
703 |
^ JavaArray javaArrayClassFor: self. |
|
704 |
||
705 |
"Created: / 06-12-2011 / 17:28:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
706 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
707 |
|
1226 | 708 |
!DoubleArray class methodsFor:'accessing-java'! |
709 |
||
752 | 710 |
javaComponentClass |
711 |
||
712 |
^Float |
|
713 |
||
714 |
"Created: / 20-12-2010 / 22:06:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
715 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
716 |
|
752 | 717 |
!DoubleArray class methodsFor:'accessing'! |
718 |
||
719 |
javaName |
|
720 |
||
721 |
^'[D'. |
|
722 |
||
723 |
"Modified: / 25-02-2011 / 19:03:19 / 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 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
726 |
!ExecutableFunction methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
727 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
728 |
isJavaConstructor |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
729 |
^ false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
730 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
731 |
"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
|
732 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
733 |
|
752 | 734 |
!Float class methodsFor:'queries'! |
735 |
||
736 |
isJavaPrimitiveType |
|
737 |
||
738 |
^true |
|
739 |
||
740 |
"Created: / 06-02-2011 / 17:21: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 |
!Float class methodsFor:'accessing'! |
744 |
||
851 | 745 |
javaArrayClass |
746 |
^ DoubleArray |
|
747 |
||
748 |
"Created: / 11-02-2011 / 10:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
749 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
750 |
|
917 | 751 |
!Float class methodsFor:'autoboxing support'! |
752 |
||
1159 | 753 |
javaBox: anObject |
917 | 754 |
| wrapper | |
755 |
||
1033 | 756 |
wrapper := (JavaVM classForName: 'java.lang.Double') new. |
917 | 757 |
wrapper perform: #'<init>(D)V' with: anObject. |
1033 | 758 |
^ wrapper |
917 | 759 |
|
760 |
"Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
761 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
762 |
|
851 | 763 |
!Float class methodsFor:'accessing'! |
764 |
||
752 | 765 |
javaName |
766 |
||
767 |
^'double'. |
|
768 |
||
769 |
"Modified: / 25-02-2011 / 18:59:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
770 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
771 |
|
1386 | 772 |
!Float class methodsFor:'accessing'! |
773 |
||
774 |
javaWrapperClass |
|
775 |
^(Java classForName: 'java.lang.Double') |
|
776 |
||
777 |
"Created: / 24-02-2012 / 19:42:29 / 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 |
|
826
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
780 |
!FloatArray class methodsFor:'testing'! |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
781 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
782 |
isInterface |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
783 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
784 |
^false |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
785 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
786 |
|
752 | 787 |
!FloatArray class methodsFor:'queries'! |
788 |
||
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
789 |
isJavaArrayClass |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
790 |
|
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
791 |
^true |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
792 |
|
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
793 |
"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
|
794 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
795 |
|
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
796 |
!FloatArray class methodsFor:'queries'! |
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
905
diff
changeset
|
797 |
|
752 | 798 |
isJavaReferenceType |
799 |
||
800 |
"Java arrays are reference types" |
|
801 |
^true |
|
802 |
||
803 |
"Created: / 20-12-2010 / 22:30:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
804 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
805 |
|
752 | 806 |
!FloatArray class methodsFor:'accessing-java'! |
807 |
||
1226 | 808 |
javaArrayClass |
809 |
^ JavaArray javaArrayClassFor: self. |
|
810 |
||
811 |
"Created: / 06-12-2011 / 17:29:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
812 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
813 |
|
1226 | 814 |
!FloatArray class methodsFor:'accessing-java'! |
815 |
||
752 | 816 |
javaComponentClass |
817 |
||
818 |
^ShortFloat |
|
819 |
||
820 |
"Created: / 20-12-2010 / 22:06:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
821 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
822 |
|
752 | 823 |
!FloatArray class methodsFor:'accessing'! |
824 |
||
825 |
javaName |
|
826 |
||
827 |
^'[F'. |
|
828 |
||
829 |
"Modified: / 25-02-2011 / 19:03:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
830 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
831 |
|
752 | 832 |
!Integer class methodsFor:'queries'! |
833 |
||
834 |
isJavaPrimitiveType |
|
835 |
||
836 |
^true |
|
837 |
||
838 |
"Created: / 11-02-2011 / 11:12:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
839 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
840 |
|
752 | 841 |
!Integer class methodsFor:'accessing'! |
842 |
||
851 | 843 |
javaArrayClass |
873
933263bd2d27
Fixes for primitive array types (uses Signed* variant of an array)
vranyj1
parents:
866
diff
changeset
|
844 |
^ SignedIntegerArray |
851 | 845 |
|
846 |
"Created: / 11-02-2011 / 10:51:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
847 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
848 |
|
917 | 849 |
!Integer class methodsFor:'autoboxing support'! |
850 |
||
1159 | 851 |
javaBox: anObject |
917 | 852 |
| wrapper | |
853 |
||
1033 | 854 |
wrapper := (JavaVM classForName: 'java.lang.Integer') new. |
917 | 855 |
wrapper perform: #'<init>(I)V' with: anObject. |
1033 | 856 |
^ wrapper |
917 | 857 |
|
858 |
"Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
859 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
860 |
|
851 | 861 |
!Integer class methodsFor:'accessing'! |
862 |
||
752 | 863 |
javaName |
864 |
||
865 |
^'int'. |
|
866 |
||
867 |
"Modified: / 25-02-2011 / 18:59:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
868 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
869 |
|
1204 | 870 |
!Integer class methodsFor:'autoboxing support'! |
871 |
||
872 |
javaUnbox: object onError: errorBlock |
|
873 |
||
874 |
^self javaUnbox: object onError: errorBlock |
|
875 |
min: "Integer.MIN_VALUE"-2147483648 |
|
876 |
max: "Integer.MAX_VALUE" 2147483647 |
|
877 |
||
878 |
"Created: / 25-11-2011 / 19:10:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
879 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
880 |
|
1205 | 881 |
!Integer class methodsFor:'autoboxing support'! |
882 |
||
883 |
javaUnbox: object onError: errorBlock min: min max: max |
|
884 |
||
885 |
| value | |
|
886 |
||
887 |
(#( 'java/lang/Byte' |
|
888 |
'java/lang/Short' |
|
889 |
'java/lang/Integer' |
|
890 |
"'java/lang/Long'" ) includes: object class name) ifFalse:[ |
|
891 |
errorBlock value. |
|
892 |
]. |
|
893 |
||
894 |
value := object instVarNamed:#value. |
|
895 |
(value between: min and: max) ifFalse:[ |
|
896 |
errorBlock value. |
|
897 |
]. |
|
898 |
^value |
|
899 |
||
900 |
"Created: / 22-11-2011 / 11:43:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
901 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
902 |
|
1386 | 903 |
!Integer class methodsFor:'accessing'! |
904 |
||
905 |
javaWrapperClass |
|
906 |
^(Java classForName: 'java.lang.Integer') |
|
907 |
||
908 |
"Created: / 24-02-2012 / 19:41:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
909 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
910 |
|
752 | 911 |
!LargeInteger class methodsFor:'queries'! |
912 |
||
913 |
isJavaPrimitiveType |
|
914 |
||
915 |
^true |
|
916 |
||
917 |
"Created: / 04-02-2011 / 11:55:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
918 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
919 |
|
752 | 920 |
!LargeInteger class methodsFor:'accessing'! |
921 |
||
851 | 922 |
javaArrayClass |
873
933263bd2d27
Fixes for primitive array types (uses Signed* variant of an array)
vranyj1
parents:
866
diff
changeset
|
923 |
^ SignedLongIntegerArray |
851 | 924 |
|
925 |
"Created: / 11-02-2011 / 10:51:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
926 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
927 |
|
917 | 928 |
!LargeInteger class methodsFor:'autoboxing support'! |
929 |
||
1159 | 930 |
javaBox: anObject |
917 | 931 |
| wrapper | |
932 |
||
1033 | 933 |
wrapper := (JavaVM classForName: 'java.lang.Long') new. |
917 | 934 |
wrapper perform: #'<init>(J)V' with: anObject. |
1033 | 935 |
^ wrapper |
917 | 936 |
|
937 |
"Created: / 16-08-2011 / 09:58:40 / 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 |
|
851 | 940 |
!LargeInteger class methodsFor:'accessing'! |
941 |
||
752 | 942 |
javaName |
943 |
||
944 |
^'long'. |
|
945 |
||
946 |
"Modified: / 25-02-2011 / 18:59:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
947 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
948 |
|
1204 | 949 |
!LargeInteger class methodsFor:'autoboxing support'! |
950 |
||
951 |
javaUnbox: object onError: errorBlock |
|
952 |
||
953 |
| value | |
|
954 |
||
955 |
(object class name = 'java/lang/Long') ifFalse:[ |
|
956 |
errorBlock value. |
|
957 |
]. |
|
958 |
||
959 |
value := object instVarNamed:#value. |
|
960 |
(value between: "Integer.MIN_VALUE"-9223372036854775808 and: "Integer.MAX_VALUE" 9223372036854775807) ifFalse:[ |
|
961 |
errorBlock value. |
|
962 |
]. |
|
963 |
^value |
|
964 |
||
965 |
"Created: / 22-11-2011 / 11:45:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
966 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
967 |
|
1386 | 968 |
!LargeInteger class methodsFor:'accessing'! |
969 |
||
970 |
javaWrapperClass |
|
971 |
^(Java classForName: 'java.lang.Long') |
|
972 |
||
973 |
"Created: / 24-02-2012 / 19:42:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
974 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
975 |
|
1649
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
976 |
!Method methodsFor:'queries-java'! |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
977 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
978 |
isAbstract |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
979 |
"For compatibility with Java methods" |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
980 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
981 |
^false |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
982 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
983 |
"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
|
984 |
! ! |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
985 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
986 |
!Method methodsFor:'queries-java'! |
1648 | 987 |
|
988 |
isStatic |
|
989 |
"For compatibility with Java methods" |
|
990 |
||
991 |
^mclass notNil and:[mclass isMetaclass] |
|
992 |
||
993 |
"Created: / 22-08-2012 / 12:27:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
994 |
! ! |
|
995 |
||
1649
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
996 |
!Method methodsFor:'accessing-java'! |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
997 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
998 |
javaClass |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
999 |
"For compatibiliry with JavaMethod" |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1000 |
^mclass |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1001 |
|
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1002 |
"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
|
1003 |
! ! |
0af82006c0b2
- some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents:
1648
diff
changeset
|
1004 |
|
1691 | 1005 |
!Object methodsFor:'accessing-Java'! |
1006 |
||
1007 |
getJavaLockWord |
|
1008 |
"Returns a Java lock word for given object. The returned |
|
1009 |
value is |
|
1010 |
- either SmallInteger that encodes the thinlock |
|
1011 |
- or a fat lock, instance of JavaMonitor |
|
1012 |
" |
|
1013 |
||
1014 |
"/For nonJava objects, always return fatlock |
|
1015 |
||
1016 |
^self getJavaMonitor |
|
1017 |
||
1018 |
"Created: / 26-08-2012 / 14:03:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1019 |
! ! |
|
1020 |
||
1021 |
!Object methodsFor:'accessing-Java'! |
|
1022 |
||
1023 |
getJavaMonitor |
|
1024 |
"Returns fat JavaMonitor associated with the receiver" |
|
1025 |
||
1026 |
^JavaVM getJavaMonitorFor: self |
|
1027 |
||
1028 |
"Created: / 26-08-2012 / 18:35:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1029 |
! ! |
|
1030 |
||
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1031 |
!Object methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1032 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1033 |
isGroovyClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1034 |
^false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1035 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1036 |
"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
|
1037 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1038 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1039 |
!Object methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1040 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1041 |
isJavaArray |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1042 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1043 |
^self class isJavaArrayClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1044 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1045 |
"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
|
1046 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1047 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1048 |
!Object methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1049 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1050 |
isJavaNameAndType |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1051 |
"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
|
1052 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1053 |
^ false. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1054 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1055 |
"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
|
1056 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1057 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1058 |
!Object methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1059 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1060 |
isJavaPackage |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1061 |
"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
|
1062 |
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
|
1063 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1064 |
^ false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1065 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1066 |
"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
|
1067 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1068 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1069 |
!Object methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1070 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1071 |
isJavaRef |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1072 |
"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
|
1073 |
^ false. |
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 |
"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
|
1076 |
! ! |
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 |
!Object methodsFor:'testing'! |
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 |
isJavaWrapperClass |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1081 |
"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
|
1082 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1083 |
^ false |
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 |
"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
|
1086 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1087 |
|
1617 | 1088 |
!Object methodsFor:'testing'! |
1089 |
||
1090 |
isSocket |
|
1091 |
"return true, if the receiver is some kind of socket; |
|
1092 |
false returned here - the method is only redefined in Socket." |
|
1093 |
||
1094 |
^ false |
|
1095 |
||
1096 |
"Created: / 17-08-2012 / 15:32:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1097 |
! ! |
|
1098 |
||
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1099 |
!Object methodsFor:'autoboxing support'! |
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 |
javaBox: anObject |
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 |
^anObject |
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 |
"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
|
1106 |
! ! |
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 |
!Object methodsFor:'autoboxing support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1109 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1110 |
javaUnwrap: anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1111 |
"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
|
1112 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1113 |
^anObject |
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 |
"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
|
1116 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1117 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1118 |
!Object methodsFor:'autoboxing support'! |
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 |
javaUnwrapFrom: javaType |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1121 |
^ self. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1122 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1123 |
"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
|
1124 |
"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
|
1125 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1126 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1127 |
!Object methodsFor:'autoboxing support'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1128 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1129 |
javaWrap: anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1130 |
"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
|
1131 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1132 |
^anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1133 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1134 |
"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
|
1135 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1136 |
|
1807 | 1137 |
!Object methodsFor:'autoboxing support'! |
1138 |
||
1139 |
javaWrapRequired |
|
1140 |
"Returns true, if a #javaWrap: has to be called |
|
1141 |
prior an instance of Smalltalk object is passed |
|
1142 |
as an argument to Java method, whoose formal tyoe |
|
1143 |
is the receiver. |
|
1144 |
||
1145 |
Example: |
|
1146 |
Let's say the Java method is declared as |
|
1147 |
||
1148 |
publid void setCount(int c) { ... } |
|
1149 |
||
1150 |
and Smalltalk calls |
|
1151 |
||
1152 |
obj setCount: 0 |
|
1153 |
||
1154 |
then 'Integer javaWrapRequired' should return false as there |
|
1155 |
is no need to wrap SmallInt as it represent java int values. |
|
1156 |
(Integer is formal type of argument c. |
|
1157 |
||
1158 |
If the method is declared as: |
|
1159 |
||
1160 |
publid void setCount(java.lang.Integer c) { ... } |
|
1161 |
||
1162 |
then 'java.lang.Integer javaWrapRequired' should return true |
|
1163 |
as the integer value must be wrapped into an instance of |
|
1164 |
java.lang.Integer before it is passed to a Java method. |
|
1165 |
||
1166 |
" |
|
1167 |
||
1168 |
^false |
|
1169 |
||
1170 |
"Created: / 05-11-2012 / 00:29:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1171 |
! ! |
|
1172 |
||
752 | 1173 |
!Object class methodsFor:'queries'! |
1174 |
||
1175 |
isJavaArrayClass |
|
1176 |
||
1177 |
^false |
|
1178 |
||
1179 |
"Created: / 19-12-2010 / 17:05:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1180 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1181 |
|
752 | 1182 |
!Object class methodsFor:'queries'! |
1183 |
||
1184 |
isJavaClassType |
|
1185 |
||
1186 |
^false |
|
1187 |
||
1188 |
"Created: / 11-02-2011 / 08:08:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1189 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1190 |
|
752 | 1191 |
!Object class methodsFor:'queries'! |
1192 |
||
1193 |
isJavaReferenceType |
|
1194 |
||
1195 |
^false |
|
1196 |
||
1197 |
"Created: / 20-12-2010 / 21:52:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1198 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1199 |
|
752 | 1200 |
!Object class methodsFor:'queries'! |
1201 |
||
1202 |
isJavaType |
|
1203 |
||
1204 |
^false |
|
1205 |
||
1206 |
"Created: / 20-12-2010 / 21:52:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1207 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1208 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1209 |
!Process methodsFor:'Java protocol'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1210 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1211 |
clearInterrupted |
1615 | 1212 |
JavaVM clearInterrupted: self |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1213 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1214 |
"Created: / 30-11-2011 / 10:44:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
1615 | 1215 |
"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
|
1216 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1217 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1218 |
!Process methodsFor:'Java protocol'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1219 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1220 |
isInterrupted |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1221 |
|
1615 | 1222 |
^ JavaVM isInterrupted: self. |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1223 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1224 |
"Created: / 30-11-2011 / 12:12:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
1615 | 1225 |
"Modified: / 16-08-2012 / 21:56:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1226 |
! ! |
|
1227 |
||
1228 |
!Process methodsFor:'queries'! |
|
1229 |
||
1230 |
isParked |
|
1231 |
"return true, iff the receiver is parked (by means of sun.misc.Unsafe.park() )" |
|
1232 |
||
1233 |
^ (state == #parked) |
|
1234 |
||
1235 |
"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
|
1236 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1237 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1238 |
!Process methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1239 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1240 |
isSleeping |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1241 |
"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
|
1242 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1243 |
^ (state == #sleep) |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1244 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1245 |
"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
|
1246 |
! ! |
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 |
!Process methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1249 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1250 |
isWaiting |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1251 |
"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
|
1252 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1253 |
^ (state == #wait) |
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 |
"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
|
1256 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1257 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1258 |
!Process methodsFor:'Java protocol'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1259 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1260 |
javaInterrupt |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1261 |
self isWaiting ifTrue: [ |
1615 | 1262 |
self interruptWith: [ |
1263 |
JavaVM throwInterruptedException: 'thread has been interrupted during wait'. |
|
1264 |
self terminate |
|
1265 |
]. |
|
1266 |
^self |
|
1267 |
]. |
|
1268 |
||
1269 |
self isSleeping ifTrue: [ |
|
1270 |
self interruptWith: [ |
|
1271 |
JavaVM throwInterruptedException: 'thread has been interrupted during sleep'. |
|
1272 |
self terminate |
|
1273 |
]. |
|
1274 |
^self |
|
1275 |
]. |
|
1276 |
||
1277 |
self isParked ifTrue:[ |
|
1278 |
self setInterrupted. |
|
1279 |
JavaVM unpark: self. |
|
1280 |
^self. |
|
1281 |
]. |
|
1282 |
||
1283 |
self setInterrupted |
|
1609
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 |
"Created: / 30-11-2011 / 13:35:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
1615 | 1286 |
"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
|
1287 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1288 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1289 |
!Process methodsFor:'Java protocol'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1290 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1291 |
setInterrupted |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1292 |
|
1615 | 1293 |
JavaVM setInterrupted: self |
1609
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 |
"Created: / 30-11-2011 / 10:44:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
1615 | 1296 |
"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
|
1297 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1298 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1299 |
!ProgrammingLanguage methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1300 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1301 |
isGroovy |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1302 |
"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
|
1303 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1304 |
^ false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1305 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1306 |
"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
|
1307 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1308 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1309 |
!ProgrammingLanguage methodsFor:'testing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1310 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1311 |
isJavaLike |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1312 |
"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
|
1313 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1314 |
^ false |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1315 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1316 |
"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
|
1317 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1318 |
|
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
|
1319 |
!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
|
1320 |
|
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
|
1321 |
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
|
1322 |
|
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
|
1323 |
"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
|
1324 |
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
|
1325 |
|
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
|
1326 |
^#() |
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
|
1327 |
|
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
|
1328 |
"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
|
1329 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1330 |
|
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
|
1331 |
!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
|
1332 |
|
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
|
1333 |
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
|
1334 |
|
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
|
1335 |
"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
|
1336 |
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
|
1337 |
^#() |
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
|
1338 |
|
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
|
1339 |
"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
|
1340 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1341 |
|
1615 | 1342 |
!Semaphore methodsFor:'waiting'! |
1343 |
||
1344 |
parkWithTimeoutMs:milliSeconds |
|
1345 |
"Same as #waitWithTimeoutMs: but sets the state to #parked. |
|
1346 |
||
1347 |
Stupid, that I have to copy-paste this method... |
|
1348 |
" |
|
1349 |
||
1350 |
|activeProcess timeoutOccured wasBlocked timeoutBlock now endTime| |
|
1351 |
||
1352 |
wasBlocked := OperatingSystem blockInterrupts. |
|
1353 |
||
1354 |
count <= 0 ifTrue:[ |
|
1355 |
"with zero-timeout, this is a poll" |
|
1356 |
milliSeconds == 0 ifTrue:[ |
|
1357 |
wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
|
1358 |
^ nil |
|
1359 |
]. |
|
1360 |
||
1361 |
activeProcess := Processor activeProcess. |
|
1362 |
timeoutOccured := false. |
|
1363 |
||
1364 |
milliSeconds notNil ifTrue:[ |
|
1365 |
"Wait with timeout: calculate the end-time" |
|
1366 |
now := OperatingSystem getMillisecondTime. |
|
1367 |
endTime := OperatingSystem millisecondTimeAdd:now and:milliSeconds. |
|
1368 |
||
1369 |
timeoutBlock := [timeoutOccured := true. timeoutBlock:= nil. Processor resume:activeProcess]. |
|
1370 |
Processor addTimedBlock:timeoutBlock for:activeProcess atMilliseconds:endTime. |
|
1371 |
]. |
|
1372 |
||
1373 |
" |
|
1374 |
need a while-loop here, since more than one process may |
|
1375 |
wait for it and another one may also wake up. |
|
1376 |
Thus, the count is not always non-zero after returning from |
|
1377 |
suspend. |
|
1378 |
" |
|
1379 |
[ |
|
1380 |
self addWaitingProcess:activeProcess. |
|
1381 |
||
1382 |
" |
|
1383 |
for some more descriptive info in processMonitor ... |
|
1384 |
... set the state to #wait (instead of #suspend) |
|
1385 |
" |
|
1386 |
[ |
|
1387 |
"sleep until resumed..." |
|
1388 |
activeProcess suspendWithState:#parked. |
|
1389 |
] ifCurtailed:[ |
|
1390 |
"interrupts are not blocked when entered through Processor>>#interruptActive" |
|
1391 |
OperatingSystem blockInterrupts. |
|
1392 |
timeoutBlock notNil ifTrue:[ |
|
1393 |
Processor removeTimedBlock:timeoutBlock. |
|
1394 |
timeoutBlock := nil. |
|
1395 |
]. |
|
1396 |
self removeWaitingProcess:activeProcess. |
|
1397 |
wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
|
1398 |
]. |
|
1399 |
||
1400 |
self removeWaitingProcess:activeProcess. |
|
1401 |
timeoutOccured ifTrue:[ |
|
1402 |
wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
|
1403 |
^ nil |
|
1404 |
]. |
|
1405 |
] doUntil:[count > 0]. |
|
1406 |
||
1407 |
timeoutBlock notNil ifTrue:[ |
|
1408 |
Processor removeTimedBlock:timeoutBlock. |
|
1409 |
timeoutBlock := nil. |
|
1410 |
]. |
|
1411 |
]. |
|
1412 |
||
1413 |
"if we come here, we have accquired the semaphore" |
|
1414 |
count := count - 1. |
|
1415 |
count == 0 ifTrue:[ |
|
1416 |
lastOwner := Processor activeProcess. |
|
1417 |
]. |
|
1418 |
wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
|
1419 |
^ self |
|
1420 |
||
1421 |
"Created: / 16-08-2012 / 20:53:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1422 |
! ! |
|
1423 |
||
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1424 |
!Set methodsFor:'javaProtocol'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1425 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1426 |
java__contains:anObject |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1427 |
^ 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
|
1428 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1429 |
|
752 | 1430 |
!ShortFloat class methodsFor:'queries'! |
1431 |
||
1432 |
isJavaPrimitiveType |
|
1433 |
||
1434 |
^true |
|
1435 |
||
1436 |
"Created: / 06-02-2011 / 17:21:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1437 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1438 |
|
752 | 1439 |
!ShortFloat class methodsFor:'accessing'! |
1440 |
||
851 | 1441 |
javaArrayClass |
1442 |
^ FloatArray |
|
1443 |
||
1444 |
"Created: / 11-02-2011 / 10:50:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1445 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1446 |
|
917 | 1447 |
!ShortFloat class methodsFor:'autoboxing support'! |
1448 |
||
1159 | 1449 |
javaBox: anObject |
917 | 1450 |
| wrapper | |
1451 |
||
1033 | 1452 |
wrapper := (JavaVM classForName: 'java.lang.Float') new. |
917 | 1453 |
wrapper perform: #'<init>(F)V' with: anObject. |
1033 | 1454 |
^ wrapper |
917 | 1455 |
|
1456 |
"Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1457 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1458 |
|
851 | 1459 |
!ShortFloat class methodsFor:'accessing'! |
1460 |
||
752 | 1461 |
javaName |
1462 |
||
1463 |
^'float'. |
|
1464 |
||
1465 |
"Modified: / 25-02-2011 / 18:59:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1466 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1467 |
|
1386 | 1468 |
!ShortFloat class methodsFor:'accessing'! |
1469 |
||
1470 |
javaWrapperClass |
|
1471 |
^(Java classForName: 'java.lang.Float') |
|
1472 |
||
1473 |
"Created: / 24-02-2012 / 19:42:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1474 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1475 |
|
866 | 1476 |
!SignedIntegerArray class methodsFor:'testing'! |
1477 |
||
1478 |
isInterface |
|
1479 |
||
1480 |
^false |
|
1481 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1482 |
|
866 | 1483 |
!SignedIntegerArray class methodsFor:'queries'! |
1484 |
||
1485 |
isJavaArrayClass |
|
1486 |
||
1487 |
^true |
|
1488 |
||
1489 |
"Created: / 06-02-2011 / 15:16:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1490 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1491 |
|
905 | 1492 |
!SignedIntegerArray class methodsFor:'accessing-java'! |
1493 |
||
1494 |
javaArrayClass |
|
1495 |
||
1496 |
^JavaArray javaArrayClassFor: SignedIntegerArray |
|
1497 |
||
1498 |
"Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1499 |
"Modified: / 10-08-2011 / 22:47:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1500 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1501 |
|
866 | 1502 |
!SignedIntegerArray class methodsFor:'accessing'! |
1503 |
||
1504 |
javaComponentClass |
|
1505 |
||
1506 |
^ Integer |
|
1507 |
||
1508 |
"Created: / 25-06-2011 / 08:38:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1509 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1510 |
|
866 | 1511 |
!SignedIntegerArray class methodsFor:'accessing'! |
1512 |
||
1513 |
javaName |
|
1514 |
||
1515 |
^'[I'. |
|
1516 |
||
1517 |
"Modified: / 25-02-2011 / 19:03:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1518 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1519 |
|
866 | 1520 |
!SignedLongIntegerArray class methodsFor:'testing'! |
1521 |
||
1522 |
isInterface |
|
1523 |
||
1524 |
^false |
|
1525 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1526 |
|
866 | 1527 |
!SignedLongIntegerArray class methodsFor:'queries'! |
1528 |
||
1529 |
isJavaArrayClass |
|
1530 |
||
1531 |
^true |
|
1532 |
||
1533 |
"Created: / 20-12-2010 / 22:47:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1534 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1535 |
|
866 | 1536 |
!SignedLongIntegerArray class methodsFor:'queries'! |
1537 |
||
1538 |
isJavaReferenceType |
|
1539 |
||
1540 |
"Java arrays are reference types" |
|
1541 |
^true |
|
1542 |
||
1543 |
"Created: / 20-12-2010 / 22:30:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1544 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1545 |
|
927 | 1546 |
!SignedLongIntegerArray class methodsFor:'accessing-java'! |
1547 |
||
1548 |
javaArrayClass |
|
1549 |
||
1550 |
^JavaArray javaArrayClassFor: SignedLongIntegerArray |
|
1551 |
||
1552 |
"Modified: / 10-08-2011 / 22:47:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1553 |
"Created: / 26-08-2011 / 18:29:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1554 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1555 |
|
866 | 1556 |
!SignedLongIntegerArray class methodsFor:'accessing'! |
1557 |
||
1558 |
javaComponentClass |
|
1559 |
||
1560 |
^LargeInteger |
|
1561 |
||
1562 |
"Modified: / 25-06-2011 / 08:38:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1563 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1564 |
|
866 | 1565 |
!SignedLongIntegerArray class methodsFor:'accessing'! |
1566 |
||
1567 |
javaName |
|
1568 |
||
1569 |
^'[J'. |
|
1570 |
||
1571 |
"Modified: / 25-02-2011 / 19:03:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1572 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1573 |
|
1384
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1574 |
!SignedWordArray class methodsFor:'queries'! |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1575 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1576 |
isJavaArrayClass |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1577 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1578 |
^true |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1579 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1580 |
"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
|
1581 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1582 |
|
1384
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1583 |
!SignedWordArray class methodsFor:'queries'! |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1584 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1585 |
isJavaReferenceType |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1586 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1587 |
"Java arrays are reference types" |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1588 |
^true |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1589 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1590 |
"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
|
1591 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1592 |
|
1384
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1593 |
!SignedWordArray class methodsFor:'accessing'! |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1594 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1595 |
javaComponentClass |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1596 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1597 |
^JavaShort |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1598 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1599 |
"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
|
1600 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1601 |
|
1384
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1602 |
!SignedWordArray class methodsFor:'accessing'! |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1603 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1604 |
javaName |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1605 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1606 |
^'[S'. |
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1607 |
|
d62dd4b29c22
Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents:
1376
diff
changeset
|
1608 |
"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
|
1609 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1610 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1611 |
!SmallInteger methodsFor:'autoboxing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1612 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1613 |
javaUnwrapFrom: javaType |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1614 |
javaType = #boolean ifTrue: [ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1615 |
^ self = 1 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1616 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1617 |
^ self |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1618 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1619 |
"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
|
1620 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1621 |
|
1617 | 1622 |
!Socket methodsFor:'testing'! |
1623 |
||
1624 |
isSocket |
|
1625 |
^true |
|
1626 |
||
1627 |
"Created: / 17-08-2012 / 15:32:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1628 |
! ! |
|
1629 |
||
1630 |
!Socket methodsFor:'special'! |
|
1631 |
||
1632 |
reOpenIfPossible |
|
1633 |
"If the socket was listening (server-sockets), try to reopen it" |
|
1634 |
||
1635 |
| pno | |
|
1636 |
||
1637 |
listening ifFalse:[ ^ self ]. |
|
1638 |
pno := port. |
|
1639 |
[ |
|
1640 |
self domain: domain type: socketType protocol: protocol reuseAddress:true. |
|
1641 |
self bindTo:port address:nil. |
|
1642 |
self listenFor: 5 |
|
1643 |
] on: OpenError do:[ |
|
1644 |
"Notning, socket could not be reopened" |
|
1645 |
]. |
|
1646 |
||
1647 |
"Created: / 17-08-2012 / 15:43:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1648 |
! ! |
|
1649 |
||
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1650 |
!String methodsFor:'converting'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1651 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1652 |
asArrayOfSubstringsSeparatedBy:aSeparator |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1653 |
"Modified version of asArrayOfSubstrings" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1654 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1655 |
|substrings start end| |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1656 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1657 |
substrings := OrderedCollection new. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1658 |
start := 1. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1659 |
[start <= self size] whileTrue:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1660 |
(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
|
1661 |
end := start + 1. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1662 |
[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1663 |
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
|
1664 |
] whileTrue:[end := end + 1]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1665 |
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
|
1666 |
start := end - 1 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1667 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1668 |
start := start + 1 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1669 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1670 |
^ substrings asArray |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1671 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1672 |
"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
|
1673 |
"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
|
1674 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1675 |
|
752 | 1676 |
!UndefinedObject class methodsFor:'queries'! |
1677 |
||
1678 |
isJavaPrimitiveType |
|
1679 |
||
1680 |
"void" |
|
1681 |
||
1682 |
^true |
|
1683 |
||
1684 |
"Created: / 21-12-2010 / 22:52:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1685 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1686 |
|
752 | 1687 |
!UndefinedObject class methodsFor:'accessing'! |
1688 |
||
1689 |
javaName |
|
1690 |
||
1691 |
^'void'. |
|
1692 |
||
1693 |
"Modified: / 25-02-2011 / 18:59:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1694 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1695 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1696 |
!UserPreferences methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1697 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1698 |
javaClassPath |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1699 |
"Return the Java user-defined class path encoded as literal array" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1700 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1701 |
^ self at:#javaClassPath ifAbsent:[#()]. |
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 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1704 |
UserPreferences current javaClassPath |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1705 |
UserPreferences current javaClassPath: #openJDK7 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1706 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1707 |
Java classPath |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1708 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1709 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1710 |
"Created: / 27-07-2012 / 12:52:03 / 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
|
1711 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1712 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1713 |
!UserPreferences methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1714 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1715 |
javaClassPath: literalArrayEncoding |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1716 |
"Sets the Java user-defined class path as literalArrayEncoding of a collection |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1717 |
of JavaPathElements" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1718 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1719 |
self at:#javaClassPath put: literalArrayEncoding. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1720 |
(Java notNil and:[thisContext sender receiver == Java]) ifFalse:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1721 |
| classPath | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1722 |
classPath := literalArrayEncoding decodeAsLiteralArray. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1723 |
Java classPath: classPath. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1724 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1725 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1726 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1727 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1728 |
UserPreferences current javaClassPath |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1729 |
UserPreferences current javaClassPath: #openJDK7 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1730 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1731 |
Java classPath |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1732 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1733 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1734 |
"Created: / 27-07-2012 / 12:50: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
|
1735 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1736 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1737 |
!UserPreferences methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1738 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1739 |
javaClassPathDecoded |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1740 |
"Return the Java user-defined class path (a collection of JavaPathElement)" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1741 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1742 |
^ self javaClassPath decodeAsLiteralArray |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1743 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1744 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1745 |
UserPreferences current javaClassPathDecoded |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1746 |
UserPreferences current javaClassPath |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1747 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1748 |
Java classPath |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1749 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1750 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1751 |
"Created: / 02-08-2012 / 09:43: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
|
1752 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1753 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1754 |
!UserPreferences methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1755 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1756 |
javaRelease |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1757 |
"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
|
1758 |
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
|
1759 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1760 |
| rel sel | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1761 |
sel := self javaReleaseSelector. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1762 |
sel notNil ifTrue:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1763 |
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
|
1764 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1765 |
^rel |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1766 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1767 |
"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
|
1768 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1769 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1770 |
!UserPreferences methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1771 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1772 |
javaReleaseSelector |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1773 |
^ 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
|
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 current javaReleaseSelector |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1777 |
UserPreferences current javaReleaseSelector: #openJDK6 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1778 |
UserPreferences current javaReleaseSelector: nil |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1779 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1780 |
Java release |
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 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1783 |
"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
|
1784 |
! ! |
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 |
!UserPreferences methodsFor:'accessing-java'! |
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 |
javaReleaseSelector: name |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1789 |
"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
|
1790 |
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
|
1791 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1792 |
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
|
1793 |
Java notNil ifTrue:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1794 |
Java reinitializeRelease |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1795 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1796 |
|
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 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1799 |
UserPreferences current javaReleaseSelector |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1800 |
UserPreferences current javaReleaseSelector: #openJDK7 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1801 |
UserPreferences current javaReleaseSelector: nil |
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 |
Java release |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1804 |
Java release:nil |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1805 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1806 |
Java reinitializeRelease |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1807 |
" |
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 |
"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
|
1810 |
! ! |
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 |
!UserPreferences methodsFor:'accessing-java'! |
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 |
javaSourcePath |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1815 |
"Return the Java user-defined source path encoded as literal array" |
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 |
^ self at:#javaSourcePath ifAbsent:[#()]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1818 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1819 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1820 |
UserPreferences current javaSourcePath |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1821 |
UserPreferences current javaSourcePath: #openJDK7 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1822 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1823 |
Java sourcePath |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1824 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1825 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1826 |
"Created: / 27-07-2012 / 12:54:03 / 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
|
1827 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1828 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1829 |
!UserPreferences methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1830 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1831 |
javaSourcePath: literalArrayEncoding |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1832 |
"Sets the Java user-defined source path as literalArrayEncoding of a collection |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1833 |
of JavaPathElements" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1834 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1835 |
self at:#javaSourcePath put: literalArrayEncoding. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1836 |
(Java notNil and:[thisContext sender receiver == Java]) ifFalse:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1837 |
| classPath | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1838 |
classPath := literalArrayEncoding decodeAsLiteralArray. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1839 |
Java sourceDirectories: classPath. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1840 |
]. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1841 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1842 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1843 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1844 |
UserPreferences current javaClassPath |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1845 |
UserPreferences current javaClassPath: #openJDK7 |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1846 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1847 |
Java sourceDirectories |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1848 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1849 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1850 |
"Created: / 27-07-2012 / 12:54: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
|
1851 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1852 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1853 |
!UserPreferences methodsFor:'accessing-java'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1854 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1855 |
javaSourcePathDecoded |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1856 |
"Return the Java user-defined source path (a collection of JavaPathElement)" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1857 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1858 |
^ self javaSourcePath decodeAsLiteralArray |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1859 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1860 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1861 |
UserPreferences current javaSourcePathDecoded |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1862 |
UserPreferences current javaSourcePath |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1863 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1864 |
Java sourceDirectories |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1865 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1866 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1867 |
"Created: / 02-08-2012 / 09:44:41 / 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
|
1868 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1869 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1870 |
!UserPreferences methodsFor:'accessing-java-devel'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1871 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1872 |
javaTestsDirectory |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1873 |
^ self at: #javaTestsDirectory |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1874 |
ifAbsent: |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1875 |
[ | nm | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1876 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1877 |
nm := OperatingSystem getLoginName. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1878 |
"Default path for Jan" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1879 |
(nm = 'jv' and:[OperatingSystem isUNIXlike]) |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1880 |
ifTrue: |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1881 |
[ '/home/jv/Projects/libjava/sources/libjava/branches/jk_new_structure/tests' ] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1882 |
ifFalse: |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1883 |
[ "Default path for Jan (the other one :-)" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1884 |
nm = 'jk' |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1885 |
ifTrue: [ 'path for Jan' ] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1886 |
ifFalse: |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1887 |
[ "Default path for Marcel" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1888 |
nm = 'm' |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1889 |
ifTrue: [ '/home/m/Projects/libjava/branches/jk_new_structure/tests' ] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1890 |
ifFalse: |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1891 |
[ | "Look into package dir" p | |
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 |
(p := (Smalltalk getPackageDirectoryForPackage: 'stx:libjava') asFilename |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1894 |
/ 'tests') exists |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1895 |
ifTrue: [ p pathName ] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1896 |
ifFalse: |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1897 |
[ | "Try the environment variable (used by Hudson)" p | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1898 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1899 |
(p := OperatingSystem getEnvironment: 'LIBJAVA_TESTS') notNil |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1900 |
ifTrue: [ p ] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1901 |
ifFalse: |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1902 |
[ "No default, trigger an error" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1903 |
self error: 'No tests path specified' ] ] ] ] ] ] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1904 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1905 |
" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1906 |
UserPreferences current javaTestsDirectory" |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1907 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1908 |
"Created: / 07-05-2011 / 17:43:31 / 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
|
1909 |
"Modified: / 07-05-2011 / 20:21:05 / 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
|
1910 |
"Modified: / 12-05-2011 / 15:54:39 / 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
|
1911 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1912 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1913 |
!UserPreferences methodsFor:'accessing-java-devel'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1914 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1915 |
javaTestsDirectory: aStringOrFilename |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1916 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1917 |
self at:#javaTestsDirectory put: aStringOrFilename asString. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1918 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1919 |
"Created: / 07-05-2011 / 17:45: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
|
1920 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1921 |
|
826
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
1922 |
!WordArray class methodsFor:'testing'! |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
1923 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
1924 |
isInterface |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
1925 |
|
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
1926 |
^false |
db53b9c842d7
- TestletTestCaseProxy: debugging support improved.
vranyj1
parents:
774
diff
changeset
|
1927 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1928 |
|
752 | 1929 |
!WordArray class methodsFor:'queries'! |
1930 |
||
1931 |
isJavaArrayClass |
|
1932 |
||
1933 |
^true |
|
1934 |
||
1935 |
"Created: / 20-12-2010 / 22:47:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1936 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1937 |
|
752 | 1938 |
!WordArray class methodsFor:'queries'! |
1939 |
||
1940 |
isJavaReferenceType |
|
1941 |
||
1942 |
"Java arrays are reference types" |
|
1943 |
^true |
|
1944 |
||
1945 |
"Created: / 20-12-2010 / 22:30:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1946 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1947 |
|
752 | 1948 |
!WordArray class methodsFor:'accessing-java'! |
1949 |
||
905 | 1950 |
javaArrayClass |
1951 |
||
1952 |
^JavaArray javaArrayClassFor: WordArray |
|
1953 |
||
1954 |
"Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1955 |
"Modified: / 10-08-2011 / 22:46:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1956 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1957 |
|
905 | 1958 |
!WordArray class methodsFor:'accessing-java'! |
1959 |
||
752 | 1960 |
javaComponentClass |
1961 |
||
1159 | 1962 |
^JavaShort |
752 | 1963 |
|
1964 |
"Created: / 20-12-2010 / 22:13:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1965 |
! ! |
|
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1966 |
|
752 | 1967 |
!WordArray class methodsFor:'accessing'! |
1968 |
||
1969 |
javaName |
|
1225
30600ca8173c
ok now we enabled permissions and groovy maybe does not work :/
hlopkmar
parents:
1209
diff
changeset
|
1970 |
^ '[S'. |
752 | 1971 |
|
1225
30600ca8173c
ok now we enabled permissions and groovy maybe does not work :/
hlopkmar
parents:
1209
diff
changeset
|
1972 |
"Modified: / 06-12-2011 / 16:43:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
752 | 1973 |
! ! |
1609
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1974 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1975 |
!WrappedMethod methodsFor:'accessing'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1976 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1977 |
descriptor |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1978 |
"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
|
1979 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1980 |
| orig | |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1981 |
orig := self originalMethod. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1982 |
^(orig respondsTo: #descriptor) ifTrue:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1983 |
orig descriptor |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1984 |
] ifFalse:[ |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1985 |
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
|
1986 |
] |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1987 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1988 |
"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
|
1989 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1990 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1991 |
!WrappedMethod methodsFor:'queries'! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1992 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1993 |
isAbstract |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1994 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1995 |
^self originalMethod isAbstract. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1996 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1997 |
"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
|
1998 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
1999 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
2000 |
!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
|
2001 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
2002 |
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
|
2003 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
2004 |
file position0Based: zmember fileStart + startOfArchive + pos. |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
2005 |
^ 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
|
2006 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
2007 |
"Created: / 01-05-2011 / 16:21:42 / 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
|
2008 |
! ! |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
2009 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
2010 |
!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
|
2011 |
|
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
2012 |
extensionsVersion_SVN |
7a2627788ad7
- JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents:
1598
diff
changeset
|
2013 |
^ '$Id:: $' |
1692 | 2014 |
! ! |