recoder.java.statement
Class EnhancedFor
java.lang.Object
recoder.java.JavaSourceElement
recoder.java.JavaProgramElement
recoder.java.JavaNonTerminalProgramElement
recoder.java.statement.JavaStatement
recoder.java.statement.LoopStatement
recoder.java.statement.EnhancedFor
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, ExpressionContainer, NonTerminalProgramElement, ProgramElement, ScopeDefiningElement, SourceElement, Statement, StatementContainer, VariableScope, ModelElement
public class EnhancedFor
- extends LoopStatement
- implements VariableScope
- Author:
- gutzmann
This file is part of the RECODER library and protected by the LGPL.
- See Also:
- Serialized Form
| Methods inherited from class recoder.java.statement.LoopStatement |
getBody, getChildAt, getChildCount, getChildPositionCode, getExpressionAt, getExpressionCount, getGuard, getInitializers, getStatementAt, getStatementCount, getUpdates, makeParentRoleValid, replaceChild, setBody, setGuard, setInitializers, setUpdates |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnhancedFor
public EnhancedFor()
EnhancedFor
public EnhancedFor(Statement body)
- Parameters:
body -
EnhancedFor
protected EnhancedFor(EnhancedFor proto)
isExitCondition
public boolean isExitCondition()
- Description copied from class:
LoopStatement
- Is exit condition.
- Specified by:
isExitCondition in class LoopStatement
- Returns:
- the boolean value.
isCheckedBeforeIteration
public boolean isCheckedBeforeIteration()
- Description copied from class:
LoopStatement
- Is checked before iteration.
- Specified by:
isCheckedBeforeIteration in class LoopStatement
- Returns:
- the boolean value.
getVariablesInScope
public java.util.List<VariableSpecification> getVariablesInScope()
- Specified by:
getVariablesInScope in interface VariableScope
getVariableInScope
public VariableSpecification getVariableInScope(java.lang.String name)
- Specified by:
getVariableInScope in interface VariableScope
addVariableToScope
public void addVariableToScope(VariableSpecification var)
- Specified by:
addVariableToScope in interface VariableScope
removeVariableFromScope
public void removeVariableFromScope(java.lang.String name)
- Specified by:
removeVariableFromScope in interface VariableScope
isDefinedScope
public boolean isDefinedScope()
- Description copied from interface:
ScopeDefiningElement
- Check if the scope has been set up.
- Specified by:
isDefinedScope in interface ScopeDefiningElement
setDefinedScope
public void setDefinedScope(boolean defined)
- Description copied from interface:
ScopeDefiningElement
- Sets the scope to be defined or undefined. If set to defined, the scope
cache becomes initialized. If set to undefined, the scope cache becomes
erased.
- Specified by:
setDefinedScope in interface ScopeDefiningElement
accept
public void accept(SourceVisitor v)
- Description copied from interface:
SourceElement
- Receive a visitor, for instance a pretty printer.
- Specified by:
accept in interface SourceElement
- Parameters:
v - a source visitor.
deepClone
public EnhancedFor deepClone()
- Description copied from interface:
SourceElement
- Creates a deep clone of the current source element. For
NonTerminalProgramElements, the parent roles are valid, except
that the root element is not included anywhere and hence has no set
parents, of course. This method also clones Comment
s, but does not clone derived information such as scopes.
- Specified by:
deepClone in interface SourceElement- Specified by:
deepClone in interface Statement- Specified by:
deepClone in class LoopStatement