1453
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger
|
|
3 |
|
|
4 |
New code and modifications done at SWING Research Group [1]:
|
|
5 |
|
|
6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
|
|
7 |
SWING Research Group, Czech Technical University in Prague
|
|
8 |
|
|
9 |
This software is furnished under a license and may be used
|
|
10 |
only in accordance with the terms of that license and with the
|
|
11 |
inclusion of the above copyright notice. This software may not
|
|
12 |
be provided or otherwise made available to, or used by, any
|
|
13 |
other person. No title to or ownership of the software is
|
|
14 |
hereby transferred.
|
|
15 |
|
|
16 |
[1] Code written at SWING Research Group contains a signature
|
|
17 |
of one of the above copright owners. For exact set of such code,
|
|
18 |
see the differences between this version and version stx:libjava
|
|
19 |
as of 1.9.2010
|
|
20 |
"
|
|
21 |
"{ Package: 'stx:libjava' }"
|
|
22 |
|
|
23 |
Metaclass subclass:#JavaMetaclass
|
|
24 |
instanceVariableNames:''
|
|
25 |
classVariableNames:''
|
|
26 |
poolDictionaries:''
|
|
27 |
category:'Languages-Java-Classes'
|
|
28 |
!
|
|
29 |
|
|
30 |
!JavaMetaclass class methodsFor:'documentation'!
|
|
31 |
|
|
32 |
copyright
|
|
33 |
"
|
|
34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger
|
|
35 |
|
|
36 |
New code and modifications done at SWING Research Group [1]:
|
|
37 |
|
|
38 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
|
|
39 |
SWING Research Group, Czech Technical University in Prague
|
|
40 |
|
|
41 |
This software is furnished under a license and may be used
|
|
42 |
only in accordance with the terms of that license and with the
|
|
43 |
inclusion of the above copyright notice. This software may not
|
|
44 |
be provided or otherwise made available to, or used by, any
|
|
45 |
other person. No title to or ownership of the software is
|
|
46 |
hereby transferred.
|
|
47 |
|
|
48 |
[1] Code written at SWING Research Group contains a signature
|
|
49 |
of one of the above copright owners. For exact set of such code,
|
|
50 |
see the differences between this version and version stx:libjava
|
|
51 |
as of 1.9.2010
|
|
52 |
|
|
53 |
"
|
|
54 |
! !
|
|
55 |
|
|
56 |
!JavaMetaclass class methodsFor:'accessing - template'!
|
|
57 |
|
|
58 |
classTemplateFor:aSuperClass in:categoryString asNamespace:asNameSpace private:isPrivate
|
|
59 |
^JavaLanguage instance classTemplateFor: aSuperClass in: categoryString asNamespace: false private: isPrivate
|
|
60 |
|
|
61 |
"Created: / 04-04-2012 / 02:07:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
62 |
! !
|
|
63 |
|
|
64 |
!JavaMetaclass methodsFor:'compiler interface'!
|
|
65 |
|
|
66 |
programmingLanguage
|
|
67 |
|
|
68 |
self == JavaMetaclass ifTrue:[^super programmingLanguage].
|
|
69 |
^JavaLanguage instance
|
|
70 |
|
|
71 |
"Created: / 15-08-2009 / 09:07:09 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
72 |
"Modified: / 16-08-2009 / 10:37:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
73 |
"Modified: / 04-04-2012 / 01:58:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
74 |
!
|
|
75 |
|
|
76 |
realSubclassDefinerClass
|
|
77 |
"/For now: "
|
|
78 |
^self error:'No JavaCompliler yet'.
|
|
79 |
"/Will be soon
|
|
80 |
"/^JavaCompiler
|
|
81 |
|
|
82 |
"Created: / 04-04-2012 / 10:16:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
83 |
! !
|
|
84 |
|
1812
|
85 |
!JavaMetaclass methodsFor:'fileOut'!
|
|
86 |
|
|
87 |
fileOutMethod:aMethod on:aStream
|
|
88 |
"file out aMethod onto aStream. Used for example to write individual changeChunks"
|
|
89 |
|
|
90 |
|cat source privacy|
|
|
91 |
|
|
92 |
self assert: aMethod programmingLanguage isSmalltalk.
|
|
93 |
|
|
94 |
aStream nextPutChunkSeparator.
|
|
95 |
"/ aStream nextPutAll: 'JAVA'.
|
|
96 |
"/ (self name tokensBasedOn: $/) do:[:each|
|
|
97 |
"/ aStream space; nextPutAll: each.
|
|
98 |
"/ ].
|
|
99 |
aStream nextPutAll:'(Java classForName:'''.
|
|
100 |
aStream nextPutAll:(myClass name copyReplaceAll:$/ with: $.).
|
|
101 |
aStream nextPutAll:''') class '.
|
|
102 |
|
|
103 |
(privacy := aMethod privacy) ~~ #public ifTrue:[
|
|
104 |
aStream space; nextPutAll:privacy; nextPutAll:'MethodsFor:'.
|
|
105 |
] ifFalse:[
|
|
106 |
aStream nextPutAll:' methodsFor:'.
|
|
107 |
].
|
|
108 |
|
|
109 |
cat := aMethod category ? ''.
|
|
110 |
aStream nextPutAll:cat asString storeString.
|
|
111 |
aStream nextPutChunkSeparator; cr; cr.
|
|
112 |
|
|
113 |
source := aMethod source.
|
|
114 |
source isNil ifTrue:[
|
|
115 |
FileOutErrorSignal
|
|
116 |
raiseRequestWith:self
|
|
117 |
errorString:(' - no source for method: ' ,
|
|
118 |
self name , '>>' ,
|
|
119 |
(self selectorAtMethod:aMethod))
|
|
120 |
] ifFalse:[
|
|
121 |
aStream nextChunkPut:source.
|
|
122 |
].
|
|
123 |
aStream space.
|
|
124 |
aStream nextPutChunkSeparator.
|
|
125 |
aStream cr
|
|
126 |
|
|
127 |
"Created: / 05-09-2012 / 00:01:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
128 |
"Modified: / 07-11-2012 / 23:43:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
129 |
! !
|
|
130 |
|
1507
|
131 |
!JavaMetaclass methodsFor:'queries'!
|
|
132 |
|
|
133 |
supportsMethodCategories
|
|
134 |
^myClass supportsMethodCategories
|
|
135 |
|
|
136 |
"Created: / 04-07-2012 / 19:54:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
137 |
! !
|
|
138 |
|
1453
|
139 |
!JavaMetaclass class methodsFor:'documentation'!
|
|
140 |
|
1864
|
141 |
version_HG
|
|
142 |
|
|
143 |
^ '$Changeset: <not expanded> $'
|
|
144 |
!
|
|
145 |
|
1453
|
146 |
version_SVN
|
1864
|
147 |
^ '§Id:: §'
|
1453
|
148 |
! !
|