|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectentities.Expression
entities.WhileExpression
The class WhileExpression represents an while-statement
Field Summary |
Fields inherited from class entities.Expression |
fCast, fFile, fLBracketPosition, fOperator, fParentScope, fPosition, fPreviousExpression, fRBracketPosition, fToTrace, fTypeOfCast, SEPARATORS |
Constructor Summary | |
WhileExpression(ScopeManager parentScope)
|
Method Summary | |
void |
addExpression(Expression expr,
ScopeManager wrapper)
Add an Expression object associated with a statement inside the the while statement |
void |
addVariable(Variable var)
Empty |
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()
|
java.lang.String |
getString()
|
void |
print(java.lang.String indentation)
Empty |
void |
setCondition(Expression expr,
ScopeManager wrapper)
The expression "expr" is used to represent the condition after the keyword "while" |
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 WhileExpression(ScopeManager parentScope)
Method Detail |
public Expression getCondition()
Ex: while (i>0) {...}In this case it returns the CompositeExpression corresponding to the statement "i>0"
public java.util.Vector getBody()
public java.lang.String getString()
getString
in class Expression
public void addVariable(Variable var)
Expression
addVariable
in interface ScopeManager
addVariable
in class Expression
var
- represents a local variable declared inside the while
blockpublic void addExpression(Expression expr, ScopeManager wrapper)
addExpression
in interface ScopeManager
addExpression
in class Expression
public void setCondition(Expression expr, ScopeManager wrapper)
Ex: while (a>b) {...}The parameter "expr" represents the expression "a>b"
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)
Expression
print
in interface ScopeManager
print
in class Expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |