JavaRefMock.st
branchdevelopment
changeset 2578 fc6186a4961f
parent 2429 ebece4dcaab9
child 2711 a00302fe5083
equal deleted inserted replaced
2577:20f1eddba58b 2578:fc6186a4961f
    51      as of 1.9.2010
    51      as of 1.9.2010
    52 
    52 
    53 "
    53 "
    54 ! !
    54 ! !
    55 
    55 
    56 
       
    57 !JavaRefMock methodsFor:'accessing'!
    56 !JavaRefMock methodsFor:'accessing'!
    58 
    57 
    59 name
    58 name
    60     "superclass JavaRef2 says that I am responsible to implement this method"
    59     "superclass JavaRef2 says that I am responsible to implement this method"
    61     
    60     
    62     ^ 'mock name'
    61     ^ 'mock name'
    63 
    62 
    64     "Modified: / 08-04-2011 / 16:15:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    63     "Modified: / 08-04-2011 / 16:15:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    65 ! !
    64 ! !
    66 
       
    67 
    65 
    68 !JavaRefMock methodsFor:'comparing'!
    66 !JavaRefMock methodsFor:'comparing'!
    69 
    67 
    70 = anotherJavaRef
    68 = anotherJavaRef
    71     "superclass JavaRef2 says that I am responsible to implement this method"
    69     "superclass JavaRef2 says that I am responsible to implement this method"
    77     "superclass JavaRef2 says that I am responsible to implement this method"
    75     "superclass JavaRef2 says that I am responsible to implement this method"
    78 
    76 
    79     ^ self shouldImplement
    77     ^ self shouldImplement
    80 ! !
    78 ! !
    81 
    79 
    82 
       
    83 !JavaRefMock methodsFor:'private - resolving'!
    80 !JavaRefMock methodsFor:'private - resolving'!
    84 
    81 
    85 findResolvedValue
    82 findResolvedValue
    86     "Resolve reference and set valueCache and isResolved."
    83     "Resolve reference and set valueCache and isResolved."
    87     
    84     
    88     valueCache := 'ok'.
    85     valueCache := 'ok'.
    89 
    86 
    90     "Modified: / 08-04-2011 / 17:39:50 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    87     "Modified: / 08-04-2011 / 17:39:50 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    91 ! !
    88 ! !
    92 
       
    93 
    89 
    94 !JavaRefMock methodsFor:'resolving'!
    90 !JavaRefMock methodsFor:'resolving'!
    95 
    91 
    96 invalidateForClass: internalJavaClassName 
    92 invalidateForClass: internalJavaClassName 
    97     "Invalidate (means call invalidate) reference if it has something to do with given class (e.g Class named internalJavaClassName was unloaded).
    93     "Invalidate (means call invalidate) reference if it has something to do with given class (e.g Class named internalJavaClassName was unloaded).
   100     internalJavaClassName = 'mock' ifTrue: [self invalidate. ^ true] ifFalse: [^ false].
    96     internalJavaClassName = 'mock' ifTrue: [self invalidate. ^ true] ifFalse: [^ false].
   101 
    97 
   102     "Modified: / 08-04-2011 / 16:16:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    98     "Modified: / 08-04-2011 / 16:16:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
   103 ! !
    99 ! !
   104 
   100 
   105 
       
   106 !JavaRefMock class methodsFor:'documentation'!
   101 !JavaRefMock class methodsFor:'documentation'!
   107 
   102 
   108 version_CVS
   103 version_CVS
   109     ^ '$Header: /cvs/stx/stx/libjava/JavaRefMock.st,v 1.3 2013-02-25 11:15:31 vrany Exp $'
   104     ^ '$Header: /cvs/stx/stx/libjava/JavaRefMock.st,v 1.3 2013/02/25 11:15:31 vrany Exp $'
   110 !
   105 !
   111 
   106 
   112 version_HG
   107 version_HG
   113 
   108 
   114     ^ '$Changeset: <not expanded> $'
   109     ^ '$Changeset: <not expanded> $'