|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--de.tuberlin.cs.cis.ocl.example.eval.ExampleInstanceDesc
Describes an instance of types contained in the Example Class Diagram of OCL1.5 chapter 6.2.2. The Java Reflection API for description purposes.
| Constructor Summary | |
ExampleInstanceDesc(java.lang.Object representation)
|
|
| Method Summary | |
InstanceDescriptor |
cast(ClassifierDescriptor supertype)
Casts the actual runtime type of this instance to the specified classifier. |
boolean |
equals(java.lang.Object o)
Returns true if the specified instance is equal to
this instance. |
java.lang.String |
getName()
Returns the name of this instance. |
OclAnyInstance |
getPredefinedParent()
Defines the predefined parent of this instance. |
java.lang.Object |
getRepresentation()
Returns this descriptor's Java representation. |
ClassifierDescriptor |
getType()
|
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 |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ExampleInstanceDesc(java.lang.Object representation)
| Method Detail |
public InstanceDescriptor cast(ClassifierDescriptor supertype)
throws TypeCastException
InstanceDescriptor
cast in interface InstanceDescriptorsupertype - a supertype of this instance.
TypeCastException - if this instance cannot be casted to the
specified type.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 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 InstanceDescriptor[] navigate(TypedAssociation association,
Instance[] qualifiers)
throws FeatureInvocationException,
UndefinedValueException
InstanceDescriptor
navigate in interface InstanceDescriptorassociation - an association declared by the instance's classifier.qualifiers - association qualifiers.
UndefinedValueException - if the result of the naviagtion is undefined
(for example null).
FeatureInvocationException - if an exception occurs while navigating
the association.public java.lang.Object getRepresentation()
public boolean equals(java.lang.Object o)
InstanceDescriptortrue if the specified instance is equal to
this instance. The result is used to implement the operations
OclAny.= and OclAny.<>.
equals in interface InstanceDescriptorequals in class java.lang.Objecto - an instance (!= null)
true if the specified instance is equal to
this instance, false otherwise.public java.lang.String getName()
InstanceDescriptor
getName in interface InstanceDescriptorpublic java.lang.String toString()
toString in class java.lang.Objectpublic OclAnyInstance getPredefinedParent()
InstanceDescriptor
getPredefinedParent in interface InstanceDescriptornull if
the default parent should be used.public ClassifierDescriptor getType()
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 | ||||||||||