Interface IDatatype

All Superinterfaces:
IDatatypeVisitable
All Known Implementing Classes:
AnyType, BasisDatatype, BooleanType, Compound, ConstraintType, Container, CustomDatatype, DelegatingType, DerivedDatatype, Enum, FreezeVariableType, IntegerType, MetaType, OrderedEnum, ProjectType, RealType, Reference, Sequence, Set, StringType, StructuredDatatype, VersionType, VoidType

public interface IDatatype extends IDatatypeVisitable
Abstract class, implements some methods for all existing data types. Note that a datatype may be generic, i.e. parameterized (see getGenericType(int). Important: Please do not use reference equality or the equals method for testing equality of datatypes. Use isAssignableFrom(IDatatype) instead.
Author:
heiko beck, Holger Eichelberger
  • Method Details

    • getName

      String getName()
      Method to get the name of the Datatype.
      Returns:
      name of the Datatype
    • getNameSpace

      String getNameSpace()
      Returns the namespace of this datatype.
      Returns:
      Namespace of this datatype.
    • getQualifiedName

      String getQualifiedName()
      Returns the qualified name of this element.
      Returns:
      the qualified name
    • getUniqueName

      String getUniqueName()
      Returns the unique name of this element.
      Returns:
      the unique name
    • getOperation

      Operation getOperation(int index)
      Returns the operation specified by index.
      Parameters:
      index - a 0-based index specifying the operation to be returned
      Returns:
      the operation
      Throws:
      IndexOutOfBoundsException - if index<0 || index>=getOperationCount()
    • getOperationCount

      int getOperationCount()
      Returns the number of operations.
      Returns:
      the number of operations
    • isAssignableFrom

      boolean isAssignableFrom(IDatatype type)
      Determines if the data type represented by this object is either the same as, or is a supertype of type.
      Parameters:
      type - the type being checked
      Returns:
      true if this type is either the same or a supertype of type, false else
    • getTypeClass

      Class<? extends IDatatype> getTypeClass()
      Returns the java class realizing the type.
      Returns:
      the java class realizing the type
    • getType

      IDatatype getType()
      Returns the object realizing the type.
      Returns:
      the object realizing the type
    • getGenericType

      IDatatype getGenericType(int index)
      Returns the specified generic type.
      Parameters:
      index - the index of the type
      Returns:
      the specified generic type
      Throws:
      IndexOutOfBoundsException - if index<0 || index>=getGenericTypeCount()
    • getGenericTypeCount

      int getGenericTypeCount()
      Returns the number of generic types.
      Returns:
      the number of generic types
    • isPseudoType

      boolean isPseudoType()
      Returns whether this type is a pseudo type. This operation shall be used to prevent the output of internal types to the user.
      Returns:
      true if it is a pseudo type, false else
    • isPrimitive

      boolean isPrimitive()
      Returns whether this type is a primitive type.
      Returns:
      true if it is a primitive type, false else