entities
Class CatchExpression

java.lang.Object
  extended byentities.Expression
      extended byentities.CatchExpression
All Implemented Interfaces:
ScopeManager

public class CatchExpression
extends Expression

The class CatchExpression represents the statements in a catch block


Field Summary
 
Fields inherited from class entities.Expression
fCast, fFile, fLBracketPosition, fOperator, fParentScope, fPosition, fPreviousExpression, fRBracketPosition, fToTrace, fTypeOfCast, SEPARATORS
 
Constructor Summary
CatchExpression(ScopeManager parentScope)
           
 
Method Summary
 void addExpression(Expression expr, ScopeManager wrapper)
          Add an Expression object to the current Expression
 void addParameters(java.util.Vector parameters)
          The parameter "parameters" is used to represent the parameters of the catch statement
 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.util.Vector getParameters()
           
 java.lang.String getString()
           
 void print(java.lang.String indentation)
          Print all information contained in this Expression
 void setLBracketPosition(int position)
          Empty
 void setRBracketPosition(int position)
          Empty
 
Methods inherited from class entities.Expression
addClass, addClassHeaderFile, addEnumerator, addExternalField, addExternalMethod, addField, addFriendClass, addFriendFunction, addFriendMethod, addFunction, addGeneralization, addMethod, addNameSpace, addType, addUserType, cleanType, computeType, fillName, fillNameNew, getAllocationType, getCast, getCastType, getClassContext, getContainingMethod, getContext, getContextNew, getCurrentMethod, getFile, getLBracketPosition, getName, getOperator, getOperators, getParent, getParentScope, getPosition, getPreviousExpression, getRBracketPosition, getType, getTypeOfCast, propagateParentScope, resolveType, setCast, setFile, setOperator, setParentScope, setPosition, setPreviousExpression, setTypeOfCast
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatchExpression

public CatchExpression(ScopeManager parentScope)
Method Detail

getParameters

public java.util.Vector getParameters()
Returns:
a Vector of Parameter objects corresponding to the parameters of the catch statement.

getBody

public java.util.Vector getBody()
Returns:
the Vector of the Expression objects contained in the catch statement.

getString

public java.lang.String getString()
Overrides:
getString in class Expression
Returns:
the representation of the Expression as a String (it is not a thorough reconstruction)

addVariable

public void addVariable(Variable var)
Add a Variable object corresponding to a local variable to the current Expression.

Specified by:
addVariable in interface ScopeManager
Overrides:
addVariable in class Expression

addParameters

public void addParameters(java.util.Vector parameters)
The parameter "parameters" is used to represent the parameters of the catch statement

Ex: class Overflow {..}; main() {... try {...} catch (Overflow& o){..}} {

The string "Overflow& o" is represented as a Parameter object.


findVariableType

public ScopeManager findVariableType(java.lang.String nameToBeFound,
                                     java.lang.StringBuffer typeToBeFound,
                                     Expression expr)
Description copied from class: Expression
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.

Specified by:
findVariableType in interface ScopeManager
Overrides:
findVariableType in class Expression

addExpression

public void addExpression(Expression expr,
                          ScopeManager wrapper)
Add an Expression object to the current Expression

Specified by:
addExpression in interface ScopeManager
Overrides:
addExpression in class Expression

setLBracketPosition

public void setLBracketPosition(int position)
Description copied from class: Expression
Empty

Overrides:
setLBracketPosition in class Expression
Parameters:
position - represents the position of "{", if present

setRBracketPosition

public void setRBracketPosition(int position)
Description copied from class: Expression
Empty

Overrides:
setRBracketPosition in class Expression
Parameters:
position - represents the position of "}", if present

print

public void print(java.lang.String indentation)
Print all information contained in this Expression

Specified by:
print in interface ScopeManager
Overrides:
print in class Expression