tudresden.ocl.injection.ocl.lib
Class Invariant
java.lang.Object
tudresden.ocl.injection.ocl.lib.Invariant
- All Implemented Interfaces:
- FeatureListener, Serializable
- public final class Invariant
- extends Object
- implements FeatureListener, Serializable
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
private String name
object
private Object object
allInvariants
public static HashSet allInvariants
OBSERVER_SUFFIX
public static final String OBSERVER_SUFFIX
- See Also:
- Constant Field Values
INVARIANT_METHOD
public static final String INVARIANT_METHOD
- See Also:
- Constant Field Values
INVARIANT_OBJECT
public static final String INVARIANT_OBJECT
- See Also:
- Constant Field Values
method
private transient Method method
vacantInvariants
private static HashSet vacantInvariants
CHECKING_FLAG
public static final String CHECKING_FLAG
- See Also:
- Constant Field Values
checking_flag
public static boolean checking_flag
CHECKING_OPERATION
public static final String CHECKING_OPERATION
- See Also:
- Constant Field Values
NOTIFY_OBSERVING_INVARIANTS
public static final String NOTIFY_OBSERVING_INVARIANTS
- See Also:
- Constant Field Values
Invariant
public Invariant(String name,
Object object)
addObserver
private final void addObserver(String featurename,
Object o)
onField
public final void onField(Field f,
Object o)
- Description copied from interface:
FeatureListener
- Is called, when the ocl library accesses an attribute
of an application object.
- Specified by:
onField
in interface FeatureListener
- See Also:
OclAnyImpl.getFeature(String)
,
OclAnyImpl.getFeatureQualified(String,Object)
,
OclAnyImpl.getFeatureAsSequence(String)
onMethod
public final void onMethod(Method m,
Object o)
- Description copied from interface:
FeatureListener
- Is called, when the ocl library accesses a method
of an application object.
Note, that the ocl library should access query methods
(side effect free methods) only, but this is not
enforced in any way.
- Specified by:
onMethod
in interface FeatureListener
- See Also:
OclAnyImpl.getFeature(String,Object[])
invoke
public final void invoke()
checkVacantInvariants
public static final void checkVacantInvariants()
notifyObservingInvariants
public static final void notifyObservingInvariants(HashSet observers)
- Notifies the invariants observing an attribute, that
the attribute has changed.
There is no notify method in class Invariant,
instead the observing invariants are included into a set
of vacant invariants.
After notifying, the observer set is cleared.
Next time, the invariant runs, the observers are registered again.
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.