|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.Utils
org.multijava.util.compiler.Phylum
org.multijava.mjc.JPhylum
org.multijava.mjc.JCatchClause
This class represents a catch clause in the syntax tree.
| Field Summary | |
private JBlock |
body
|
private int |
catchPC
|
private JFormalParameter |
exception
|
private boolean |
reached
Indicates that this catch clause has been reached during control flow analysis. |
| Fields inherited from class org.multijava.mjc.JPhylum |
EMPTY |
| Fields inherited from class org.multijava.util.compiler.Phylum |
|
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
JCatchClause(TokenReference where,
JFormalParameter exception,
JBlock body)
Constructs a node in the parsing tree. |
|
| Method Summary | |
void |
accept(MjcVisitor p)
Accepts the specified visitor |
JBlock |
body()
|
void |
checkInterface(CFlowControlContextType context)
Checks the type of the caught exception. |
JFormalParameter |
exception()
|
void |
genCode(CodeSequence code)
Generates a sequence of bytecodes |
void |
genExceptionHandler(CodeSequence code,
int startPC,
int endPC)
Generates a sequence of bytecodes |
CClassType |
getType()
getType |
boolean |
isReached()
Indicates that this catch clause has been reached during control flow analysis. |
void |
typecheck(CFlowControlContextType context)
Typechecks this catch clause and modifies the context to indicate that this catch clause is reachable. |
| Methods inherited from class org.multijava.mjc.JPhylum |
check, check, check, check, fail, fail, fail, warn, warn, warn, warn |
| Methods inherited from class org.multijava.util.compiler.Phylum |
getTokenReference, setTokenReference |
| Methods inherited from class org.multijava.util.Utils |
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private JFormalParameter exception
private JBlock body
private boolean reached
private int catchPC
| Constructor Detail |
public JCatchClause(TokenReference where,
JFormalParameter exception,
JBlock body)
where - the line of this node in the source codeexception - the exception to be caughtbody - the block to be executed if the exception is
caught| Method Detail |
public JFormalParameter exception()
public JBlock body()
public CClassType getType()
public boolean isReached()
public void checkInterface(CFlowControlContextType context)
throws PositionedError
context - the actual context of analysis
PositionedError - if the check fails
public void typecheck(CFlowControlContextType context)
throws PositionedError
context - the context in which this clause appears
PositionedError - if the check fails public void accept(MjcVisitor p)
p - the visitorpublic void genCode(CodeSequence code)
code - the code list
public void genExceptionHandler(CodeSequence code,
int startPC,
int endPC)
code - the code list
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||