Class CompoundAccessStatement

All Implemented Interfaces:
IDatatypeVisitable, IAttributeAccess, IFreezable, IModelElement

public class CompoundAccessStatement extends ContainableModelElement implements IFreezable
Represents a compound access statement, e.g., within a freeze block.
Author:
Holger Eichelberger
  • Field Details

  • Constructor Details

    • CompoundAccessStatement

      public CompoundAccessStatement(AbstractVariable compoundVariable, String slotName, IModelElement parent)
      Creates a compound access statement.
      Parameters:
      compoundVariable - the compound variable the access happens on
      slotName - the name of the slot within the compound variable
      parent - the parent element
  • Method Details

    • getSlotName

      public String getSlotName()
      Returns the slot name.
      Returns:
      the slot name
    • getCompoundVariable

      public AbstractVariable getCompoundVariable()
      Returns the underlying compound variable.
      Returns:
      the compound variable
    • accept

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

      public IDatatype getType()
      Description copied from interface: IFreezable
      Returns the type of this freezable.
      Specified by:
      getType in interface IFreezable
      Returns:
      the type of this freezable
    • getSlotDeclaration

      public AbstractVariable getSlotDeclaration()
      Returns the slot declaration.
      Returns:
      the variable declaration for the referenced compound slot, null if not found
    • getAttributesCount

      public int getAttributesCount()
      Description copied from interface: IAttributeAccess
      Returns the number of (declared) attributes.
      Specified by:
      getAttributesCount in interface IAttributeAccess
      Returns:
      the number of attributes
    • getAttribute

      public Attribute getAttribute(String name)
      Description copied from interface: IAttributeAccess
      Returns a specific (declared) attribute.
      Specified by:
      getAttribute in interface IAttributeAccess
      Parameters:
      name - the name of the attribute
      Returns:
      the attribute (or null if not found)
    • getAttribute

      public Attribute getAttribute(int index)
      Description copied from interface: IAttributeAccess
      Returns a specific attribute.
      Specified by:
      getAttribute in interface IAttributeAccess
      Parameters:
      index - the index of the attribute
      Returns:
      the attribute