|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--at.dms.util.Utils | +--at.dms.compiler.Phylum | +--at.dms.kjc.JPhylum | +--at.dms.kjc.JCatchClause
This class represents a catch clause declaration in the syntax tree.
Fields inherited from class at.dms.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
Fields inherited from interface at.dms.kjc.Constants |
CMP_VERSION, JAV_CLASS, JAV_CLONE, JAV_CLONEABLE, JAV_CONSTRUCTOR, JAV_ERROR, JAV_EXCEPTION, JAV_INIT, JAV_LENGTH, JAV_NAME_SEPARATOR, JAV_OBJECT, JAV_OUTER_THIS, JAV_RUNTIME, JAV_RUNTIME_EXCEPTION, JAV_STATIC_INIT, JAV_STRING, JAV_STRINGBUFFER, JAV_THIS, JAV_THROWABLE, OPE_BAND, OPE_BNOT, OPE_BOR, OPE_BSR, OPE_BXOR, OPE_EQ, OPE_GE, OPE_GT, OPE_LE, OPE_LNOT, OPE_LT, OPE_MINUS, OPE_NE, OPE_PERCENT, OPE_PLUS, OPE_POSTDEC, OPE_POSTINC, OPE_PREDEC, OPE_PREINC, OPE_SIMPLE, OPE_SL, OPE_SLASH, OPE_SR, OPE_STAR, TID_ARRAY, TID_BOOLEAN, TID_BYTE, TID_CHAR, TID_CLASS, TID_DOUBLE, TID_FLOAT, TID_INT, TID_LONG, TID_SHORT, TID_VOID |
Constructor Summary | |
JCatchClause(TokenReference where,
JFormalParameter exception,
JBlock body)
Construct a node in the parsing tree. |
Method Summary | |
void |
accept(KjcVisitor p)
Accepts the specified visitor. |
void |
checkBody(CBodyContext context)
Check statement. |
void |
checkInterface(CBodyContext context)
Check statement. |
void |
genCode(CodeSequence code)
Generates a sequence of bytecodes. |
void |
genExceptionHandler(CodeSequence code,
int startPC,
int endPC)
Adds exception handler code for this catch clause to the code sequence being generated for this method. |
JBlock |
getBody()
Returns the body of the catch clause. |
JFormalParameter |
getException()
Returns the parameter declaration for the exception caught by this catch clause. |
CClassType |
getType()
Returns the type of the exception caught by this catch clause. |
boolean |
isBodyChecked()
Whether the checkBody method has already been called. |
boolean |
isUsed()
Returns whether this clause is used. |
void |
setUsed(boolean flag)
Sets whether this clause is used. |
Methods inherited from class at.dms.kjc.JPhylum |
check, check, check, check, fail |
Methods inherited from class at.dms.compiler.Phylum |
getTokenReference, setTokenReference |
Methods inherited from class at.dms.util.Utils |
assert, assert, fail, fail, hasFlag, hasMoreThanOneFlag, hasOtherFlags, splitQualifiedName, splitQualifiedName, vectorToArray, vectorToIntArray |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public JCatchClause(TokenReference where, JFormalParameter exception, JBlock body)
where
- The line of this node in the source code.ident
- The name of this variable.initializer
- The initializer.Method Detail |
public CClassType getType()
public JBlock getBody()
public boolean isUsed()
public void setUsed(boolean flag)
public JFormalParameter getException()
public boolean isBodyChecked()
public void checkInterface(CBodyContext context) throws PositionedError
context
- The actual context of analyse.PositionedError
- If the check fails.public void checkBody(CBodyContext context) throws PositionedError
context
- The actual context of analyse.PositionedError
- If the check fails.public void accept(KjcVisitor p)
accept
in class JPhylum
p
- The visitor.public void genCode(CodeSequence code)
code
- The code list.public void genExceptionHandler(CodeSequence code, int startPC, int endPC)
code
- The code sequence.startPC
- The index of the first bytecode instruction protected by this catch
clause.endPC
- The index immediately after the last bytecode instruction protected by
this catch clause.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |