Class IvmlProjectTypeDescriptor

    • Field Detail

    • Method Detail

      • addOperations

        private void addOperations​(DecisionVariableDeclaration decl,
                                   java.util.Map<java.lang.String,​OperationDescriptor> operations,
                                   java.util.Map<java.lang.String,​FieldDescriptor> fields)
        Adds operations for the given variable declaration.
        Parameters:
        decl - the variable declaration
        operations - the name-operation mapping to be filled as a side effect
        fields - the name-field mapping to be filled as a side effect
      • addOperations

        private void addOperations​(IDecisionVariableContainer cont,
                                   java.util.Map<java.lang.String,​OperationDescriptor> operations,
                                   java.util.Map<java.lang.String,​FieldDescriptor> fields)
        Adds operations for elements defined by cont.
        Parameters:
        cont - the container
        operations - the name-operation mapping to be filled as a side effect
        fields - the name-field mapping to be filled as a side effect
      • addOperations

        private void addOperations​(java.util.Map<java.lang.String,​OperationDescriptor> operations,
                                   java.util.Map<java.lang.String,​FieldDescriptor> fields,
                                   Project project,
                                   java.util.Set<Project> done)
        Adds all operations of project and its imports to operations.
        Parameters:
        operations - the name-operation mapping to be filled as a side effect
        fields - the name-field mapping to be filled as a side effect
        project - the project the operations shall be added for
        done - already done projects
      • getProject

        public Project getProject()
        Returns the project associated with this descriptor.
        Returns:
        the project
      • isAssignableFrom

        public boolean isAssignableFrom​(TypeDescriptor<?> desc)
        Description copied from class: TypeDescriptor
        Returns whether this descriptor is the same or a super class of desc.
        Specified by:
        isAssignableFrom in class TypeDescriptor<DecisionVariable>
        Parameters:
        desc - the descriptor to be tested
        Returns:
        true if both descriptors are assignment compatible, false else
      • isInstance

        public boolean isInstance​(java.lang.Object object)
        Description copied from class: TypeDescriptor
        Returns whether the given object is an instance of this descriptor.
        Specified by:
        isInstance in class TypeDescriptor<DecisionVariable>
        Parameters:
        object - the object to be checked
        Returns:
        true if it is an instance, false else
      • isSameType

        public boolean isSameType​(java.lang.Object object)
        Description copied from class: TypeDescriptor
        Returns whether the given object of of the type of this descriptor.
        Specified by:
        isSameType in class TypeDescriptor<DecisionVariable>
        Parameters:
        object - the object to be checked
        Returns:
        true if object has the same type, false else
      • isPlaceholder

        public boolean isPlaceholder()
        Description copied from interface: IMetaType
        Returns whether this type is valid or whether it is a placeholder type in case that the original type cannot be resolved but the script shall remain executable.
        Specified by:
        isPlaceholder in interface IMetaType
        Returns:
        true if this type is a placeholder, false else
      • addPlaceholderOperation

        public OperationDescriptor addPlaceholderOperation​(java.lang.String name,
                                                           int parameterCount,
                                                           boolean acceptsNamedParameters)
        Description copied from class: TypeDescriptor
        Adds a placeholder operation, i.e., in case that the original operation cannot be resolved but the script shall remain executable.
        Specified by:
        addPlaceholderOperation in interface IMetaType
        Specified by:
        addPlaceholderOperation in class TypeDescriptor<DecisionVariable>
        Parameters:
        name - the name of the operation
        parameterCount - the number of parameters of the operation
        acceptsNamedParameters - whether the operation accepts named parameters
        Returns:
        the added operation, null if this type is not a placeholder
      • determineActualValue

        public java.lang.Object determineActualValue​(java.lang.Object object)
        Description copied from interface: IActualValueProvider
        Determines a more actual value for object in the context of using it for this type. Default types implementing this interface shall not use their attributes as this method will be called via a template object.
        Specified by:
        determineActualValue in interface IActualValueProvider
        Parameters:
        object - the initial object (may be null)
        Returns:
        the actual object (may be object if no actual value is available, may be null if object was null)
      • getBaseType

        public IMetaType getBaseType()
        Description copied from interface: IMetaType
        Returns the base type (in case of IVML derived types).
        Specified by:
        getBaseType in interface IMetaType
        Returns:
        the base type or null
      • isInternal

        public boolean isInternal()
        Description copied from interface: IMetaType
        Returns whether this type is internal and shall not be visible to the user.
        Specified by:
        isInternal in interface IMetaType
        Returns:
        true if this type is internal, false else
      • checkConversion

        public boolean checkConversion​(IMetaType param,
                                       IMetaOperation conversion)
        Description copied from interface: IMetaType
        Checks a conversion from this type to param via the given conversion.
        Specified by:
        checkConversion in interface IMetaType
        Parameters:
        param - the original parameter value
        conversion - the conversion function
        Returns:
        true if ok, false else