de.interactive_instruments.ShapeChange.Ocl
Class OclNode.DataType

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Ocl.OclNode.DataType
Enclosing class:
OclNode

public static class OclNode.DataType
extends Object

All OclNodes own a DataType, which is either built-in, or from the UML model in the context, or both.


Field Summary
 OclNode.BuiltInType builtInType
           
 String name
           
 ClassInfo umlClass
           
 
Constructor Summary
OclNode.DataType(ClassInfo ci)
          Initialize a DataType from a given UML class represented by a ClassInfo object.
OclNode.DataType(OclNode.BuiltInType bit)
          Initialize a DataType from an explicit BultInType enum value.
OclNode.DataType(String name)
          Initialize a DataType from its name alone.
 
Method Summary
 OclNode.DataType commonSuperType(OclNode.DataType type)
          Determine common supertype of this type and the one given.
 boolean isBuiltIn()
          Find out if this DataType object represents an OCL built-in one, maybe pure or mapped from 19103.
 boolean isSubTypeOf(OclNode.DataType type)
          Determine whether this type is a subtype of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public String name

builtInType

public OclNode.BuiltInType builtInType

umlClass

public ClassInfo umlClass
Constructor Detail

OclNode.DataType

public OclNode.DataType(ClassInfo ci)

Initialize a DataType from a given UML class represented by a ClassInfo object.

The Ctor automatically finds out, if the class is one of those which are mapped to OCL built-in types or any derivatives thereof.

Parameters:
ci - ClassInfo object

OclNode.DataType

public OclNode.DataType(OclNode.BuiltInType bit)

Initialize a DataType from an explicit BultInType enum value. This method always represents a pure OCL type.

Parameters:
bit - BuiltInType enum value

OclNode.DataType

public OclNode.DataType(String name)

Initialize a DataType from its name alone. This may create a pure OCL type (if it belongs to the set of OCL Types), or may represent one of the well-known 19103 types mapped to OCL, or may represent some UML class from which we only know the name.

Parameters:
name - String Name of the type
Method Detail

isBuiltIn

public boolean isBuiltIn()
Find out if this DataType object represents an OCL built-in one, maybe pure or mapped from 19103.

Returns:
is this a built-in type?

isSubTypeOf

public boolean isSubTypeOf(OclNode.DataType type)
Determine whether this type is a subtype of the given type.

Parameters:
type - Type to be analyzed as indicated
Returns:
Is this type a subtype of the given one?

commonSuperType

public OclNode.DataType commonSuperType(OclNode.DataType type)
Determine common supertype of this type and the one given. If no such type can be determined null is returned.

Parameters:
type - Type to be analyzed as indicated
Returns:
Common supertype or null


Copyright © 2015. All rights reserved.