|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.tuberlin.cs.cis.ocl.eval.instance.PredefinedInstance | +--de.tuberlin.cs.cis.ocl.eval.instance.OclAnyInstance | +--de.tuberlin.cs.cis.ocl.eval.instance.ModelInstance
Represents instances of OCL model types.
Constructor Summary | |
ModelInstance(CollectionInstance alternativeCollection)
Constructs a model element navigated through a navigation with multiplity zero. |
|
ModelInstance(ModelType modelType,
InstanceDescriptor mid)
Constructs a model instance. |
|
ModelInstance(ModelType modelType,
InstanceDescriptor mid,
CollectionInstance alternativeCollection)
Constructs a navigated model instance. |
Method Summary | |
boolean |
equals(java.lang.Object o)
|
CollectionInstance |
getAlternativeCollection()
Returns the alternative single-membered collection of this instance that can occur if this instance is navigated over an association with multiplicity one or zero. |
InstanceDescriptor |
getDescriptor()
Return the descriptor of this instance. |
Instance |
getValue(Property attribute)
Returns the value of an attribut of this instance. |
Instance |
invoke(Property operation,
Instance[] args)
Invokes an operation on this instance. |
Instance |
navigate(Property assoc,
Instance[] qs)
Navigates an association of this instance. |
java.lang.String |
toString()
|
Methods inherited from class de.tuberlin.cs.cis.ocl.eval.instance.OclAnyInstance |
eq, neq, oclAsType, oclInState, oclIsKindOf, oclIsNew, oclIsTypeOf |
Methods inherited from class de.tuberlin.cs.cis.ocl.eval.instance.PredefinedInstance |
getRepresentation, getRuntimeType, hashCode |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ModelInstance(ModelType modelType, InstanceDescriptor mid)
modelType
- the runtime type of this model instancemid
- descriptor describing the state and behavior of
this instancepublic ModelInstance(ModelType modelType, InstanceDescriptor mid, CollectionInstance alternativeCollection)
modelType
- the runtime type of this model instancemid
- descriptor describing the state and behavior of
this instancepublic ModelInstance(CollectionInstance alternativeCollection)
alternativeCollection
- Method Detail |
public java.lang.String toString()
toString
in class PredefinedInstance
public Instance getValue(Property attribute)
Instance
getValue
in interface Instance
getValue
in class PredefinedInstance
attribute
- the attribute to access
public Instance invoke(Property operation, Instance[] args)
Instance
invoke
in interface Instance
invoke
in class PredefinedInstance
operation
- the operation to invokeargs
- the arguments the operation is called with
public Instance navigate(Property assoc, Instance[] qs)
Instance
navigate
in interface Instance
navigate
in class PredefinedInstance
assoc
- the association to navigateqs
- the evaluated denotation the navigation is
qualified with.
public CollectionInstance getAlternativeCollection()
null
if this instance has not been navigated.public InstanceDescriptor getDescriptor()
public boolean equals(java.lang.Object o)
equals
in class OclAnyInstance
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |