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
Represents a compound access statement, e.g., within a freeze block.
- Author:
- Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCompoundAccessStatement(AbstractVariable compoundVariable, String slotName, IModelElement parent) Creates a compound access statement. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IModelVisitor visitor) Accept method for the visitor.getAttribute(int index) Returns a specific attribute.getAttribute(String name) Returns a specific (declared) attribute.intReturns the number of (declared) attributes.Returns the underlying compound variable.Returns the slot declaration.Returns the slot name.getType()Returns the type of this freezable.Methods inherited from class net.ssehub.easy.varModel.model.ContainableModelElement
accept, getNameSpace, getParent, getProject, getQualifiedName, getTopLevelParent, isTopLevel, setParentMethods inherited from class net.ssehub.easy.varModel.model.ModelElement
findAttribute, getComment, getName, getUniqueName, isTransparent, propagateAttribute, setComment, setName, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.ssehub.easy.varModel.model.IFreezable
getName, getParent
-
Field Details
-
compoundVariable
-
slotName
-
-
Constructor Details
-
CompoundAccessStatement
public CompoundAccessStatement(AbstractVariable compoundVariable, 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 Details
-
getSlotName
Returns the slot name.- Returns:
- the slot name
-
getCompoundVariable
Returns the underlying compound variable.- Returns:
- the compound variable
-
accept
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
Description copied from interface:IFreezableReturns the type of this freezable.- Specified by:
getTypein interfaceIFreezable- Returns:
- the type of this freezable
-
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
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
Description copied from interface:IAttributeAccessReturns a specific attribute.- Specified by:
getAttributein interfaceIAttributeAccess- Parameters:
index- the index of the attribute- Returns:
- the attribute
-