Class ProjectType

  • All Implemented Interfaces:
    IDatatype, IDatatypeVisitable

    public class ProjectType
    extends java.lang.Object
    implements IDatatype
    Implements a private datatype class which represents the (pseudo) type of a project. The (pseudo) type is intended as operand in custom operations.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • ProjectType

        ProjectType()
        Constructor for serialization.
      • ProjectType

        ProjectType​(Project project)
        Creates the type instance of this.
        Parameters:
        project - TODO
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: IDatatype
        Method to get the name of the Datatype.
        Specified by:
        getName in interface IDatatype
        Returns:
        name of the Datatype
      • getNameSpace

        public java.lang.String getNameSpace()
        Description copied from interface: IDatatype
        Returns the namespace of this datatype.
        Specified by:
        getNameSpace in interface IDatatype
        Returns:
        Namespace of this datatype.
      • getQualifiedName

        public java.lang.String getQualifiedName()
        Description copied from interface: IDatatype
        Returns the qualified name of this element.
        Specified by:
        getQualifiedName in interface IDatatype
        Returns:
        the qualified name
      • getUniqueName

        public java.lang.String getUniqueName()
        Description copied from interface: IDatatype
        Returns the unique name of this element.
        Specified by:
        getUniqueName in interface IDatatype
        Returns:
        the unique name
      • getOperation

        public CustomOperation getOperation​(int index)
        Description copied from interface: IDatatype
        Returns the operation specified by index.
        Specified by:
        getOperation in interface IDatatype
        Parameters:
        index - a 0-based index specifying the operation to be returned
        Returns:
        the operation
      • getOperationCount

        public int getOperationCount()
        Description copied from interface: IDatatype
        Returns the number of operations.
        Specified by:
        getOperationCount in interface IDatatype
        Returns:
        the number of operations
      • addOperation

        public void addOperation​(CustomOperation operation)
        Adds a custom operation.
        Parameters:
        operation - the operation to be added
      • removeOperation

        public boolean removeOperation​(CustomOperation operation)
        Removes a custom operation.
        Parameters:
        operation - the operation to be removed
        Returns:
        true if operation was removed, false else
      • isAssignableFrom

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

        public java.lang.Class<? extends IDatatype> getTypeClass()
        Description copied from interface: IDatatype
        Returns the java class realizing the type.
        Specified by:
        getTypeClass in interface IDatatype
        Returns:
        the java class realizing the type
      • getGenericType

        public IDatatype getGenericType​(int index)
        Description copied from interface: IDatatype
        Returns the specified generic type.
        Specified by:
        getGenericType in interface IDatatype
        Parameters:
        index - the index of the type
        Returns:
        the specified generic type
      • getGenericTypeCount

        public int getGenericTypeCount()
        Description copied from interface: IDatatype
        Returns the number of generic types.
        Specified by:
        getGenericTypeCount in interface IDatatype
        Returns:
        the number of generic types
      • accept

        public void accept​(IDatatypeVisitor visitor)
        Description copied from interface: IDatatypeVisitable
        Accepts a specialized visitor for creating a textual representation of the identity of this type.
        Specified by:
        accept in interface IDatatypeVisitable
        Parameters:
        visitor - the visitor to accept
      • isPseudoType

        public boolean isPseudoType()
        Description copied from interface: IDatatype
        Returns whether this type is a pseudo type. This operation shall be used to prevent the output of internal types to the user.
        Specified by:
        isPseudoType in interface IDatatype
        Returns:
        true if it is a pseudo type, false else
      • getType

        public IDatatype getType()
        Description copied from interface: IDatatype
        Returns the object realizing the type.
        Specified by:
        getType in interface IDatatype
        Returns:
        the object realizing the type
      • isPrimitive

        public boolean isPrimitive()
        Description copied from interface: IDatatype
        Returns whether this type is a primitive type.
        Specified by:
        isPrimitive in interface IDatatype
        Returns:
        true if it is a primitive type, false else