Class ASTSwitchStatement
- java.lang.Object
-
- de.monticore.ast.ASTCNode
-
- de.monticore.statements.mccommonstatements._ast.ASTSwitchStatement
-
- All Implemented Interfaces:
de.monticore.ast.ASTNode,ASTMCCommonStatementsNode,ASTMCBlockStatement,ASTMCStatement,ASTMCStatementsBasisNode,java.lang.Cloneable
public class ASTSwitchStatement extends de.monticore.ast.ASTCNode implements ASTMCStatement, ASTMCCommonStatementsNode
-
-
Field Summary
Fields Modifier and Type Field Description protected IMCCommonStatementsScopeenclosingScopeprotected ASTExpressionexpressionprotected java.util.List<ASTSwitchBlockStatementGroup>switchBlockStatementGroupsprotected java.util.List<ASTSwitchLabel>switchLabels
-
Constructor Summary
Constructors Modifier Constructor Description protectedASTSwitchStatement()
-
Method Summary
-
Methods inherited from class de.monticore.ast.ASTCNode
add_PostComment, add_PostComment, add_PreComment, add_PreComment, addAll_PostComments, addAll_PostComments, addAll_PreComments, addAll_PreComments, clear_PostComments, clear_PreComments, contains_PostComment, contains_PreComment, containsAll_PostComments, containsAll_PreComments, equals_PostComments, equals_PreComments, forEach_PostComments, forEach_PreComments, get_PostComment, get_PostCommentList, get_PreComment, get_PreCommentList, get_SourcePositionEnd, get_SourcePositionStart, hashCode_PostComments, hashCode_PreComments, indexOf_PostComment, indexOf_PreComment, isEmpty_PostComments, isEmpty_PreComments, isPresent_SourcePositionEnd, isPresent_SourcePositionStart, iterator_PostComments, iterator_PreComments, lastIndexOf_PostComment, lastIndexOf_PreComment, listIterator_PostComments, listIterator_PostComments, listIterator_PreComments, listIterator_PreComments, parallelStream_PostComments, parallelStream_PreComments, remove_PostComment, remove_PostComment, remove_PreComment, remove_PreComment, removeAll_PostComments, removeAll_PreComments, removeIf_PostComment, removeIf_PreComment, replaceAll_PostComments, replaceAll_PreComments, retainAll_PostComments, retainAll_PreComments, set_PostComment, set_PostCommentList, set_PreComment, set_PreCommentList, set_SourcePositionEnd, set_SourcePositionEndAbsent, set_SourcePositionStart, set_SourcePositionStartAbsent, size_PostComments, size_PreComments, sort_PostComments, sort_PreComments, spliterator_PostComments, spliterator_PreComments, stream_PostComments, stream_PreComments, subList_PostComments, subList_PreComments, toArray_PostComments, toArray_PostComments, toArray_PreComments, toArray_PreComments
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.monticore.ast.ASTNode
add_PostComment, add_PostComment, add_PreComment, add_PreComment, addAll_PostComments, addAll_PostComments, addAll_PreComments, addAll_PreComments, clear_PostComments, clear_PreComments, contains_PostComment, contains_PreComment, containsAll_PostComments, containsAll_PreComments, equals_PostComments, equals_PreComments, forEach_PostComments, forEach_PreComments, get_PostComment, get_PostCommentList, get_PreComment, get_PreCommentList, get_SourcePositionEnd, get_SourcePositionStart, hashCode_PostComments, hashCode_PreComments, indexOf_PostComment, indexOf_PreComment, isEmpty_PostComments, isEmpty_PreComments, isPresent_SourcePositionEnd, isPresent_SourcePositionStart, iterator_PostComments, iterator_PreComments, lastIndexOf_PostComment, lastIndexOf_PreComment, listIterator_PostComments, listIterator_PostComments, listIterator_PreComments, listIterator_PreComments, parallelStream_PostComments, parallelStream_PreComments, remove_PostComment, remove_PostComment, remove_PreComment, remove_PreComment, removeAll_PostComments, removeAll_PreComments, removeIf_PostComment, removeIf_PreComment, replaceAll_PostComments, replaceAll_PreComments, retainAll_PostComments, retainAll_PreComments, set_PostComment, set_PostCommentList, set_PreComment, set_PreCommentList, set_SourcePositionEnd, set_SourcePositionEndAbsent, set_SourcePositionStart, set_SourcePositionStartAbsent, size_PostComments, size_PreComments, sort_PostComments, sort_PreComments, spliterator_PostComments, spliterator_PreComments, stream_PostComments, stream_PreComments, subList_PostComments, subList_PreComments, toArray_PostComments, toArray_PostComments, toArray_PreComments, toArray_PreComments
-
-
-
-
Field Detail
-
expression
protected ASTExpression expression
-
switchBlockStatementGroups
protected java.util.List<ASTSwitchBlockStatementGroup> switchBlockStatementGroups
-
switchLabels
protected java.util.List<ASTSwitchLabel> switchLabels
-
enclosingScope
protected IMCCommonStatementsScope enclosingScope
-
-
Method Detail
-
deepEquals
public boolean deepEquals(java.lang.Object o)
- Specified by:
deepEqualsin interfaceASTMCBlockStatement- Specified by:
deepEqualsin interfaceASTMCStatement- Specified by:
deepEqualsin interfacede.monticore.ast.ASTNode
-
deepEquals
public boolean deepEquals(java.lang.Object o, boolean forceSameOrder)- Specified by:
deepEqualsin interfaceASTMCBlockStatement- Specified by:
deepEqualsin interfaceASTMCStatement- Specified by:
deepEqualsin interfacede.monticore.ast.ASTNode
-
deepEqualsWithComments
public boolean deepEqualsWithComments(java.lang.Object o)
- Specified by:
deepEqualsWithCommentsin interfaceASTMCBlockStatement- Specified by:
deepEqualsWithCommentsin interfaceASTMCStatement- Specified by:
deepEqualsWithCommentsin interfacede.monticore.ast.ASTNode
-
deepEqualsWithComments
public boolean deepEqualsWithComments(java.lang.Object o, boolean forceSameOrder)- Specified by:
deepEqualsWithCommentsin interfaceASTMCBlockStatement- Specified by:
deepEqualsWithCommentsin interfaceASTMCStatement- Specified by:
deepEqualsWithCommentsin interfacede.monticore.ast.ASTNode
-
equalAttributes
public boolean equalAttributes(java.lang.Object o)
- Specified by:
equalAttributesin interfaceASTMCBlockStatement- Specified by:
equalAttributesin interfaceASTMCStatement- Specified by:
equalAttributesin interfacede.monticore.ast.ASTNode
-
equalsWithComments
public boolean equalsWithComments(java.lang.Object o)
- Specified by:
equalsWithCommentsin interfaceASTMCBlockStatement- Specified by:
equalsWithCommentsin interfaceASTMCStatement- Specified by:
equalsWithCommentsin interfacede.monticore.ast.ASTNode
-
deepClone
public ASTSwitchStatement deepClone()
- Specified by:
deepClonein interfaceASTMCBlockStatement- Specified by:
deepClonein interfaceASTMCStatement- Specified by:
deepClonein interfacede.monticore.ast.ASTNode- Specified by:
deepClonein classde.monticore.ast.ASTCNode
-
deepClone
public ASTSwitchStatement deepClone(ASTSwitchStatement result)
-
getExpression
public ASTExpression getExpression()
-
containsSwitchBlockStatementGroup
public boolean containsSwitchBlockStatementGroup(java.lang.Object element)
-
containsAllSwitchBlockStatementGroups
public boolean containsAllSwitchBlockStatementGroups(java.util.Collection<?> collection)
-
isEmptySwitchBlockStatementGroups
public boolean isEmptySwitchBlockStatementGroups()
-
iteratorSwitchBlockStatementGroups
public java.util.Iterator<ASTSwitchBlockStatementGroup> iteratorSwitchBlockStatementGroups()
-
sizeSwitchBlockStatementGroups
public int sizeSwitchBlockStatementGroups()
-
toArraySwitchBlockStatementGroups
public ASTSwitchBlockStatementGroup[] toArraySwitchBlockStatementGroups(ASTSwitchBlockStatementGroup[] array)
-
toArraySwitchBlockStatementGroups
public java.lang.Object[] toArraySwitchBlockStatementGroups()
-
spliteratorSwitchBlockStatementGroups
public java.util.Spliterator<ASTSwitchBlockStatementGroup> spliteratorSwitchBlockStatementGroups()
-
streamSwitchBlockStatementGroups
public java.util.stream.Stream<ASTSwitchBlockStatementGroup> streamSwitchBlockStatementGroups()
-
parallelStreamSwitchBlockStatementGroups
public java.util.stream.Stream<ASTSwitchBlockStatementGroup> parallelStreamSwitchBlockStatementGroups()
-
getSwitchBlockStatementGroup
public ASTSwitchBlockStatementGroup getSwitchBlockStatementGroup(int index)
-
indexOfSwitchBlockStatementGroup
public int indexOfSwitchBlockStatementGroup(java.lang.Object element)
-
lastIndexOfSwitchBlockStatementGroup
public int lastIndexOfSwitchBlockStatementGroup(java.lang.Object element)
-
equalsSwitchBlockStatementGroups
public boolean equalsSwitchBlockStatementGroups(java.lang.Object o)
-
hashCodeSwitchBlockStatementGroups
public int hashCodeSwitchBlockStatementGroups()
-
listIteratorSwitchBlockStatementGroups
public java.util.ListIterator<ASTSwitchBlockStatementGroup> listIteratorSwitchBlockStatementGroups()
-
listIteratorSwitchBlockStatementGroups
public java.util.ListIterator<ASTSwitchBlockStatementGroup> listIteratorSwitchBlockStatementGroups(int index)
-
subListSwitchBlockStatementGroups
public java.util.List<ASTSwitchBlockStatementGroup> subListSwitchBlockStatementGroups(int start, int end)
-
getSwitchBlockStatementGroupList
public java.util.List<ASTSwitchBlockStatementGroup> getSwitchBlockStatementGroupList()
-
containsSwitchLabel
public boolean containsSwitchLabel(java.lang.Object element)
-
containsAllSwitchLabels
public boolean containsAllSwitchLabels(java.util.Collection<?> collection)
-
isEmptySwitchLabels
public boolean isEmptySwitchLabels()
-
iteratorSwitchLabels
public java.util.Iterator<ASTSwitchLabel> iteratorSwitchLabels()
-
sizeSwitchLabels
public int sizeSwitchLabels()
-
toArraySwitchLabels
public ASTSwitchLabel[] toArraySwitchLabels(ASTSwitchLabel[] array)
-
toArraySwitchLabels
public java.lang.Object[] toArraySwitchLabels()
-
spliteratorSwitchLabels
public java.util.Spliterator<ASTSwitchLabel> spliteratorSwitchLabels()
-
streamSwitchLabels
public java.util.stream.Stream<ASTSwitchLabel> streamSwitchLabels()
-
parallelStreamSwitchLabels
public java.util.stream.Stream<ASTSwitchLabel> parallelStreamSwitchLabels()
-
getSwitchLabel
public ASTSwitchLabel getSwitchLabel(int index)
-
indexOfSwitchLabel
public int indexOfSwitchLabel(java.lang.Object element)
-
lastIndexOfSwitchLabel
public int lastIndexOfSwitchLabel(java.lang.Object element)
-
equalsSwitchLabels
public boolean equalsSwitchLabels(java.lang.Object o)
-
hashCodeSwitchLabels
public int hashCodeSwitchLabels()
-
listIteratorSwitchLabels
public java.util.ListIterator<ASTSwitchLabel> listIteratorSwitchLabels()
-
listIteratorSwitchLabels
public java.util.ListIterator<ASTSwitchLabel> listIteratorSwitchLabels(int index)
-
subListSwitchLabels
public java.util.List<ASTSwitchLabel> subListSwitchLabels(int start, int end)
-
getSwitchLabelList
public java.util.List<ASTSwitchLabel> getSwitchLabelList()
-
setExpression
public void setExpression(ASTExpression expression)
-
clearSwitchBlockStatementGroups
public void clearSwitchBlockStatementGroups()
-
addSwitchBlockStatementGroup
public boolean addSwitchBlockStatementGroup(ASTSwitchBlockStatementGroup element)
-
addAllSwitchBlockStatementGroups
public boolean addAllSwitchBlockStatementGroups(java.util.Collection<? extends ASTSwitchBlockStatementGroup> collection)
-
removeSwitchBlockStatementGroup
public boolean removeSwitchBlockStatementGroup(java.lang.Object element)
-
removeAllSwitchBlockStatementGroups
public boolean removeAllSwitchBlockStatementGroups(java.util.Collection<?> collection)
-
retainAllSwitchBlockStatementGroups
public boolean retainAllSwitchBlockStatementGroups(java.util.Collection<?> collection)
-
removeIfSwitchBlockStatementGroup
public boolean removeIfSwitchBlockStatementGroup(java.util.function.Predicate<? super ASTSwitchBlockStatementGroup> filter)
-
forEachSwitchBlockStatementGroups
public void forEachSwitchBlockStatementGroups(java.util.function.Consumer<? super ASTSwitchBlockStatementGroup> action)
-
addSwitchBlockStatementGroup
public void addSwitchBlockStatementGroup(int index, ASTSwitchBlockStatementGroup element)
-
addAllSwitchBlockStatementGroups
public boolean addAllSwitchBlockStatementGroups(int index, java.util.Collection<? extends ASTSwitchBlockStatementGroup> collection)
-
removeSwitchBlockStatementGroup
public ASTSwitchBlockStatementGroup removeSwitchBlockStatementGroup(int index)
-
setSwitchBlockStatementGroup
public ASTSwitchBlockStatementGroup setSwitchBlockStatementGroup(int index, ASTSwitchBlockStatementGroup element)
-
replaceAllSwitchBlockStatementGroups
public void replaceAllSwitchBlockStatementGroups(java.util.function.UnaryOperator<ASTSwitchBlockStatementGroup> operator)
-
sortSwitchBlockStatementGroups
public void sortSwitchBlockStatementGroups(java.util.Comparator<? super ASTSwitchBlockStatementGroup> comparator)
-
setSwitchBlockStatementGroupList
public void setSwitchBlockStatementGroupList(java.util.List<ASTSwitchBlockStatementGroup> switchBlockStatementGroups)
-
clearSwitchLabels
public void clearSwitchLabels()
-
addSwitchLabel
public boolean addSwitchLabel(ASTSwitchLabel element)
-
addAllSwitchLabels
public boolean addAllSwitchLabels(java.util.Collection<? extends ASTSwitchLabel> collection)
-
removeSwitchLabel
public boolean removeSwitchLabel(java.lang.Object element)
-
removeAllSwitchLabels
public boolean removeAllSwitchLabels(java.util.Collection<?> collection)
-
retainAllSwitchLabels
public boolean retainAllSwitchLabels(java.util.Collection<?> collection)
-
removeIfSwitchLabel
public boolean removeIfSwitchLabel(java.util.function.Predicate<? super ASTSwitchLabel> filter)
-
forEachSwitchLabels
public void forEachSwitchLabels(java.util.function.Consumer<? super ASTSwitchLabel> action)
-
addSwitchLabel
public void addSwitchLabel(int index, ASTSwitchLabel element)
-
addAllSwitchLabels
public boolean addAllSwitchLabels(int index, java.util.Collection<? extends ASTSwitchLabel> collection)
-
removeSwitchLabel
public ASTSwitchLabel removeSwitchLabel(int index)
-
setSwitchLabel
public ASTSwitchLabel setSwitchLabel(int index, ASTSwitchLabel element)
-
replaceAllSwitchLabels
public void replaceAllSwitchLabels(java.util.function.UnaryOperator<ASTSwitchLabel> operator)
-
sortSwitchLabels
public void sortSwitchLabels(java.util.Comparator<? super ASTSwitchLabel> comparator)
-
setSwitchLabelList
public void setSwitchLabelList(java.util.List<ASTSwitchLabel> switchLabels)
-
accept
public void accept(MCCommonStatementsTraverser visitor)
Entry point for the Visitor pattern. Cf. MontiCore handbook chapter 8.- Specified by:
acceptin interfaceASTMCCommonStatementsNode- Parameters:
visitor- the visitor to dispatch to
-
accept
public void accept(MCVarDeclarationStatementsTraverser visitor)
Entry point for the Visitor pattern. Cf. MontiCore handbook chapter 8.- Parameters:
visitor- the visitor to dispatch to
-
accept
public void accept(MCStatementsBasisTraverser visitor)
Entry point for the Visitor pattern. Cf. MontiCore handbook chapter 8.- Specified by:
acceptin interfaceASTMCStatementsBasisNode- Parameters:
visitor- the visitor to dispatch to
-
accept
public void accept(MCBasicTypesTraverser visitor)
Entry point for the Visitor pattern. Cf. MontiCore handbook chapter 8.- Parameters:
visitor- the visitor to dispatch to
-
accept
public void accept(ExpressionsBasisTraverser visitor)
Entry point for the Visitor pattern. Cf. MontiCore handbook chapter 8.- Parameters:
visitor- the visitor to dispatch to
-
accept
public void accept(OOSymbolsTraverser visitor)
Entry point for the Visitor pattern. Cf. MontiCore handbook chapter 8.- Parameters:
visitor- the visitor to dispatch to
-
accept
public void accept(MCBasicsTraverser visitor)
Entry point for the Visitor pattern. Cf. MontiCore handbook chapter 8.- Parameters:
visitor- the visitor to dispatch to
-
accept
public void accept(MCLiteralsBasisTraverser visitor)
Entry point for the Visitor pattern. Cf. MontiCore handbook chapter 8.- Parameters:
visitor- the visitor to dispatch to
-
accept
public void accept(BasicSymbolsTraverser visitor)
Entry point for the Visitor pattern. Cf. MontiCore handbook chapter 8.- Parameters:
visitor- the visitor to dispatch to
-
accept
public void accept(de.monticore.visitor.ITraverser visitor)
Entry point for the Visitor pattern. Cf. MontiCore handbook chapter 8.- Specified by:
acceptin interfacede.monticore.ast.ASTNode- Parameters:
visitor- the visitor to dispatch to
-
_construct
protected ASTSwitchStatement _construct()
-
getEnclosingScope
public IMCCommonStatementsScope getEnclosingScope()
- Specified by:
getEnclosingScopein interfaceASTMCBlockStatement- Specified by:
getEnclosingScopein interfaceASTMCStatement- Specified by:
getEnclosingScopein interfacede.monticore.ast.ASTNode
-
setEnclosingScope
public void setEnclosingScope(IMCCommonStatementsScope enclosingScope)
-
setEnclosingScope
public void setEnclosingScope(IMCVarDeclarationStatementsScope enclosingScope)
-
setEnclosingScope
public void setEnclosingScope(IMCStatementsBasisScope enclosingScope)
- Specified by:
setEnclosingScopein interfaceASTMCBlockStatement- Specified by:
setEnclosingScopein interfaceASTMCStatement
-
setEnclosingScope
public void setEnclosingScope(IMCBasicTypesScope enclosingScope)
-
setEnclosingScope
public void setEnclosingScope(IExpressionsBasisScope enclosingScope)
-
setEnclosingScope
public void setEnclosingScope(IOOSymbolsScope enclosingScope)
-
setEnclosingScope
public void setEnclosingScope(IMCBasicsScope enclosingScope)
-
setEnclosingScope
public void setEnclosingScope(IMCLiteralsBasisScope enclosingScope)
-
setEnclosingScope
public void setEnclosingScope(IBasicSymbolsScope enclosingScope)
-
evaluate
public de.monticore.interpreter.Value evaluate(IMCCommonStatementsInterpreter interpreter)
-
evaluate
public de.monticore.interpreter.Value evaluate(de.monticore.interpreter.ModelInterpreter interpreter)
- Specified by:
evaluatein interfacede.monticore.ast.ASTNode
-
-