Class FreezeVariableType

    • Field Detail

      • TYPE

        public static final IDatatype TYPE
        This constant represents the common type of all freeze variables. Each specific freeze variable type is assignable to this type.
      • QNAME2

        public static final Operation QNAME2
      • attributes

        private java.util.List<Attribute> attributes
    • Constructor Detail

      • FreezeVariableType

        private FreezeVariableType()
        Creates the singleton instance for TYPE.
      • FreezeVariableType

        public FreezeVariableType​(IFreezable[] freezables,
                                  IModelElement parent)
        Constructor for a specific freeze variable type.
        Parameters:
        freezables - the freezables to derive the structure of this type from
        parent - the object, in which this specific one is embedded
    • Method Detail

      • indexAttributes

        private void indexAttributes​(IFreezable freezable,
                                     java.util.Map<java.lang.String,​Attribute> attributes)
        Indexes all attributes for adding them to the internal type.
        Parameters:
        freezable - the freezable to be analyzed
        attributes - the name-attributes map (modified as a side effect)
      • accept

        public void accept​(IModelVisitor visitor)
        Description copied from interface: IModelElement
        Accept method for the visitor.
        Parameters:
        visitor - The visitor, which should process this model element.
      • isAssignableFrom

        public boolean isAssignableFrom​(IDatatype type)
        Description copied from class: CustomDatatype
        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
        Overrides:
        isAssignableFrom in class CustomDatatype
        Parameters:
        type - the type being checked
        Returns:
        true if this type is either the same or a supertype of type, true else
      • addAttribute

        void addAttribute​(Attribute attribute)
        Adds an attribute to this type.
        Parameters:
        attribute - the attribute to be added
      • getAttributesCount

        public int getAttributesCount()
        Returns the number of attributes.
        Returns:
        the number of attributes
      • getAttribute

        public Attribute getAttribute​(int index)
        Returns the specified attribute.
        Parameters:
        index - the 0-based index of the attribute to return
        Returns:
        the specified attribute
        Throws:
        java.lang.IndexOutOfBoundsException - if index<0 || index>=getAttributesCount()
      • getAttribute

        public Attribute getAttribute​(java.lang.String name)
        Returns the attribute of the given name.
        Parameters:
        name - the name of the attribute
        Returns:
        the attribute or null if none was found