Interface IAttributeAccess

All Known Subinterfaces:
IAttributableElement, IFreezable
All Known Implementing Classes:
AbstractVariable, Attribute, AttributeVariable, BlockExpression, CollectionElementVariable, Comment, CompoundAccess, CompoundAccessStatement, CompoundInitializer, ConstantDecisionVariableDeclaration, ConstantValue, ConstraintSyntaxTree, ContainerInitializer, ContainerOperationCall, DecisionVariableDeclaration, DeferInitExpression, DotAttribute, EmptyInitializer, ExplicitTypeVariableDeclaration, IfThen, IterLet, Leaf, Let, MultiAndExpression, NamedArgument, OCLFeatureCall, Parenthesis, Project, ProjectDecisionVariableDeclaration, ResolvedVariable, Self, UnresolvedExpression, Variable

public interface IAttributeAccess
Provides access to attributes. However, implementing elements do not need to be attributable and, thus, may return no attributes.
Author:
Holger Eichelberger
  • Method Details

    • getAttributesCount

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

      Attribute getAttribute(String name)
      Returns a specific (declared) attribute.
      Parameters:
      name - the name of the attribute
      Returns:
      the attribute (or null if not found)
    • getAttribute

      Attribute getAttribute(int index)
      Returns a specific attribute.
      Parameters:
      index - the index of the attribute
      Returns:
      the attribute
      Throws:
      IndexOutOfBoundsException - if index<0 || index>=getAttributesCount()
    • getParent

      IModelElement getParent()
      Returns the parent model element.
      Returns:
      the parent model element (may be null)