recoder.java.statement
Class For
java.lang.Object
recoder.java.JavaSourceElement
recoder.java.JavaProgramElement
recoder.java.JavaNonTerminalProgramElement
recoder.java.statement.JavaStatement
recoder.java.statement.LoopStatement
recoder.java.statement.For
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, ExpressionContainer, NonTerminalProgramElement, ProgramElement, ScopeDefiningElement, SourceElement, Statement, StatementContainer, VariableScope, ModelElement
public class For
- extends LoopStatement
- implements VariableScope
For.
- Author:
- AutoDoc
- 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 |
For
public For()
- For.
For
public For(ASTList<LoopInitializer> inits,
Expression guard,
ASTList<Expression> updates,
Statement body)
- For.
- Parameters:
inits - a loop initializer mutable list.guard - an expression.updates - an expression mutable list.body - a statement.
For
protected For(For proto)
- For.
- Parameters:
proto - a for.
deepClone
public For deepClone()
- Deep clone.
- Specified by:
deepClone in interface SourceElement- Specified by:
deepClone in interface Statement- Specified by:
deepClone in class LoopStatement
- Returns:
- the object.
getLastElement
public SourceElement getLastElement()
- Description copied from class:
JavaSourceElement
- Finds the source element that occurs last in the source. The default
implementation returns this element, which is correct for all terminal
program elements, and many non terminals such as statements and prefixed
operators.
- Specified by:
getLastElement in interface SourceElement- Overrides:
getLastElement in class JavaSourceElement
- Returns:
- the last source element in the syntactical representation of this
element, may be equals to this element.
- See Also:
JavaSourceElement.toSource(),
JavaSourceElement.getEndPosition()
isExitCondition
public boolean isExitCondition()
- Is exit condition.
- Specified by:
isExitCondition in class LoopStatement
- Returns:
- the boolean value.
isCheckedBeforeIteration
public boolean isCheckedBeforeIteration()
- Is checked before iteration.
- Specified by:
isCheckedBeforeIteration in class LoopStatement
- Returns:
- the boolean value.
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
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
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.