|
|||||||||||
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.ExpressionType
Each OCL expression itself is an object in the context of OCL. The type of
the type of the expression is OCLExpression. An instance of
ExpressionType
represents an instance of that type. Each
ExpressionType
is parameterized with an evaluation type
and or the included iterator and accumulator type. For more information
refer to OCL 1.5 6.8.1.6 OclExpression.
Note: Although not specified in the standard an OclExpression as implemented
in this class is regarded as conforment to its evaluation type.
Field Summary |
Fields inherited from class de.tuberlin.cs.cis.ocl.type.Type |
ABoolean, AnEnumeration, AnInteger, AnOclAny, AnOclState, AReal, AString |
Constructor Summary | |
ExpressionType(Type evaluationType)
Constructs an OclExpression type that evaluates to the specified evaluation type. |
|
ExpressionType(Type iteratorType,
Type evaluationType)
Constructs an OclExpression with an optional iterator. |
|
ExpressionType(Type iteratorType,
Type accumulatorType,
Type evaluationType)
Constructs an OclExpression with an optional iterator and accumulator type. |
Method Summary | |
boolean |
conforms(Type t)
Uses the inherited contract from Type . |
boolean |
equals(java.lang.Object o)
|
static Type |
evaluateType(Type type)
Evaluates the non expression type of a type. |
Type |
getAccumulatorType()
Returns the optional accumulator type of this OclExpression. |
Type |
getElementType()
uses the inherited contract from Type . |
Type |
getEvaluationType()
Returns the type this expression evaluates to. |
Type |
getIteratorType()
Returns the optional iterator type of this OclExpression. |
Property |
getOperation(java.lang.String name,
Type[] params)
Uses the contract inherited from Type . |
boolean |
isCollectionType()
uses the inherited contract from Type .
|
boolean |
isExpressionType()
uses the inherited contract from Type . |
boolean |
isModelType()
uses the inherited contract from Type .
|
java.lang.String |
toString()
|
Methods inherited from class de.tuberlin.cs.cis.ocl.type.Type |
ABag, ACollection, ASequence, ASet, getClassifier, getCollectionOfType, getStructuralFeature, isClassifier, isDescribedBy, isEnumerationType, isInstanceOf |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ExpressionType(Type evaluationType)
public ExpressionType(Type iteratorType, Type evaluationType)
evaluationType
- the evaluation type of the constructed
OclExpressioniteratorType
- the optional included iterator type of the
OclExpression.public ExpressionType(Type iteratorType, Type accumulatorType, Type evaluationType)
iteratorType
- the optional included iterator type of the
OclExpression.accumulatorType
- the optional included accumumulator type
of the OclExpression.evaluationType
- the evaluation type of the constructed
OclExpressionMethod Detail |
public static Type evaluateType(Type type)
type
- an arbitrary type, not equal null.
public Type getEvaluationType()
public boolean conforms(Type t)
Type
. Additionally
each OclExpression is regarded as conforment to its evaluation
type.
conforms
in class Type
t
- 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
. According
to the assumed conformance principle of an OclExpression to its
evaluation type, an operation is resolved not only on
OclExpression but rather on its evaluation 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 Type getIteratorType()
null
public Type getAccumulatorType()
null
public boolean equals(java.lang.Object o)
equals
in class Type
Object.equals(Object)
public boolean isExpressionType()
Type
.
isExpressionType
in class Type
true
Type.isExpressionType().
public boolean isModelType()
Type
.
An expression type is regarded as a model type, if its
evaluation type is a model type.
isModelType
in class Type
true
if this type is derived
from a model type, false
otherwise.Type.isModelType()
public boolean isCollectionType()
Type
.
An expression type is regarded as a collection type, if its
evaluation type is a collection type.
isCollectionType
in class Type
true
if this is an collection type,
false
otherwise.Type.isCollectionType()
public Type getElementType()
Type
.
getElementType
in class Type
Type.getElementType()
public java.lang.String toString()
toString
in class Type
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |