Package net.ssehub.easy.varModel.model
Class FreezeBlock
- java.lang.Object
-
- net.ssehub.easy.varModel.model.ModelElement
-
- net.ssehub.easy.varModel.model.ContainableModelElement
-
- net.ssehub.easy.varModel.model.EvaluationBlock
-
- net.ssehub.easy.varModel.model.FreezeBlock
-
- All Implemented Interfaces:
IDatatypeVisitable,IModelElement
public class FreezeBlock extends EvaluationBlock
Handles frozen elements.- Author:
- Marcel Lueder, Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private IFreezable[]freezablesprivate DecisionVariableDeclarationiterprivate ConstraintSyntaxTreeselector
-
Constructor Summary
Constructors Constructor Description FreezeBlock()Constructor for serialization.FreezeBlock(IFreezable[] freezables, DecisionVariableDeclaration iter, ConstraintSyntaxTree selector, IModelElement parent)Constructor for containable model element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IModelVisitor visitor)Accept method for the visitor.IFreezablegetFreezable(int index)Returns a specific freezable.intgetFreezableCount()Returns the number of freezables.DecisionVariableDeclarationgetIter()Returns the iterator variable.ConstraintSyntaxTreegetSelector()Returns the selector.IDatatypegetType()Returns the internal type of this block.java.lang.StringtoString()-
Methods inherited from class net.ssehub.easy.varModel.model.EvaluationBlock
isEmpty
-
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
-
-
-
-
Field Detail
-
freezables
private IFreezable[] freezables
-
iter
private DecisionVariableDeclaration iter
-
selector
private ConstraintSyntaxTree selector
-
-
Constructor Detail
-
FreezeBlock
FreezeBlock()
Constructor for serialization.
-
FreezeBlock
public FreezeBlock(IFreezable[] freezables, DecisionVariableDeclaration iter, ConstraintSyntaxTree selector, IModelElement parent)
Constructor for containable model element.- Parameters:
freezables- the elements which may be frozen (depends onbuts)iter- the iterator variable forselector, may be nullselector- the selector expression usingiter, may be nullparent- the object, in which this specific one is embedded
-
-
Method Detail
-
accept
public void accept(IModelVisitor visitor)
Description copied from interface:IModelElementAccept method for the visitor.- Parameters:
visitor- The visitor, which should process this model element.
-
getType
public IDatatype getType()
Returns the internal type of this block.- Returns:
- the internal type
-
getSelector
public ConstraintSyntaxTree getSelector()
Returns the selector.- Returns:
- the selector (may be null)
-
getIter
public DecisionVariableDeclaration getIter()
Returns the iterator variable.- Returns:
- the iterator variable (may be null)
-
getFreezableCount
public int getFreezableCount()
Returns the number of freezables.- Returns:
- the number of freezables
-
getFreezable
public IFreezable getFreezable(int index)
Returns a specific freezable.- Parameters:
index- the index of the freezable- Returns:
- the freezable
- Throws:
java.lang.IndexOutOfBoundsException- ifindex<0 || index>=getFreezableCount()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classModelElement
-
-