public static final class Java.TryStatement extends Java.Statement
| Modifier and Type | Class and Description |
|---|---|
static class |
Java.TryStatement.LocalVariableDeclaratorResource
Representation of a JLS9 14.20.2 "local-variable-declarator resource" in a TRY-with-resources statement.
|
static class |
Java.TryStatement.Resource
Representation of a JLS9 14.20.2 "resource" in a TRY-with-resources statement.
|
static class |
Java.TryStatement.VariableAccessResource
Representation of a JLS9 14.20.2 "variable-access resource" in a TRY-with-resources statement.
|
| Modifier and Type | Field and Description |
|---|---|
Java.BlockStatement |
body
The body of the TRY statement.
|
List<Java.CatchClause> |
catchClauses
The list of catch clauses (including the "default" clause) of the TRY statement.
|
Java.Block |
finallY
The optional "finally" block of the TRY statement.
|
List<Java.TryStatement.Resource> |
resources
The "resources" managed by the TRY-with-resources statement.
|
localVariablesNOWHERE| Constructor and Description |
|---|
TryStatement(Location location,
Java.BlockStatement body,
List<Java.CatchClause> catchClauses)
A TRY statement with no resources and no FINALLY clause.
|
TryStatement(Location location,
List<Java.TryStatement.Resource> resources,
Java.BlockStatement body,
List<Java.CatchClause> catchClauses)
A TRY statement without a FINALLY clause.
|
TryStatement(Location location,
List<Java.TryStatement.Resource> resources,
Java.BlockStatement body,
List<Java.CatchClause> catchClauses,
Java.Block finallY) |
| Modifier and Type | Method and Description |
|---|---|
<R,EX extends Throwable> |
accept(Visitor.BlockStatementVisitor<R,EX> visitor)
Invokes the "
visit...()" method of Visitor.BlockStatementVisitor for the concrete
Java.BlockStatement type. |
String |
toString() |
findLocalVariable, getEnclosingScope, setEnclosingScopegetLocation, throwCompileExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLocation, throwCompileExceptionpublic final List<Java.TryStatement.Resource> resources
public final Java.BlockStatement body
public final List<Java.CatchClause> catchClauses
@Nullable public final Java.Block finallY
public TryStatement(Location location, Java.BlockStatement body, List<Java.CatchClause> catchClauses)
public TryStatement(Location location, List<Java.TryStatement.Resource> resources, Java.BlockStatement body, List<Java.CatchClause> catchClauses)
public TryStatement(Location location, List<Java.TryStatement.Resource> resources, Java.BlockStatement body, List<Java.CatchClause> catchClauses, @Nullable Java.Block finallY)
@Nullable public <R,EX extends Throwable> R accept(Visitor.BlockStatementVisitor<R,EX> visitor) throws EX extends Throwable
Java.BlockStatementvisit...()" method of Visitor.BlockStatementVisitor for the concrete
Java.BlockStatement type.EX extends ThrowableCopyright © 2019. All rights reserved.