Class DummyModel<V extends IMetaParameterDeclaration,​M extends IModel>

    • Constructor Detail

      • DummyModel

        public DummyModel()
        Prevents external instantiation (singleton).
    • Method Detail

      • setVersion

        public void setVersion​(Version version)
        Description copied from interface: IModel
        Changes the version of this model.
        Specified by:
        setVersion in interface IModel
        Parameters:
        version - Version to set
      • getVersion

        public Version getVersion()
        Description copied from interface: IModel
        Returns the version of this model.
        Specified by:
        getVersion in interface IModel
        Specified by:
        getVersion in interface IModelData
        Returns:
        the version or null if no version is specified for this model.
      • getName

        public java.lang.String getName()
        Description copied from interface: IModel
        Returns the name of the model element.
        Specified by:
        getName in interface IMetaType
        Specified by:
        getName in interface IModel
        Specified by:
        getName in interface IModelData
        Returns:
        the name of this model element.
      • getImportsCount

        public int getImportsCount()
        Description copied from interface: IModel
        Returns the number of imports.
        Specified by:
        getImportsCount in interface IModel
        Returns:
        the number of imports
      • getImport

        public ModelImport<?> getImport​(int index)
        Description copied from interface: IModel
        Returns the model import specified by index.
        Specified by:
        getImport in interface IModel
        Parameters:
        index - a 0-based index specifying the import to be returned
        Returns:
        the model import
      • getSuper

        public ModelImport<?> getSuper()
        Description copied from interface: IModel
        Returns the reference to the super model (if it exists).
        Specified by:
        getSuper in interface IModel
        Returns:
        the super model (in terms of a model import/reference, may be null)
      • getIndentationConfiguration

        public IndentationConfiguration getIndentationConfiguration()
        Description copied from interface: IModel
        Returns the indentation configuration for this model. The indentation configuration is considered to be immutable.
        Specified by:
        getIndentationConfiguration in interface IModel
        Returns:
        the indentation configuration (disabled if null)
      • dispose

        public void dispose()
        Description copied from interface: IModel
        Shall be called at the end of the lifetime of the model in order to clean up references such as listeners.
        Specified by:
        dispose in interface IModel
      • getRestrictionEvaluationContext

        public IRestrictionEvaluationContext getRestrictionEvaluationContext()
        Description copied from interface: IModel
        Returns the context for evaluating import / conflict restrictions. This context shall only contain the information that is necessary to evaluate restriction information.
        Specified by:
        getRestrictionEvaluationContext in interface IModel
        Returns:
        the evaluation context
      • getQualifiedName

        public java.lang.String getQualifiedName()
        Description copied from interface: IMetaType
        Returns the qualified name of this type.
        Specified by:
        getQualifiedName in interface IMetaType
        Returns:
        the qualified name
      • getOperationsCount

        public int getOperationsCount()
        Description copied from interface: IMetaType
        Returns the number of operations provided by this type.
        Specified by:
        getOperationsCount in interface IMetaType
        Returns:
        the number of operations
      • getOperation

        public IMetaOperation getOperation​(int index)
        Description copied from interface: IMetaType
        Returns the specified operation.
        Specified by:
        getOperation in interface IMetaType
        Parameters:
        index - the 0-based index of the operation to be returned
        Returns:
        the specified operation
      • isAssignableFrom

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

        public IMetaOperation findConversion​(IMetaType sourceType,
                                             IMetaType targetType)
        Description copied from interface: IMetaType
        Returns the conversion operation from this type to target type (if there is any).
        Specified by:
        findConversion in interface IMetaType
        Parameters:
        sourceType - the source type to convert from
        targetType - the target type to convert to
        Returns:
        the conversion operation as defined in the underlying implementation class, null if no matching can be found
      • isBasicType

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

        public boolean enableDynamicDispatch()
        Description copied from interface: IMetaType
        Returns whether this type enables dynamic dispatch of operations.
        Specified by:
        enableDynamicDispatch in interface IMetaType
        Returns:
        true if it enables dynamic dispatch, 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 IMetaOperation addPlaceholderOperation​(java.lang.String name,
                                                      int parameterCount,
                                                      boolean acceptsNamedParameters)
        Description copied from interface: IMetaType
        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
        Parameters:
        name - the name of the operation
        parameterCount - the number of parameters of the operation
        acceptsNamedParameters - whether the operation shall accept named parameters
        Returns:
        the added operation, null if this type is not a placeholder
      • isActualTypeOf

        public boolean isActualTypeOf​(IMetaType type)
        Description copied from interface: IMetaType
        Returns whether this type can act as an actual type of type.
        Specified by:
        isActualTypeOf in interface IMetaType
        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
      • 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
      • getFieldCount

        public int getFieldCount()
        Description copied from interface: IMetaType
        Returns the number of fields provided by this type.
        Specified by:
        getFieldCount in interface IMetaType
        Returns:
        the number of fields
      • getField

        public IMetaField getField​(int index)
        Description copied from interface: IMetaType
        Returns the specified field.
        Specified by:
        getField in interface IMetaType
        Parameters:
        index - the 0-based index of the field to be returned
        Returns:
        the specified field
      • 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
      • getSuperType

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

        public int getGenericParameterCount()
        Description copied from interface: IMetaType
        Returns the number of generic type parameters.
        Specified by:
        getGenericParameterCount in interface IMetaType
        Returns:
        the number of generic type parameters
      • getGenericParameterType

        public TypeDescriptor<?> getGenericParameterType​(int index)
        Description copied from interface: IMetaType
        Returns the specified generic parameter type.
        Specified by:
        getGenericParameterType in interface IMetaType
        Parameters:
        index - the index of the parameter type to return
        Returns:
        the specified parameter type
      • 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
      • getParameter

        public V getParameter​(int index)
        Description copied from interface: IParameterizable
        Get the parameter of this rule at the specified index.
        Specified by:
        getParameter in interface IParameterizable<V extends IMetaParameterDeclaration>
        Parameters:
        index - The 0-based index of the rule parameter to be returned.
        Returns:
        The rule parameter at the given index.
      • getIvmlElement

        public java.lang.Object getIvmlElement​(java.lang.String name)
        Description copied from interface: IResolvableModel
        Returns whether the given name resolves to an IVML element.
        Specified by:
        getIvmlElement in interface IResolvableModel<V extends IMetaParameterDeclaration,​M extends IModel>
        Parameters:
        name - the name to be resolved
        Returns:
        the IVML element (value, containable model element), null else
      • getVariableDeclaration

        public V getVariableDeclaration​(int index)
        Description copied from interface: IResolvableModel
        Get the variable declaration of this model at the specified index.
        Specified by:
        getVariableDeclaration in interface IResolvableModel<V extends IMetaParameterDeclaration,​M extends IModel>
        Parameters:
        index - The 0-based index of the variable declaration to be returned.
        Returns:
        The variable declaration at the given index.
      • getCandidates

        public java.util.List<IMetaOperation> getCandidates​(java.lang.String name,
                                                            int unnamedArgsCount)
        Description copied from interface: IMetaType
        Returns operation candidates matching the given name and number of unnamed (required) arguments.
        Specified by:
        getCandidates in interface IMetaType
        Parameters:
        name - the name of the operation
        unnamedArgsCount - the number of unnamed arguments
        Returns:
        the operation candidates