Package net.ssehub.easy.varModel.model
Class CompoundAccessStatement
- java.lang.Object
-
- net.ssehub.easy.varModel.model.ModelElement
-
- net.ssehub.easy.varModel.model.ContainableModelElement
-
- net.ssehub.easy.varModel.model.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 Summary
Fields Modifier and Type Field Description private AbstractVariablecompoundVariableprivate java.lang.StringslotName
-
Constructor Summary
Constructors Constructor Description CompoundAccessStatement(AbstractVariable compoundVariable, java.lang.String slotName, IModelElement parent)Creates a compound access statement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IModelVisitor visitor)Accept method for the visitor.AttributegetAttribute(int index)Returns a specific attribute.AttributegetAttribute(java.lang.String name)Returns a specific (declared) attribute.intgetAttributesCount()Returns the number of (declared) attributes.AbstractVariablegetCompoundVariable()Returns the underlying compound variable.AbstractVariablegetSlotDeclaration()Returns the slot declaration.java.lang.StringgetSlotName()Returns the slot name.IDatatypegetType()Returns the type of this freezable.-
Methods inherited from class net.ssehub.easy.varModel.model.ContainableModelElement
accept, getNameSpace, getParent, getProject, getQualifiedName, getTopLevelParent, isTopLevel, setParent
-
Methods inherited from class net.ssehub.easy.varModel.model.ModelElement
findAttribute, getComment, getName, getUniqueName, isTransparent, propagateAttribute, setComment, setName, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.ssehub.easy.varModel.model.IFreezable
getName, getParent
-
-
-
-
Field Detail
-
compoundVariable
private AbstractVariable compoundVariable
-
slotName
private java.lang.String slotName
-
-
Constructor Detail
-
CompoundAccessStatement
public CompoundAccessStatement(AbstractVariable compoundVariable, java.lang.String slotName, IModelElement parent)
Creates a compound access statement.- Parameters:
compoundVariable- the compound variable the access happens onslotName- the name of the slot within the compound variableparent- the parent element
-
-
Method Detail
-
getSlotName
public java.lang.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:IFreezableAccept method for the visitor.- Specified by:
acceptin interfaceIFreezable- Specified by:
acceptin interfaceIModelElement- Parameters:
visitor- The visitor, which should process this model element.
-
getType
public IDatatype getType()
Description copied from interface:IFreezableReturns the type of this freezable.- Specified by:
getTypein interfaceIFreezable- 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:IAttributeAccessReturns the number of (declared) attributes.- Specified by:
getAttributesCountin interfaceIAttributeAccess- Returns:
- the number of attributes
-
getAttribute
public Attribute getAttribute(java.lang.String name)
Description copied from interface:IAttributeAccessReturns a specific (declared) attribute.- Specified by:
getAttributein interfaceIAttributeAccess- 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:IAttributeAccessReturns a specific attribute.- Specified by:
getAttributein interfaceIAttributeAccess- Parameters:
index- the index of the attribute- Returns:
- the attribute
-
-