try { ... } catch (Exception e) { ... } the CatchClause
is catch (Exception e) { ... }. Exception e is the parameter. The { ... } is the body.
| Access | Constructor and Description |
|---|---|
| public | |
| public | CatchClause(final NodeList<Modifier> exceptModifier, final NodeList<AnnotationExpr> exceptAnnotations, final ClassOrInterfaceType exceptType, final SimpleName exceptName, final BlockStmt body)
|
| public | |
| public | CatchClause(TokenRange tokenRange, Parameter parameter, BlockStmt body)
This constructor is used by the parser and is considered private. |
| Modifier and Type | Method and Description |
|---|---|
| public <R, A> R | accept(final GenericVisitor<R, A>
the visitor implementation v, final A the argument passed to the visitor (of type A) arg)Implements com. |
| public <A> void | accept(final VoidVisitor<A>
the visitor implementation v, final A any value relevant for the visitor (of type A) arg)Implements com. |
| public CatchClause | |
| public BlockStmt | |
| public CatchClauseMetaModel | |
| public Parameter | |
| public boolean | |
| public boolean | |
| public CatchClause | setBody(final BlockStmt body)
Implements com. |
| public CatchClause |
| body | back to summary |
|---|---|
| private BlockStmt body | |
| parameter | back to summary |
|---|---|
| private Parameter parameter | |
| CatchClause | back to summary |
|---|---|
| public CatchClause() | |
| CatchClause | back to summary |
|---|---|
| public CatchClause(final NodeList<Modifier> exceptModifier, final NodeList<AnnotationExpr> exceptAnnotations, final ClassOrInterfaceType exceptType, final SimpleName exceptName, final BlockStmt body) | |
| CatchClause | back to summary |
|---|---|
public CatchClause(final Parameter parameter, final BlockStmt body)
| |
| CatchClause | back to summary |
|---|---|
| public CatchClause(TokenRange tokenRange, Parameter parameter, BlockStmt body) This constructor is used by the parser and is considered private.
| |
| accept | back to summary |
|---|---|
| public <R, A> R accept(final GenericVisitor<R, A> v, final A arg) Implements com. Doc from com. Accept method for visitor support.
| |
| accept | back to summary |
|---|---|
| public <A> void accept(final VoidVisitor<A> v, final A arg) Implements com. Doc from com. Accept method for visitor support.
| |
| clone | back to summary |
|---|---|
| public CatchClause clone() Overrides com. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| getBody | back to summary |
|---|---|
| public BlockStmt getBody() Implements com.
| |
| getMetaModel | back to summary |
|---|---|
| public CatchClauseMetaModel getMetaModel() Overrides com.
| |
| getParameter | back to summary |
|---|---|
| public Parameter getParameter() Note that the type of the Parameter can be a UnionType. In this case, any annotations found at the start of the catch(@X A a |...) are found directly in the Parameter. Annotations that are on the second or later type - catch(A a | @X B b ...) are found on those types.
| |
| remove | back to summary |
|---|---|
| public boolean remove(Node node) Overrides com.
| |
| replace | back to summary |
|---|---|
| public boolean replace(Node node, Node replacementNode) Overrides com.
| |
| setBody | back to summary |
|---|---|
| public CatchClause setBody(final BlockStmt body) Implements com.
| |
| setParameter | back to summary |
|---|---|
public CatchClause setParameter(final Parameter parameter)
| |