Class AbstractIvmlTypeDescriptor

    • Method Detail

      • addDecisionVariableOperations

        protected void addDecisionVariableOperations​(java.util.Map<java.lang.String,​OperationDescriptor> operations)
        Adds the operations to be taken over from DecisionVariable. Calls includeMethod(Method).
        Parameters:
        operations - the operations (signature-descriptor) (to be modified as a side effect)
      • includeMethod

        private static boolean includeMethod​(java.lang.reflect.Method method)
        Determines whether a method shall be included as automatically mapped operation.
        Parameters:
        method - the method to be considered
        Returns:
        true if method shall be included, false else
      • addComparisonOperations

        protected void addComparisonOperations​(IDatatype type,
                                               java.util.Map<java.lang.String,​OperationDescriptor> operations)
        Adds the default comparison operations.
        Parameters:
        type - the IVML type to add the operations for
        operations - the operations (signature-descriptor) (to be modified as a side effect)
      • addConversionOperations

        protected void addConversionOperations​(IDatatype type,
                                               java.util.List<OperationDescriptor> operations)
        Adds required conversion operations to operations.
        Parameters:
        type - the IVML type to add the operations for
        operations - the operations to be modified as a side effect
      • addAttributeFields

        protected void addAttributeFields​(java.util.Map<java.lang.String,​FieldDescriptor> fields,
                                          IModelElement elt,
                                          TypeRegistry registry)
                                   throws VilException
        Adds the attribute access fields.
        Parameters:
        fields - the fields (signature-field) (to be modified as a side effect)
        elt - the model element to take the attributes from
        registry - the actual type registry
        Throws:
        VilException - in case that creating the descriptors fails
      • isBasicType

        public boolean isBasicType()
        Description copied from interface: IMetaType
        Returns whether this instance represents a basic type.
        Returns:
        true if this instance represents a basic type, false else
      • getTypeRegistry

        public TypeRegistry getTypeRegistry()
        Description copied from interface: IMetaType
        Returns the type registry this type was registered by.
        Returns:
        the type registry
      • isAssignableFrom

        public boolean isAssignableFrom​(IMetaType type)
        Description copied from interface: IMetaType
        Returns whether this type is the same or a super class of type.
        Parameters:
        type - the descriptor to be tested
        Returns:
        true if both types are assignment compatible, false else
      • isCollection

        public boolean isCollection()
        Description copied from class: TypeDescriptor
        Returns whether this descriptor represents a VIL collection, i.e., set, sequence or collection.
        Specified by:
        isCollection in class TypeDescriptor<DecisionVariable>
        Returns:
        true if this is a VIL collection, false else
      • getSuperType

        public IMetaType getSuperType()
        Description copied from interface: IMetaType
        Returns the type this type is refined from.
        Returns:
        the super type or null if there is none
      • getRefines

        AbstractIvmlTypeDescriptor getRefines​(int index)
        Returns the type descriptor which is refined by this descriptor.
        Parameters:
        index - the 0-based index of refines to return, see getRefinesCount()
        Returns:
        the refined type (may be null if there is none)
      • getRefinesCount

        int getRefinesCount()
        Returns the number of refines.
        Returns:
        the number of refines
      • setRefines

        protected void setRefines​(AbstractIvmlTypeDescriptor[] refines)
        Changes the type descriptor which is refined by this descriptor.
        Parameters:
        refines - the refined type descriptor (may be null if there is none)
      • isActualTypeOf

        public boolean isActualTypeOf​(IMetaType type)
        Description copied from interface: IMetaType
        Returns whether this type can act as an actual type of type.
        Parameters:
        type - the type to be checked
        Returns:
        true if this type can act as an actual type of type, false else
        See Also:
        IActualTypeProvider
      • getIvmlType

        protected abstract IDatatype getIvmlType()
        Returns the underlying IVML type.
        Returns:
        the type
      • isEqual

        protected boolean isEqual​(AbstractIvmlTypeDescriptor d1,
                                  AbstractIvmlTypeDescriptor d2)
        Returns whether two IVML type descriptors are considered to be equal.
        Parameters:
        d1 - the first descriptor
        d2 - the second descriptor
        Returns:
        true for type equality, false else
      • getDefaultValue

        public java.lang.Object getDefaultValue()
        Description copied from class: TypeDescriptor
        Returns the default value for this type, usually a neutral value or a constant value to compare against.
        Overrides:
        getDefaultValue in class TypeDescriptor<DecisionVariable>
        Returns:
        the default value, null for none - may lead to an undefined operation execution