877
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger
|
1152
|
3 |
|
1155
|
4 |
New code and modifications done at SWING Research Group [1]:
|
1152
|
5 |
|
877
|
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 |
|
1155
|
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
|
1152
|
19 |
as of 1.9.2010
|
877
|
20 |
"
|
752
|
21 |
"{ Package: 'stx:libjava' }"
|
|
22 |
|
|
23 |
JavaRef2 subclass:#JavaRefMock
|
|
24 |
instanceVariableNames:''
|
|
25 |
classVariableNames:''
|
|
26 |
poolDictionaries:''
|
|
27 |
category:'Languages-Java-Tests-RuntimeConstantPool'
|
|
28 |
!
|
|
29 |
|
877
|
30 |
!JavaRefMock class methodsFor:'documentation'!
|
|
31 |
|
|
32 |
copyright
|
|
33 |
"
|
|
34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger
|
1152
|
35 |
|
1155
|
36 |
New code and modifications done at SWING Research Group [1]:
|
1152
|
37 |
|
877
|
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 |
|
1155
|
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
|
1152
|
51 |
as of 1.9.2010
|
877
|
52 |
|
|
53 |
"
|
|
54 |
! !
|
752
|
55 |
|
758
|
56 |
!JavaRefMock methodsFor:'accessing'!
|
|
57 |
|
|
58 |
name
|
|
59 |
"superclass JavaRef2 says that I am responsible to implement this method"
|
|
60 |
|
|
61 |
^ 'mock name'
|
|
62 |
|
|
63 |
"Modified: / 08-04-2011 / 16:15:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
|
64 |
! !
|
|
65 |
|
752
|
66 |
!JavaRefMock methodsFor:'comparing'!
|
|
67 |
|
|
68 |
= anotherJavaRef
|
|
69 |
"superclass JavaRef2 says that I am responsible to implement this method"
|
|
70 |
|
|
71 |
^ self shouldImplement
|
|
72 |
!
|
|
73 |
|
|
74 |
hash
|
|
75 |
"superclass JavaRef2 says that I am responsible to implement this method"
|
|
76 |
|
|
77 |
^ self shouldImplement
|
|
78 |
! !
|
|
79 |
|
|
80 |
!JavaRefMock methodsFor:'private - resolving'!
|
|
81 |
|
|
82 |
findResolvedValue
|
|
83 |
"Resolve reference and set valueCache and isResolved."
|
|
84 |
|
|
85 |
valueCache := 'ok'.
|
758
|
86 |
|
|
87 |
"Modified: / 08-04-2011 / 17:39:50 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
|
88 |
! !
|
|
89 |
|
|
90 |
!JavaRefMock methodsFor:'resolving'!
|
752
|
91 |
|
758
|
92 |
invalidateForClass: internalJavaClassName
|
|
93 |
"Invalidate (means call invalidate) reference if it has something to do with given class (e.g Class named internalJavaClassName was unloaded).
|
|
94 |
Return true, if reference was invalidated."
|
|
95 |
|
|
96 |
internalJavaClassName = 'mock' ifTrue: [self invalidate. ^ true] ifFalse: [^ false].
|
|
97 |
|
|
98 |
"Modified: / 08-04-2011 / 16:16:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
|
752
|
99 |
! !
|
|
100 |
|
|
101 |
!JavaRefMock class methodsFor:'documentation'!
|
|
102 |
|
|
103 |
version_SVN
|
|
104 |
^ '$Id$'
|
|
105 |
! !
|