752
|
1 |
"{ Package: 'stx:libjava' }"
|
|
2 |
|
|
3 |
Array variableSubclass:#JavaArray
|
|
4 |
instanceVariableNames:''
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'Languages-Java-Classes'
|
|
8 |
!
|
|
9 |
|
|
10 |
JavaArray class instanceVariableNames:'componentClass'
|
|
11 |
|
|
12 |
"
|
|
13 |
No other class instance variables are inherited by this class.
|
|
14 |
"
|
|
15 |
!
|
|
16 |
|
|
17 |
|
|
18 |
!JavaArray class methodsFor:'initialization'!
|
|
19 |
|
|
20 |
setComponentClass:aClass
|
|
21 |
componentClass := aClass.
|
|
22 |
|
|
23 |
"Created: / 17-12-2010 / 13:25:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
24 |
! !
|
|
25 |
|
|
26 |
!JavaArray class methodsFor:'accessing'!
|
|
27 |
|
|
28 |
javaClass
|
|
29 |
^ self
|
|
30 |
|
|
31 |
"Created: / 19-12-2010 / 17:09:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
32 |
!
|
|
33 |
|
|
34 |
javaComponentClass
|
|
35 |
^ componentClass
|
|
36 |
|
|
37 |
"Created: / 20-12-2010 / 22:02:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
38 |
!
|
|
39 |
|
|
40 |
javaName
|
|
41 |
^'[L' , componentClass javaName, ';'
|
|
42 |
|
|
43 |
"Created: / 25-02-2011 / 19:29:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
44 |
! !
|
|
45 |
|
|
46 |
!JavaArray class methodsFor:'class creation'!
|
|
47 |
|
|
48 |
javaArrayClassFor: aJavaClass
|
|
49 |
|
|
50 |
| meta cls |
|
|
51 |
|
|
52 |
meta := Metaclass new.
|
|
53 |
meta setSuperclass: JavaArray class.
|
|
54 |
meta instSize: JavaArray class instSize.
|
|
55 |
cls := meta new.
|
|
56 |
cls setSuperclass: JavaArray.
|
|
57 |
cls flags: JavaArray flags.
|
|
58 |
cls instSize: JavaArray instSize.
|
|
59 |
cls setComponentClass: aJavaClass.
|
|
60 |
cls setName: (aJavaClass name , '[]') asSymbol.
|
|
61 |
"Kludge, spec says"
|
|
62 |
"All methods of class Object may be invoked on an array."
|
|
63 |
cls setMethodDictionary: (Java classForName: 'java.lang.Object') methodDictionary.
|
|
64 |
|
|
65 |
^cls
|
|
66 |
|
|
67 |
"
|
|
68 |
JavaArray javaArrayClassFor: Object
|
|
69 |
"
|
|
70 |
|
|
71 |
"Created: / 17-12-2010 / 13:45:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
72 |
"Modified: / 01-03-2011 / 14:55:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
73 |
! !
|
|
74 |
|
|
75 |
!JavaArray class methodsFor:'queries'!
|
|
76 |
|
|
77 |
hasInterface:aJavaInterface
|
|
78 |
"return true, if I respond to all methods as
|
|
79 |
aJavaInterface"
|
|
80 |
|
|
81 |
^false
|
|
82 |
|
|
83 |
"Modified: / 19-12-2010 / 16:45:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
84 |
!
|
|
85 |
|
|
86 |
isAbstract
|
|
87 |
"return true, if the receiver is abstract
|
|
88 |
(i.e. may not have instances)"
|
|
89 |
|
|
90 |
^ false
|
|
91 |
|
|
92 |
"Modified: / 19-12-2010 / 16:45:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
93 |
!
|
|
94 |
|
|
95 |
isFinal
|
|
96 |
"return true, if the receiver is final
|
|
97 |
(i.e. may not be subclassed)"
|
|
98 |
|
|
99 |
^ false
|
|
100 |
|
|
101 |
"Modified: / 19-12-2010 / 16:45:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
102 |
!
|
|
103 |
|
|
104 |
isInitialized
|
|
105 |
"return true, if the receiver is initialized"
|
|
106 |
|
|
107 |
^ true
|
|
108 |
|
|
109 |
"Modified: / 07-05-1998 / 12:23:54 / cg"
|
|
110 |
"Modified: / 19-12-2010 / 16:45:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
111 |
!
|
|
112 |
|
|
113 |
isInterface
|
|
114 |
"return true, if the receiver is an interface"
|
|
115 |
|
|
116 |
^ false
|
|
117 |
|
|
118 |
"Modified: / 07-05-1998 / 12:23:39 / cg"
|
|
119 |
"Modified: / 19-12-2010 / 16:45:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
120 |
!
|
|
121 |
|
|
122 |
isJavaArrayClass
|
|
123 |
|
|
124 |
^true
|
|
125 |
|
|
126 |
"Created: / 19-12-2010 / 17:05:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
127 |
!
|
|
128 |
|
|
129 |
isJavaReferenceType
|
|
130 |
|
|
131 |
^true
|
|
132 |
|
|
133 |
"Created: / 20-12-2010 / 21:58:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
134 |
!
|
|
135 |
|
|
136 |
isJavaType
|
|
137 |
|
|
138 |
^true
|
|
139 |
|
|
140 |
"Created: / 20-12-2010 / 21:58:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
141 |
!
|
|
142 |
|
|
143 |
isObsolete
|
|
144 |
"return true, if the receiver is obsolete
|
|
145 |
Java classes are never."
|
|
146 |
|
|
147 |
^ false
|
|
148 |
|
|
149 |
"Modified: / 07-08-1997 / 19:04:28 / cg"
|
|
150 |
"Modified: / 19-12-2010 / 16:45:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
151 |
!
|
|
152 |
|
|
153 |
isPublic
|
|
154 |
"return true, if the receiver is public"
|
|
155 |
|
|
156 |
^ true
|
|
157 |
|
|
158 |
"Modified: / 19-12-2010 / 16:45:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
159 |
!
|
|
160 |
|
|
161 |
isUnresolved
|
|
162 |
|
|
163 |
^false
|
|
164 |
|
|
165 |
"Created: / 21-12-2010 / 12:51:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
166 |
! !
|
|
167 |
|
|
168 |
!JavaArray class methodsFor:'documentation'!
|
|
169 |
|
|
170 |
version_SVN
|
|
171 |
^ '$Id$'
|
|
172 |
! !
|