|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectentities.Expression
entities.ForExpression
The class ForExpression represents a for statement
Field Summary |
Fields inherited from class entities.Expression |
fCast, fFile, fLBracketPosition, fOperator, fParentScope, fPosition, fPreviousExpression, fRBracketPosition, fToTrace, fTypeOfCast, SEPARATORS |
Constructor Summary | |
ForExpression(ScopeManager parentScope)
|
Method Summary | |
void |
addExpression(Expression expr,
ScopeManager wrapper)
Add an Expression object associated with a statement inside the for statement to the current Expression |
void |
addVariable(Variable var)
Add a Variable object corresponding to a local variable to the current Expression. |
ScopeManager |
findVariableType(java.lang.String nameToBeFound,
java.lang.StringBuffer typeToBeFound,
Expression expr)
Look for the variable declaration whose name is "nameToBeFound" and return the ScopeManager in which it is defined (if found), filling "typeToBeFound" with the variabl type. |
java.util.Vector |
getBody()
|
Expression |
getCondition()
|
Expression |
getIncrement()
|
Expression |
getInitialization()
|
java.lang.String |
getString()
|
void |
print(java.lang.String indentation)
Print all information contained in a expression of type ForExpression |
void |
setCondition(Expression expr,
ScopeManager wrapper)
The Expression "expr" is used to represent the condition in the for statement |
void |
setIncrement(Expression expr,
ScopeManager wrapper)
The Expression "expr" is used to represent the increment in the for statement |
void |
setInitialization()
Set the Expression corresponding to the initialization part of for statement |
void |
setInitialization(Expression expr,
ScopeManager wrapper)
The Expression "expr" is used to represent the initialization part of the for statement |
void |
setInitialization(ScopeManager wrapper)
Set the Expression corresponding to the initialization part of for statement |
void |
setLBracketPosition(int position)
Empty |
void |
setRBracketPosition(int position)
Empty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ForExpression(ScopeManager parentScope)
Method Detail |
public Expression getInitialization()
Ex: for(i=0; i<10; i++) {...}It returns the Assignment corresponding to the statement "i=0"
public Expression getCondition()
Ex: for(i=0; i<10; i++) {...}It returns the CompositeExpression corresponding to the statement "i<0"
public Expression getIncrement()
Ex: for(i=0; i<10; i++) {...}It returns the AssignmentExpression corresponding to the statement "i++"
public java.util.Vector getBody()
public void setInitialization()
public void setInitialization(ScopeManager wrapper)
public java.lang.String getString()
getString
in class Expression
public void addVariable(Variable var)
addVariable
in interface ScopeManager
addVariable
in class Expression
public void addExpression(Expression expr, ScopeManager wrapper)
addExpression
in interface ScopeManager
addExpression
in class Expression
public void setInitialization(Expression expr, ScopeManager wrapper)
Ex: for(i=0; i<10; i++) {...}
In this case "expr" represents the expression (of type CompositeExpression) corresponding to "i=0;"
public void setCondition(Expression expr, ScopeManager wrapper)
Ex: for(i=0; i<10; i++) {...}In this case "expr" represents the expression (of type CompositeExpression) corresponding to "i<0;"
public void setIncrement(Expression expr, ScopeManager wrapper)
Ex: for(i=0; i<10; i++) {...}In this case "expr" represents the expression (of type Assignment) corresponding to "i++;"
public ScopeManager findVariableType(java.lang.String nameToBeFound, java.lang.StringBuffer typeToBeFound, Expression expr)
Expression
findVariableType
in interface ScopeManager
findVariableType
in class Expression
public void setLBracketPosition(int position)
Expression
setLBracketPosition
in class Expression
position
- represents the position of "{", if presentpublic void setRBracketPosition(int position)
Expression
setRBracketPosition
in class Expression
position
- represents the position of "}", if presentpublic void print(java.lang.String indentation)
print
in interface ScopeManager
print
in class Expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |