|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcetus.hir.Statement
cetus.hir.ForLoop
public class ForLoop
| Field Summary |
|---|
| Fields inherited from class cetus.hir.Statement |
|---|
annotations, children, line_number, object_print_method, parent |
| Constructor Summary | |
|---|---|
ForLoop(Statement init,
Expression condition,
Expression step,
Statement body)
|
|
| Method Summary | |
|---|---|
void |
addDeclaration(Declaration decl)
Add a declaration to the end of the set of declarations and place the declared symbols in the symbol table. |
void |
addDeclarationAfter(Declaration ref,
Declaration decl)
Add a declaration after the reference declaration. |
void |
addDeclarationBefore(Declaration ref,
Declaration decl)
Add a declaration before the reference declaration. |
static void |
defaultPrint(ForLoop loop,
java.io.OutputStream stream)
Prints a loop to a stream. |
Declaration |
findSymbol(IDExpression name)
Retrieves the declaration for a symbol, possibly searching through parent symbol tables. |
Statement |
getBody()
Returns the statement that is the body of the loop. |
Expression |
getCondition()
Returns the expression that determines the duration of the loop. |
Statement |
getInitialStatement()
|
java.util.List<SymbolTable> |
getParentTables()
Returns a list of symbol tables that are parents of this table in the distributed symbol table graph. |
Expression |
getStep()
|
java.util.HashMap<IDExpression,Declaration> |
getTable()
Provides direct access to the symbol table; it's generally not a good idea to modify this directly. |
void |
setBody(Statement body)
|
static void |
setClassPrintMethod(java.lang.reflect.Method m)
Overrides the class print method, so that all subsequently created objects will use the supplied method. |
void |
setCondition(Expression cond)
|
void |
setInitialStatement(Statement stmt)
|
void |
setStep(Expression step)
|
java.lang.String |
toString()
Returns a string representation of this statement; every child class should implement this method. |
| Methods inherited from class cetus.hir.Statement |
|---|
annotate, annotateAfter, annotateBefore, annotationToString, clone, containsAnnotation, detach, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getChildren, getParent, getProcedure, print, removeAnnotations, removeAnnotations, removeChild, setChild, setLineNumber, setParent, setPrintMethod, swapWith, toAnnotatedString, verify, where |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ForLoop(Statement init,
Expression condition,
Expression step,
Statement body)
| Method Detail |
|---|
public void addDeclaration(Declaration decl)
SymbolTable
addDeclaration in interface SymbolTabledecl - The declaration to add.
public void addDeclarationBefore(Declaration ref,
Declaration decl)
SymbolTable
addDeclarationBefore in interface SymbolTableref - The reference point.decl - The declaration to add.
public void addDeclarationAfter(Declaration ref,
Declaration decl)
SymbolTable
addDeclarationAfter in interface SymbolTableref - The reference point.decl - The declaration to add.
public static void defaultPrint(ForLoop loop,
java.io.OutputStream stream)
loop - The loop to print.stream - The stream on which to print the loop.public java.lang.String toString()
Statement
toString in class Statementpublic Declaration findSymbol(IDExpression name)
SymbolTable
findSymbol in interface SymbolTablename - The name of the symbol.public Statement getBody()
Loop
getBody in interface Looppublic Expression getCondition()
Loop
getCondition in interface Looppublic Statement getInitialStatement()
public java.util.List<SymbolTable> getParentTables()
SymbolTable
getParentTables in interface SymbolTablepublic Expression getStep()
public java.util.HashMap<IDExpression,Declaration> getTable()
SymbolTable
getTable in interface SymbolTablepublic void setBody(Statement body)
public static void setClassPrintMethod(java.lang.reflect.Method m)
m - The new print method.public void setCondition(Expression cond)
public void setInitialStatement(Statement stmt)
public void setStep(Expression step)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||