|
|||||||||||
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.check.StateModel
Implements an arbitrary model whose types uses a state machine as defined in OCL 1.5 - 6.5.10 Predefined properties on All Objects. The types of this model are featureless.
Constructor Summary | |
StateModel()
|
Method Summary | |
TypedAssociation |
getAssociation(java.lang.String assocName,
Type[] qualifiers)
Resolves and returns the specified association qualifiable by the specified qualifier parameters on this type. |
TypedProperty |
getAttribute(java.lang.String attrName,
boolean classScoped)
Resolves and returns the specified attribute on this type. |
ClassifierDescriptor |
getClassifier(java.lang.String qualifiedName)
Returns the type described by its name (primarily through its qualified name). |
java.lang.String |
getName()
Returns the name of the type. |
Classifier |
getOclSupertype()
Returns the predefined OCL 1.5 supertype of this type. |
TypedProperty |
getOperation(java.lang.String operationName,
ClassifierDescriptor[] params,
boolean classScoped)
Resolves and returns the specified operation on this type. |
boolean |
isStateDefined(java.lang.String state)
Returns true if the specified state is defined on
the statemachine attached to this type. |
boolean |
isSubtypeOf(ClassifierDescriptor modelType)
Returns true if this type is a subtype of the
specified type. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.tuberlin.cs.cis.ocl.model.check.ClassifierDescriptor |
equals |
Constructor Detail |
public StateModel()
Method Detail |
public ClassifierDescriptor getClassifier(java.lang.String qualifiedName) throws UndefinedTypeException
TypeFacade
getClassifier
in interface TypeFacade
qualifiedName
- The name of the model type to resolve. Namespaces of qualified names
are seperated through '::'. A utility class to transform qualified names into
java.util.List
s or to change the seperator (to be specific '.')
is provided QualifiedName
.
UndefinedTypeException
- if the type is undefined in the model.public TypedProperty getAttribute(java.lang.String attrName, boolean classScoped) throws UndefinedFeatureException
ClassifierDescriptor
getAttribute
in interface ClassifierDescriptor
attrName
- the name of the attributeclassScoped
- true
if the attribute is called
on the classifier itself.
UndefinedFeatureException
- if the attribute is not defined
on this type.public java.lang.String getName()
ClassifierDescriptor
getName
in interface ClassifierDescriptor
public Classifier getOclSupertype()
ClassifierDescriptor
getOclSupertype
in interface ClassifierDescriptor
public TypedProperty getOperation(java.lang.String operationName, ClassifierDescriptor[] params, boolean classScoped) throws UndefinedFeatureException
ClassifierDescriptor
getOperation
in interface ClassifierDescriptor
operationName
- the name of the operation.params
- the parameters of the operation.classScoped
- true
if the operation is
called on the classifier itself.
UndefinedFeatureException
- if the operation could
not be resolved on this type.public boolean isStateDefined(java.lang.String state)
ClassifierDescriptor
true
if the specified state is defined on
the statemachine attached to this type. The state will be used
for the predefined Operation oclInState(OclState). The argument
state will be represented as a String
. The form
of the String is described in the Standard itself.
isStateDefined
in interface ClassifierDescriptor
state
- a state of this type's statemachine.
true
if this type has at least one
statemachine attached to itself which defines the specified
state, false
otherwise.public boolean isSubtypeOf(ClassifierDescriptor modelType)
ClassifierDescriptor
true
if this type is a subtype of the
specified type. This relation will be used to build up a
type conformance hierarchy within OCL, which will be used in
either the type check (for example in oclAsType(OclType))
- and evaluation process (for example in oclIsKindOf(OclType)).
isSubtypeOf
in interface ClassifierDescriptor
modelType
- a possible supertype of the model.
true
if this type is a suptype of
the specified type, otherwise false
.public TypedAssociation getAssociation(java.lang.String assocName, Type[] qualifiers) throws UndefinedFeatureException
ClassifierDescriptor
getAssociation
in interface ClassifierDescriptor
assocName
- the role-name of the association/navigation.
UndefinedFeatureException
ModelType.isDescribedBy(ClassifierDescriptor)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |