Class CustomDatatype

    • Constructor Detail

      • CustomDatatype

        protected CustomDatatype​(java.lang.String name,
                                 DelegatingType singleton,
                                 IModelElement parent)
        Constructor for custom data type.
        Parameters:
        name - Name of the custom data type
        singleton - the instance which knows the operations
        parent - the object, in which this specific one is embedded
    • Method Detail

      • getOperation

        public final Operation 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 final int getOperationCount()
        Description copied from interface: IDatatype
        Returns the number of operations.
        Specified by:
        getOperationCount in interface IDatatype
        Returns:
        the number of operations
      • isAssignableFrom

        public boolean isAssignableFrom​(IDatatype type)
        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, true else
      • getTypeClass

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

        public IDatatype getType()
        Returns the object realizing the type.
        Specified by:
        getType in interface IDatatype
        Returns:
        the object 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
      • 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
      • 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
      • isType

        protected static final boolean isType​(IDatatype requestedType,
                                              IDatatype type,
                                              IDatatype... generics)
        Returns whether type of requestedTypeand the given generics match.
        Parameters:
        requestedType - the requested basic type
        type - the type to check for
        generics - the generics to be considered
        Returns:
        true if type is a requestedType with the matching generics, false else