Class IvmlDeclaration

  • All Implemented Interfaces:
    IResolvable, IStringValueProvider, IVilType

    public class IvmlDeclaration
    extends IvmlElement
    Represents an IVML declaration. This class is internal and shall not be registered in the type factory. It is required as the Configuration may return only frozen elements (according to the actual IVariableFilter) with value but not declarations if needed. It maps to the use of an IVML identifier.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • IvmlDeclaration

        public IvmlDeclaration​(AbstractVariable variable)
        Creates a new declaration instance.
        Parameters:
        variable - the variable to create the declaration for
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from class: IvmlElement
        Returns the simple name of the element.
        Specified by:
        getName in interface IResolvable
        Specified by:
        getName in class IvmlElement
        Returns:
        the simple name
      • getQualifiedName

        public java.lang.String getQualifiedName()
        Description copied from class: IvmlElement
        Returns the qualified name of the element.
        Specified by:
        getQualifiedName in class IvmlElement
        Returns:
        the qualified name
      • getType

        public TypeDescriptor<?> getType()
        Description copied from class: IvmlElement
        Returns the VIL type of the element.
        Specified by:
        getType in class IvmlElement
        Returns:
        the VIL type (may be a fake descriptor if not resolved / no advice)
      • getTypeName

        public java.lang.String getTypeName()
        Description copied from class: IvmlElement
        Returns the simple type name of the element.
        Specified by:
        getTypeName in class IvmlElement
        Returns:
        the simple type name
      • getQualifiedType

        public java.lang.String getQualifiedType()
        Description copied from class: IvmlElement
        Returns the qualified type name of the element.
        Specified by:
        getQualifiedType in class IvmlElement
        Returns:
        the qualified type name
      • getNested

        IvmlElement getNested​(int index)
        Returns the specified nested element.
        Parameters:
        index - the index of the nested element
        Returns:
        the nested element
        Throws:
        java.lang.IndexOutOfBoundsException - if index < 0 || index >=getNestedCount()
      • getNestedCount

        int getNestedCount()
        Returns the number of nested elements.
        Returns:
        the number of nested elements
      • getAttribute

        IvmlElement getAttribute​(int index)
        Description copied from class: IvmlElement
        Returns the specified attribute.
        Specified by:
        getAttribute in class IvmlElement
        Parameters:
        index - the 0-based index of the attribute to return
        Returns:
        the specified attribute
      • getAttributeCount

        int getAttributeCount()
        Description copied from class: IvmlElement
        Returns the number of attributes.
        Specified by:
        getAttributeCount in class IvmlElement
        Returns:
        the number of attributes
      • getValue

        public java.lang.Object getValue()
        Description copied from class: IvmlElement
        Returns the (untyped) value of the decision variable.
        Specified by:
        getValue in class IvmlElement
        Returns:
        the value (may be null)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • getElement

        public IvmlElement getElement​(java.lang.String name)
        Description copied from class: IvmlElement
        Returns the element matching the given (qualified) name.
        Specified by:
        getElement in class IvmlElement
        Parameters:
        name - the name to search for
        Returns:
        the matching element or null if not found
      • getStringValue

        public java.lang.String getStringValue()
        Description copied from class: IvmlElement
        Returns the string value of the decision variable.
        Specified by:
        getStringValue in class IvmlElement
        Returns:
        the value (may be null)
      • getIntegerValue

        public java.lang.Integer getIntegerValue()
        Description copied from class: IvmlElement
        Returns the integer value of the decision variable.
        Specified by:
        getIntegerValue in class IvmlElement
        Returns:
        the value (may be null)
      • getRealValue

        public java.lang.Double getRealValue()
        Description copied from class: IvmlElement
        Returns the real value of the decision variable.
        Specified by:
        getRealValue in class IvmlElement
        Returns:
        the value (may be null)
      • getBooleanValue

        public java.lang.Boolean getBooleanValue()
        Description copied from class: IvmlElement
        Returns the boolean value of the decision variable.
        Specified by:
        getBooleanValue in class IvmlElement
        Returns:
        the value (may be null)
      • getEnumValue

        public EnumValue getEnumValue()
        Description copied from class: IvmlElement
        Returns the boolean value of the decision variable.
        Specified by:
        getEnumValue in class IvmlElement
        Returns:
        the value (may be null)