|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectentities.Expression
entities.CaseExpression
The class CaseExpression represents the statements in a case block
Field Summary |
Fields inherited from class entities.Expression |
fCast, fFile, fLBracketPosition, fOperator, fParentScope, fPosition, fPreviousExpression, fRBracketPosition, fToTrace, fTypeOfCast, SEPARATORS |
Constructor Summary | |
CaseExpression(ScopeManager parentScope)
|
Method Summary | |
void |
addExpression(Expression expr,
ScopeManager wrapper)
Add an Expression object associated with a statement inside the case block to the current CaseExpression object. |
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()
|
java.lang.String |
getString()
|
Expression |
getValue()
|
void |
print(java.lang.String indentation)
Print all information contained in this Expression |
void |
setLBracketPosition(int position)
Empty |
void |
setRBracketPosition(int position)
Empty |
void |
setValue(Expression expr)
The parameter "expr" (of type Expression) is used to represent the expression found after "case" and before ":" |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CaseExpression(ScopeManager parentScope)
Method Detail |
public java.util.Vector getBody()
public Expression getValue()
Ex: case 5:
In this case returns the Expression correponding to "5"
public java.lang.String getString()
getString
in class Expression
public void setValue(Expression expr)
entities.Expression#getValue
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 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 |