oracle.javatools.parser.java.v2.model.statement
Interface SourceTryStatement
- All Superinterfaces:
- Element, SourceBlockElement, SourceCompoundStatement, SourceElement, SourceStatement
public interface SourceTryStatement
- extends SourceCompoundStatement
A try statement. JLS3 14.20.
Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceElement |
addSelf, addSelf, addSelfAfter, addSelfBefore, clearBinding, cloneSelf, compile, getBinding, getChildren, getChildren, getCompiledObject, getContainedElements, getEndOffset, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelf |
getResourceVariables
java.util.List getResourceVariables()
- Get the list of resource variables for the try, which is syntax
new for JDK 7 and beyond
- Returns:
- A list of SourceLocalVariableDeclarations which can be
empty but will not be null
getCatchClauses
java.util.List getCatchClauses()
- Returns:
- The array of catch clauses. Returns a collection of
SourceCatchClause's.
getFinallyClause
SourceFinallyClause getFinallyClause()
- Returns:
- The finally clause if present.
getCaughtExceptions
java.util.List getCaughtExceptions()
- Get the list of the exceptions caught in all the catch blocks
- Returns:
- A list of JavaTypes which might be empty, but will not be null
Copyright © 1997, 2013, Oracle. All rights reserved.