|
|||||||||||
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.Classifier
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 within OCL, have a type.
This type is an instance of the OCL Type called OclType, which is represented through
this class. An instance of Classifier
therefore represents a type itself.
Refer for more detail chapter 6.8 Predefined OclTypes especially paragraph
6.8.1.1 OclType.
Field Summary | |
static Classifier |
Boolean
The predefined type Boolean as defined in OCL 1.5 (6.8.1.10) |
static Classifier |
Enumeration
The predefined type Enumeration as defined in OCL 1.5 (6.8.1.11) |
static Classifier |
Integer
The predefined type Integer as defined in OCL 1.5 (6.8.1.8) |
static Classifier |
OclAny
The predefined type OclAny as defined in OCL 1.5 (6.8.1.2) |
static Classifier |
OclState
The predefined type OclState as defined in OCL 1.5 (6.8.1.5) |
static Classifier |
OclType
The metatype OclType as defined in OCL 1.5 (6.8.1.1) |
static Classifier |
Real
The predefined type Real as defined in OCL 1.5 (6.8.1.7) |
static Classifier |
String
The predefined type String as defined in OCL 1.5 (6.8.1.9) |
Fields inherited from class de.tuberlin.cs.cis.ocl.type.Type |
ABoolean, AnEnumeration, AnInteger, AnOclAny, AnOclState, AReal, AString |
Method Summary | |
static Classifier |
Bag(Classifier T)
The predefined type Bag(T), where T is a type that parameterizes the bag as defined in OCL 1.5 (6.8.2.3). |
static Classifier |
Collection(Classifier T)
The predefined type Collection(T), where T is a type that parameterizes the collection as defined in OCL 1.5 (6.8.2.1). |
boolean |
conforms(Type t)
Test if this type conforms to the parameter. |
Classifier |
getClassifier()
Returns the classifier of this type. |
Type |
getElementType()
Returns the Type a collection is parameterized with. |
Type |
getInstanceType()
Since OCL 1.5 is a declarative language a type specified exaclty one type. |
Property |
getOperation(java.lang.String name,
Type[] params)
Resolves a operation on this classifier. |
Property |
getStructuralFeature(java.lang.String name,
Type[] qualifiers)
Resolves a structural feature on this classifier (e.g. an attribute or an association). |
boolean |
isClassifier()
Provides the information that this type is a classifier. |
boolean |
isCollectionType()
Tests if this is a collection type (e.g. |
boolean |
isInstanceOf(Classifier type)
Tests if this is an instance of the specified type. |
static Classifier |
OclType(Type type)
Constructs an OclType with a specified instance-type. |
static Classifier |
Sequence(Classifier T)
The predefined type Sequence(T), where T is a type that parameterizes the sequence as defined in OCL 1.5 (6.8.2.4). |
static Classifier |
Set(Classifier T)
The predefined type Set(T), where T is a type that parameterizes the set as defined in OCL 1.5 (6.8.2.2). |
java.lang.String |
toString()
|
Methods inherited from class de.tuberlin.cs.cis.ocl.type.Type |
ABag, ACollection, ASequence, ASet, equals, getCollectionOfType, isDescribedBy, isEnumerationType, isExpressionType, isModelType |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static Classifier OclType
public static Classifier OclAny
public static Classifier OclState
public static Classifier Real
public static Classifier Integer
public static Classifier String
public static Classifier Boolean
public static Classifier Enumeration
Method Detail |
public static Classifier Collection(Classifier T)
T
- The element type of the parameterized collection:public static Classifier Set(Classifier T)
T
- The element type of the parameterized set:public static Classifier Bag(Classifier T)
T
- The element type of the parameterized bag:public static Classifier Sequence(Classifier T)
T
- The element type of the parameterized sequence:public static Classifier OclType(Type type)
type
- an instance described through its type.
public Type getInstanceType()
public boolean isClassifier()
isClassifier
in class Type
true
public boolean isInstanceOf(Classifier type)
Classifier
are instances of
OclType, except OclType itself.
isInstanceOf
in class Type
type
- an arbitrary instance of OclType.
true
if this is an instance of the
parameter, false
otherwise.public boolean isCollectionType()
isCollectionType
in class Type
true
if this is an collection classifier,
false
otherwise.public boolean conforms(Type t)
conforms
in class Type
t
- an arbitrary Type not equal to null.
true
if t is a supertype of this type,
false
otherwise.public Classifier getClassifier()
getClassifier
in class Type
public Type getElementType()
getElementType
in class Type
null
otherwise.public Property getOperation(java.lang.String name, Type[] params) throws UndefinedFeatureException
getOperation
in class Type
name
- the name of the operationparams
- the instance-level types the parameters of the
operation have. 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
getStructuralFeature
in class Type
name
- the name of the featurequalifiers
- the qualifiers of an association. If not defined
this parameter can be null.
UndefinedFeatureException
- thrown if this type does not
define the searched feature.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 |