|
|||||||||||
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
OCL 1.5 defines a classifier and an instance-level (refer 6.5.11 Features on Classes Themselves). All types defined in a model, or predefined whithin OCL, have a type. An instance of this class represents an general instance of such a type for type checking purposes. For more information about properties of types refer to chapter 6.8 Predefined OCL Types of the OCL 1.5 Standard. Note: The class Type should not be further extended, without a descent investigation of side effects. The current known subtypes are: Classifier, ExpressionType and ModelType. Expressed in UML-Notation the gerneralization is expected to be complete.
Field Summary | |
static Type |
ABoolean
An arbitrary instance of the predefined Type Boolean |
static Type |
AnEnumeration
An arbitrary instance of the predefined Type Enumeration |
static Type |
AnInteger
An arbitrary instance of the predefined Type Integer |
static Type |
AnOclAny
An arbitrary instance of the predefined Type OclAny |
static Type |
AnOclState
An arbitrary instance of the predefined Type OclState |
static Type |
AReal
An arbitrary instance of the predefined Type Real |
static Type |
AString
An arbitrary instance of the predefined Type String |
Method Summary | |
static Type |
ABag(Type elemType)
An arbitrary instance of the predefined type Bag(T), where T is a type or an instance of a type that parameterizes the collection as defined in OCL 1.5 (6.8.2.1). |
static Type |
ACollection(Type elemType)
An arbitrary instance of the predefined type Collection(T), where T is a type or an instance of a type that parameterizes the collection as defined in OCL 1.5 (6.8.2.1). |
static Type |
ASequence(Type elemType)
An arbitrary instance of the predefined type Sequence(T), where T is a type or an instance of a type that parameterizes the collection as defined in OCL 1.5 (6.8.2.1). |
static Type |
ASet(Type elemType)
An arbitrary instance of the predefined type Set(T), where T is a type or an instance of a type that parameterizes the collection as defined in OCL 1.5 (6.8.2.1). |
boolean |
conforms(Type type)
A general instance of a type conforms to another general instance if its type conforms to the type of the other general instance. |
boolean |
equals(java.lang.Object object)
|
Classifier |
getClassifier()
Returns the classifier of this type. |
static Type |
getCollectionOfType(Type type,
Type elemType)
Returns a general instance of/or a collection type with the specified element type. |
Type |
getElementType()
Returns the parameter of a collection. |
Property |
getOperation(java.lang.String name,
Type[] params)
Resolves a operation on this type. |
Property |
getStructuralFeature(java.lang.String name,
Type[] qualifiers)
Resolves a structural feature on this type (e.g. an attribute or an association). |
boolean |
isClassifier()
Provides the information if this instance is a classifier. |
boolean |
isCollectionType()
Tests if this is an general instance of a predefined collection type (i.e. |
boolean |
isDescribedBy(ClassifierDescriptor descriptor)
Tests if this instance's type is described by the specified model type descriptor. |
boolean |
isEnumerationType()
Tests if this type is an enumeration type. |
boolean |
isExpressionType()
Tests if this type is derived from the OclExpression-type. |
boolean |
isInstanceOf(Classifier type)
Tests if this is an instance of the specified type. |
boolean |
isModelType()
Tests if this type is a model type. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static Type ABoolean
public static Type AReal
public static Type AnInteger
public static Type AString
public static Type AnOclState
public static Type AnEnumeration
public static Type AnOclAny
Method Detail |
public static Type ACollection(Type elemType)
public static Type ASet(Type elemType)
public static Type ABag(Type elemType)
public static Type ASequence(Type elemType)
public static Type getCollectionOfType(Type type, Type elemType)
type
- an arbitrary type, where type.isCollectionType() == trueelemType
- an arbitrary type, not equal null. The type is used
as the new element type of the returned collection.
public Property getOperation(java.lang.String name, Type[] params) throws UndefinedFeatureException
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.public Property getStructuralFeature(java.lang.String name, Type[] qualifiers) throws UndefinedFeatureException
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.public boolean conforms(Type type)
type
- an arbitrary instance or type not equal null.
true
if this type conforms to the
parameter.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean isCollectionType()
true
if this is an collection type,
false
otherwise.public Type getElementType()
null
otherwise.public boolean isExpressionType()
true
if this type-instance is derived
from an expression type, false
otherwise.public boolean isModelType()
true
if this type is derived
from a model type, false
otherwise.public boolean isClassifier()
true
if this instance is a classifier,
false
otherwise.public boolean isEnumerationType()
true
if this is an enumeration type,
false
otherwise.public boolean isInstanceOf(Classifier type)
type
- an arbitrary instance of OclType.
true
if this is an instance of the
parameter, false
otherwise.public Classifier getClassifier()
public boolean isDescribedBy(ClassifierDescriptor descriptor)
true
if this instance's type is
described by the specified model type descriptor,
otherwise false
.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |