|
|||||||||||
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.ExampleEnumDesc
An ExampleEnumDesc
describes the enumeration type of
the enumerations in the OCL 1.5 example model (i.e. Sex).
Field Summary | |
static ExampleEnumDesc |
SEX
The Sex enumeration type |
Constructor Summary | |
ExampleEnumDesc(java.lang.String qualifier)
Constructs an enumeration type in the example model. |
Method Summary | |
TypedAssociation |
getAssociation(java.lang.String roleName,
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. |
java.lang.String[] |
getLabels()
Returns the labels of the enumeration type. |
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 type)
Returns true if this type is a subtype of the
specified type. |
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.check.ClassifierDescriptor |
equals |
Field Detail |
public static final ExampleEnumDesc SEX
Constructor Detail |
public ExampleEnumDesc(java.lang.String qualifier)
qualifier
- the qualified name of the enumeration type.Method Detail |
public java.lang.String getName()
ClassifierDescriptor
getName
in interface ClassifierDescriptor
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String[] getLabels()
EnumerationTypeDescriptor
getLabels
in interface EnumerationTypeDescriptor
public boolean isSubtypeOf(ClassifierDescriptor type)
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
type
- 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 roleName, Type[] qualifiers) throws UndefinedFeatureException
ClassifierDescriptor
getAssociation
in interface ClassifierDescriptor
roleName
- the role-name of the association/navigation.
UndefinedFeatureException
ModelType.isDescribedBy(ClassifierDescriptor)
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 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.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |