|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.tuberlin.cs.cis.ocl.type.Type | +--de.tuberlin.cs.cis.ocl.type.ModelType
OCL 1.5 paragraph 6.4.1 Types from the (UML) Model:
Each OCL expression is written in the context of a (UML) Model, a number of
classifiers ..., their features ans associations, and their generalizations.
All classifiers from the (UML) model are types in the OCL expressions that
are attached to the model. These types are expressed through this class.
Each instance of a ModelType
therefore represents an instance
of a model's classifier.
Field Summary |
Fields inherited from class de.tuberlin.cs.cis.ocl.type.Type |
ABoolean, AnEnumeration, AnInteger, AnOclAny, AnOclState, AReal, AString |
Constructor Summary | |
ModelType(ClassifierDescriptor descriptor)
Constructs a model type, whose behavior is defined via a ClassifierDescriptor . |
Method Summary | |
boolean |
conforms(Type type)
Uses the contract inherited from Type. |
boolean |
definesState(java.lang.String state)
Tests if this model type defines the specified state. |
boolean |
equals(java.lang.Object o)
|
Type |
getAlternativeCollectionType()
If this model type has been navigated (isNavigated() == true) over an association with multiplicity zero or one, this method returns the alternative collection type that can be used instead of this model type (for more information refer OCL1.5 6.5.4.2 Navigation over Associations with Multiplicity Zero or One). |
ClassifierDescriptor |
getDescriptor()
Returns the descriptor of this model type. |
Property |
getOperation(java.lang.String name,
Type[] params)
Uses the contract inherited from Type . |
Property |
getOperation(java.lang.String name,
Type[] params,
boolean classScoped)
Uses the contract from getOperation(String, Type[]) on either the instance-level of a model type or on its classifier-level. |
Type |
getPredefinedSupertype()
|
Property |
getStructuralFeature(java.lang.String name,
Type[] qualifiers)
Uses the contract inherited from Type . |
Property |
getStructuralFeature(java.lang.String name,
Type[] qualifiers,
boolean classScoped)
Uses the contract from getStructuralFeature(String, Type[]) on either the instance-level of a model type or on its classifier-level. |
boolean |
isDescribedBy(ClassifierDescriptor descriptor)
Tests if this model type is described by the specified ClassifierDescriptor . |
boolean |
isModelType()
uses the inherited contract from Type . |
boolean |
isNavigated()
Provides the information whether this model type has been addressed in an ocl expression via an navigation. |
java.lang.String |
toString()
|
Methods inherited from class de.tuberlin.cs.cis.ocl.type.Type |
ABag, ACollection, ASequence, ASet, getClassifier, getCollectionOfType, getElementType, isClassifier, isCollectionType, isEnumerationType, isExpressionType, isInstanceOf |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ModelType(ClassifierDescriptor descriptor)
ClassifierDescriptor
.
descriptor
- the description of the model type (and
its behaviour) this instance should represent.ClassifierDescriptor
Method Detail |
public boolean conforms(Type type)
conforms
in class Type
type
- an arbitrary instance or type not equal null.
true
if this type conforms to the
parameter.Type.conforms(Type)
public Property getOperation(java.lang.String name, Type[] params) throws UndefinedFeatureException
Type
.
getOperation
in class Type
name
- the name of the operationparams
- the instance-types of the operation's parameters. If no
parameters are defined the parameter can be null.
UndefinedFeatureException
- thrown if the operation is not
defined on the specified type.Type.getOperation(java.lang.String, Type[])
public Property getStructuralFeature(java.lang.String name, Type[] qualifiers) throws UndefinedFeatureException
Type
.
getStructuralFeature
in class Type
name
- the name of the featurequalifiers
- the qualifiers of an association. If qualifiers
are not defined this parameter can be null.
UndefinedFeatureException
- thrown if this type does not
define the searched feature.Type.getStructuralFeature(java.lang.String, Type[])
public Property getOperation(java.lang.String name, Type[] params, boolean classScoped) throws UndefinedFeatureException
classScoped
- if the operation is class scoped or not.
UndefinedFeatureException
Type.getOperation(java.lang.String, Type[])
public Property getStructuralFeature(java.lang.String name, Type[] qualifiers, boolean classScoped) throws UndefinedFeatureException
classScoped
- if the stuctural feature is class scoped or not.
UndefinedFeatureException
Type.getStructuralFeature(java.lang.String, Type[])
public boolean isModelType()
Type
.
isModelType
in class Type
true
Type.isModelType()
public Type getPredefinedSupertype()
public boolean isNavigated()
true
if this type has been addressed
via an naviation, false
otherwise.public Type getAlternativeCollectionType()
null
otherwise.isNavigated()
public boolean definesState(java.lang.String state)
state
- a state specified through the qualified name
as defined in (6.5.10 Predefined properties on All Objects)
true
if the state is defined for this
type in the model, false
otherwise.public boolean isDescribedBy(ClassifierDescriptor descriptor)
ClassifierDescriptor
.
isDescribedBy
in class Type
descriptor
- an arbitrary ClassifierDescriptor
,
not equal null.
true
if the state is defined for this
type in the model, false
otherwise.ClassifierDescriptor
,
ClassifierDescriptor.equals(java.lang.Object)
public boolean equals(java.lang.Object o)
equals
in class Type
Object.equals(Object)
public java.lang.String toString()
toString
in class Type
Object.toString()
public ClassifierDescriptor getDescriptor()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |