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,DotAttribute,EmptyInitializer,ExplicitTypeVariableDeclaration,IfThen,IterLet,Leaf,Let,MultiAndExpression,NamedArgument,OCLFeatureCall,Parenthesis,Project,ProjectDecisionVariableDeclaration,ResolvedVariable,Self,UnresolvedExpression,Variable
public interface IAttributeAccessProvides access to attributes. However, implementing elements do not need to be attributable and, thus, may return no attributes.- Author:
- Holger Eichelberger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AttributegetAttribute(int index)Returns a specific attribute.AttributegetAttribute(java.lang.String name)Returns a specific (declared) attribute.intgetAttributesCount()Returns the number of (declared) attributes.IModelElementgetParent()Returns the parent model element.
-
-
-
Method Detail
-
getAttributesCount
int getAttributesCount()
Returns the number of (declared) attributes.- Returns:
- the number of attributes
-
getAttribute
Attribute getAttribute(java.lang.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:
java.lang.IndexOutOfBoundsException- ifindex<0 || index>=getAttributesCount()
-
getParent
IModelElement getParent()
Returns the parent model element.- Returns:
- the parent model element (may be null)
-
-