Package net.ssehub.easy.varModel.model
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 Summary
Modifier and TypeMethodDescriptiongetAttribute(int index) Returns a specific attribute.getAttribute(String name) Returns a specific (declared) attribute.intReturns the number of (declared) attributes.Returns the parent model element.
-
Method Details
-
getAttributesCount
int getAttributesCount()Returns the number of (declared) attributes.- Returns:
- the number of attributes
-
getAttribute
Returns a specific (declared) attribute.- Parameters:
name- the name of the attribute- Returns:
- the attribute (or null if not found)
-
getAttribute
Returns a specific attribute.- Parameters:
index- the index of the attribute- Returns:
- the attribute
- Throws:
IndexOutOfBoundsException- ifindex<0 || index>=getAttributesCount()
-
getParent
IModelElement getParent()Returns the parent model element.- Returns:
- the parent model element (may be null)
-