author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 10 Sep 2013 02:41:25 +0200 | |
changeset 2691 | e22c08439405 |
parent 2678 | c865275e48a7 |
child 2731 | 13f5be2bf83b |
permissions | -rw-r--r-- |
749 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
3 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
4 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
5 |
|
749 | 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 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
16 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
17 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
18 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
19 |
as of 1.9.2010 |
749 | 20 |
" |
21 |
"{ Package: 'stx:libjava' }" |
|
22 |
||
23 |
Object subclass:#JavaObjectDictionary |
|
24 |
instanceVariableNames:'dictionary' |
|
25 |
classVariableNames:'Instance' |
|
26 |
poolDictionaries:'' |
|
27 |
category:'Languages-Java-Support' |
|
28 |
! |
|
29 |
||
30 |
!JavaObjectDictionary class methodsFor:'documentation'! |
|
31 |
||
32 |
copyright |
|
33 |
" |
|
34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
35 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
36 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
37 |
|
749 | 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 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
48 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
49 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
50 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
51 |
as of 1.9.2010 |
749 | 52 |
|
53 |
" |
|
54 |
! ! |
|
55 |
||
56 |
!JavaObjectDictionary class methodsFor:'instance creation'! |
|
57 |
||
58 |
instance |
|
59 |
Instance ifNil: [ |
|
60 |
Instance := self basicNew initialize. |
|
61 |
]. |
|
62 |
^ Instance. |
|
63 |
||
64 |
"Created: / 09-01-2011 / 20:48:16 / Jan Kurs <kurs.jan@post.cz>" |
|
65 |
! |
|
66 |
||
67 |
new |
|
68 |
"Currently singleton but in future Query may be more suitable" |
|
69 |
^ self instance. |
|
70 |
||
71 |
"Created: / 09-01-2011 / 20:48:16 / Jan Kurs <kurs.jan@post.cz>" |
|
72 |
! ! |
|
73 |
||
74 |
!JavaObjectDictionary methodsFor:'accessing'! |
|
75 |
||
76 |
hasReflection: stClassName |
|
77 |
"return true if stClassName has reflection in Java World" |
|
78 |
^ (dictionary at: stClassName ifAbsent: [ nil ]) notNil |
|
79 |
||
80 |
"Created: / 17-01-2011 / 19:20:58 / kursjan <kursjan@fit.cvut.cz>" |
|
81 |
! |
|
82 |
||
83 |
reflectionOf: stClassName |
|
84 |
^ dictionary at: stClassName ifAbsent: [ NoReflectionObject new ] |
|
85 |
||
86 |
"Created: / 09-01-2011 / 21:03:24 / Jan Kurs <kurs.jan@post.cz>" |
|
87 |
"Modified: / 17-01-2011 / 10:39:43 / kursjan <kursjan@fit.cvut.cz>" |
|
88 |
! ! |
|
89 |
||
90 |
!JavaObjectDictionary methodsFor:'adding & removing'! |
|
91 |
||
92 |
flush |
|
93 |
dictionary removeAll. |
|
94 |
||
95 |
"Created: / 09-01-2011 / 21:44:04 / Jan Kurs <kurs.jan@post.cz>" |
|
96 |
! |
|
97 |
||
98 |
registerJavaObject: aJavaClass toStObject: aStObject |
|
99 |
dictionary at: aStObject name asSymbol put: aJavaClass. |
|
100 |
||
101 |
"Created: / 09-01-2011 / 21:40:00 / Jan Kurs <kurs.jan@post.cz>" |
|
102 |
! ! |
|
103 |
||
104 |
!JavaObjectDictionary methodsFor:'initialization'! |
|
105 |
||
106 |
initialize |
|
107 |
"Use StCounter instead of Counter" |
|
108 |
dictionary := IdentityDictionary new. |
|
109 |
||
110 |
"Modified: / 09-01-2011 / 21:36:58 / Jan Kurs <kurs.jan@post.cz>" |
|
111 |
! ! |
|
112 |
||
113 |
!JavaObjectDictionary class methodsFor:'documentation'! |
|
114 |
||
2247 | 115 |
version_CVS |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
116 |
^ '$Header: /cvs/stx/stx/libjava/JavaObjectDictionary.st,v 1.5 2013-09-06 00:41:25 vrany Exp $' |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
117 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
118 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
119 |
version_HG |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
120 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
121 |
^ '$Changeset: <not expanded> $' |
2247 | 122 |
! |
123 |
||
749 | 124 |
version_SVN |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
125 |
^ '§Id§' |
2152 | 126 |
! ! |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2247
diff
changeset
|
127 |