jparse.stmt
Class ThrowAST

java.lang.Object
  extended byantlr.BaseAST
      extended byantlr.CommonAST
          extended byantlr.CommonASTWithHiddenTokens
              extended byjparse.JavaAST
                  extended byjparse.stmt.StatementAST
                      extended byjparse.stmt.ThrowAST
All Implemented Interfaces:
antlr.collections.AST, HasExceptions, Serializable

public final class ThrowAST
extends StatementAST

An AST node that represents a throw statement

Author:
Jerry James
See Also:
Serialized Form

Field Summary
private  ExpressionAST throwable
          The object to throw
 
Fields inherited from class jparse.stmt.StatementAST
control, exceptions, next, nonlocal
 
Fields inherited from class jparse.JavaAST
context, currSymTable, noTypes, symTable, topLevel, typeAST
 
Fields inherited from class antlr.CommonASTWithHiddenTokens
hiddenAfter, hiddenBefore
 
Fields inherited from class antlr.CommonAST
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
ThrowAST(antlr.Token token)
          Create a new throw statement AST
 
Method Summary
protected  StatementAST[] computeControl()
          Compute the list of points to which control might flow after this statement
protected  Type[] computeExceptions()
          Compute the checked exception types that might be thrown by this statement
 ExpressionAST getThrowable()
          Get the object to throw
 VarList getVarList()
          Get the list of variables read, written, and declared by this statement
 void parseComplete()
          Compute any derived attributes that must be evaluated after the initial parse.
 
Methods inherited from class jparse.stmt.StatementAST
getExceptionTypes, nextControlPoints
 
Methods inherited from class jparse.JavaAST
print, printHiddenAfter, printHiddenBefore
 
Methods inherited from class antlr.CommonASTWithHiddenTokens
getHiddenAfter, getHiddenBefore, initialize
 
Methods inherited from class antlr.CommonAST
getText, getType, initialize, initialize, setText, setType
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getColumn, getFirstChild, getLine, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

throwable

private ExpressionAST throwable
The object to throw

Constructor Detail

ThrowAST

public ThrowAST(antlr.Token token)
Create a new throw statement AST

Parameters:
token - the token represented by this AST node
Method Detail

parseComplete

public void parseComplete()
Description copied from class: JavaAST
Compute any derived attributes that must be evaluated after the initial parse. The default action is to just tell your children that the parse is complete.

Overrides:
parseComplete in class StatementAST

computeExceptions

protected Type[] computeExceptions()
Description copied from class: StatementAST
Compute the checked exception types that might be thrown by this statement

Specified by:
computeExceptions in class StatementAST
Returns:
an array of types representing the exceptions that this statement might throw

computeControl

protected StatementAST[] computeControl()
Description copied from class: StatementAST
Compute the list of points to which control might flow after this statement

Specified by:
computeControl in class StatementAST
Returns:
a list of statements to which control might pass from this one

getVarList

public VarList getVarList()
Description copied from class: StatementAST
Get the list of variables read, written, and declared by this statement

Specified by:
getVarList in class StatementAST
Returns:
the list of variables read, written, and declared by this statement

getThrowable

public ExpressionAST getThrowable()
Get the object to throw

Returns:
the expression to be evaluated to produce the object to throw