|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--de.tuberlin.cs.cis.ocl.model.mofbridge.MofInstance
Describes an instance from the MOF-Model for OCL.
| Constructor Summary | |
MofInstance(ClassifierDescriptor type,
java.lang.Object object,
ConceptFactory oclMapper)
Constructs a primitive MOF-Instance. |
|
MofInstance(javax.jmi.reflect.RefObject refObject,
ConceptFactory oclMapper)
Constructs a non-primitive MOF-Instance. |
|
| Method Summary | |
InstanceDescriptor |
cast(ClassifierDescriptor mtd)
Casts the actual runtime type of this instance to the specified classifier. |
java.lang.String |
getName()
Returns the name of this instance. |
OclAnyInstance |
getPredefinedParent()
Defines the predefined parent of this instance. |
InstanceDescriptor |
getValue(TypedProperty attribute)
Returns the value of the specified attribute. |
InstanceDescriptor |
invoke(TypedProperty operation,
InstanceDescriptor[] args)
Invokes an operation on this instance with the arguments args. |
boolean |
isInstanceOf(ClassifierDescriptor type,
boolean considerSubtype)
Determines if this instance is an instance of the specified type. |
boolean |
isInState(java.lang.String state)
Determines if this instance is in state state. |
InstanceDescriptor[] |
navigate(TypedAssociation association,
Instance[] qualifiers)
Navigates an association of this instance with the specified qualifiers. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.tuberlin.cs.cis.ocl.model.eval.InstanceDescriptor |
equals |
| Constructor Detail |
public MofInstance(javax.jmi.reflect.RefObject refObject,
ConceptFactory oclMapper)
refObject - reflects the instance.
public MofInstance(ClassifierDescriptor type,
java.lang.Object object,
ConceptFactory oclMapper)
type - the primitve type of the instance.object - the jmi-representation of the instance.| Method Detail |
public InstanceDescriptor cast(ClassifierDescriptor mtd)
throws TypeCastException
InstanceDescriptor
cast in interface InstanceDescriptormtd - a supertype of this instance.
TypeCastException - if this instance cannot be casted to the
specified type.
public InstanceDescriptor getValue(TypedProperty attribute)
throws FeatureInvocationException,
UndefinedValueException
InstanceDescriptor
getValue in interface InstanceDescriptorattribute - an attribute of this instance.
UndefinedValueException - if the value of the attribute is undefined.
FeatureInvocationException - if an exception occurs while resolving
the value of the attribute.
public InstanceDescriptor invoke(TypedProperty operation,
InstanceDescriptor[] args)
throws FeatureInvocationException,
UndefinedValueException
InstanceDescriptor
invoke in interface InstanceDescriptoroperation - an operation defined through this instance's static type.args - arguments that conform to the parameters of operation.
UndefinedValueException - if the result of the invokation is undefined
(for example null).
FeatureInvocationException - if an exception occurs while invoking
the operation.public boolean isInState(java.lang.String state)
InstanceDescriptor
isInState in interface InstanceDescriptorstate - a state described according to the OCL-Standard.
true if this instance is in state state.ClassifierDescriptor.isStateDefined(java.lang.String)
public InstanceDescriptor[] navigate(TypedAssociation association,
Instance[] qualifiers)
throws FeatureInvocationException
InstanceDescriptor
navigate in interface InstanceDescriptorassociation - an association declared by the instance's classifier.qualifiers - association qualifiers.
FeatureInvocationException - if an exception occurs while navigating
the association.public OclAnyInstance getPredefinedParent()
InstanceDescriptor
getPredefinedParent in interface InstanceDescriptornull if
the default parent should be used.public java.lang.String getName()
InstanceDescriptor
getName in interface InstanceDescriptorpublic java.lang.String toString()
toString in class java.lang.Object
public boolean isInstanceOf(ClassifierDescriptor type,
boolean considerSubtype)
InstanceDescriptortrue) one of
its subtypes. The result is then used to define the operations
OclAny.oclIsKindOf(OclType) and OclAny.isTypeOf(OclType).
isInstanceOf in interface InstanceDescriptortype - a model classifierconsiderSubtype - determines if subtypes should also be considered.
true if this instance is a subtype of the specified
type, false otherwise.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||