Package org.codehaus.janino
Class Java.CatchClause
- java.lang.Object
-
- org.codehaus.janino.Java.Located
-
- org.codehaus.janino.Java.CatchClause
-
- All Implemented Interfaces:
Java.Locatable,Java.Scope
- Enclosing class:
- Java
public static class Java.CatchClause extends Java.Located implements Java.Scope
Representation of a JLS7 14.20.1 CATCH clause.
-
-
Field Summary
Fields Modifier and Type Field Description Java.BlockStatementbodyBody of the CATCH clause.Java.CatchParametercatchParameterContainer for the types and the name of the caught exception.private Java.TryStatementenclosingTryStatementLink to the enclosing TRY statement.booleanreachableFlag for catch clause reachability analysis.-
Fields inherited from class org.codehaus.janino.Java.Located
NOWHERE
-
-
Constructor Summary
Constructors Constructor Description CatchClause(Location location, Java.CatchParameter catchParameter, Java.BlockStatement body)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Java.ScopegetEnclosingScope()voidsetEnclosingTryStatement(Java.TryStatement enclosingTryStatement)Links this CATCH clause to the enclosing TRY statement.java.lang.StringtoString()-
Methods inherited from class org.codehaus.janino.Java.Located
getLocation, throwCompileException
-
-
-
-
Field Detail
-
catchParameter
public final Java.CatchParameter catchParameter
Container for the types and the name of the caught exception.
-
body
public final Java.BlockStatement body
Body of the CATCH clause.
-
enclosingTryStatement
@Nullable private Java.TryStatement enclosingTryStatement
Link to the enclosing TRY statement.
-
reachable
public boolean reachable
Flag for catch clause reachability analysis.
-
-
Constructor Detail
-
CatchClause
public CatchClause(Location location, Java.CatchParameter catchParameter, Java.BlockStatement body)
-
-
Method Detail
-
setEnclosingTryStatement
public void setEnclosingTryStatement(Java.TryStatement enclosingTryStatement)
Links this CATCH clause to the enclosing TRY statement.
-
getEnclosingScope
public Java.Scope getEnclosingScope()
- Specified by:
getEnclosingScopein interfaceJava.Scope- Returns:
- The scope that encloses this scope, or
null
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-