|
Extension SDK 9.0.5 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The JotTry
interface represents a try
statement.
A try
statement contains a code block, zero or more
catch
clauses, and an optional finally
clause.
A valid try
statement must include either at least one
catch
clause or a finally
clause. The statement
has the form:
try { ... } catch (Exception ex) { ... } finally { ... }
Field Summary |
Fields inherited from interface oracle.jdeveloper.jot.JotStatement |
BLOCK_STATEMENT, BREAK_STATEMENT, CASE_CLAUSE, CONTINUE_STATEMENT, DO_STATEMENT, ELSE_CLAUSE, EMPTY_STATEMENT, EXPRESSION_STATEMENT, FOR_STATEMENT, IF_STATEMENT, RETURN_STATEMENT, SWITCH_STATEMENT, SYNCHRONIZED_STATEMENT, THROW_STATEMENT, TRY_STATEMENT, WHILE_STATEMENT |
Fields inherited from interface oracle.jdeveloper.jot.JotBlockElement |
LOCAL_CLASS_TYPE, STATEMENT_TYPE, VARIABLE_DECLARATION_TYPE |
Method Summary | |
JotCatch |
addCatchClause(JotCatch marker,
boolean before,
java.lang.String eType,
java.lang.String eName)
Adds a new catch clause. |
JotCatch |
addCatchClause(java.lang.String eType,
java.lang.String eName)
Adds a new catch clause at the end of the list of
catch clauses. |
JotCodeBlock |
addFinallyBlock()
Adds a finally block. |
JotCatch[] |
getCatchClauses()
Retrieves the catch clauses associated with this
try . |
JotCodeBlock |
getFinallyBlock()
Retrieves the finally code block. |
void |
removeCatchClause(JotCatch catchClause)
Removes an existing catch clause. |
void |
removeFinallyBlock()
Removes the finally clause. |
Methods inherited from interface oracle.jdeveloper.jot.JotStatement |
addLabel, getAsBlock, getAsBreak, getAsCase, getAsContinue, getAsDo, getAsExpressionStatement, getAsFor, getAsIf, getAsReturn, getAsSwitch, getAsSynchronized, getAsThrow, getAsTry, getAsWhile, getLabels, getStatementText, getStatementType, removeLabel |
Methods inherited from interface oracle.jdeveloper.jot.JotBlockElement |
getAsLocalClass, getAsStatement, getAsVariableDeclaration, getElementType |
Methods inherited from interface oracle.jdeveloper.jot.JotCodeElement |
addPrecedingComment, childrenContainErrors, delete, getContainingJotFile, getLeftWhitespace, getLength, getRightWhitespace, isInError, isSource, setLeftWhitespace, setRightWhitespace |
Methods inherited from interface oracle.jdeveloper.jot.JotElement |
getChildren, getContainedElements, getElementName, getEndOffset, getID, getJotWorkArea, getParent, getStartOffset, isExistent, isReadOnly, isStructureKnown, setParent |
Methods inherited from interface oracle.jdeveloper.jot.JotHasCodeBlock |
getCodeBlock, setCodeBlockText |
Method Detail |
public JotCatch[] getCatchClauses() throws JotInvalidElementException
catch
clauses associated with this
try
.
JotInvalidElementException
public JotCatch addCatchClause(JotCatch marker, boolean before, java.lang.String eType, java.lang.String eName) throws JotInvalidElementException
catch
clause.
marker
- the catch
to position relative to.before
- whether to position the new catch
before or after
the marker catch
; or, if the marker is
null
, whether to position the new
catch
at the beginning or the end of the
argumentcatch
list.eType
- the exception typeeName
- the exception variable name
catch
as a JotCatch.
JotInvalidElementException
public JotCatch addCatchClause(java.lang.String eType, java.lang.String eName) throws JotInvalidElementException
catch
clause at the end of the list of
catch
clauses.
eType
- the exception typeeName
- the exception variable name
catch
as a JotCatch.
JotInvalidElementException
public void removeCatchClause(JotCatch catchClause) throws JotInvalidElementException
catch
clause.
JotInvalidElementException
public JotCodeBlock getFinallyBlock() throws JotInvalidElementException
finally
code block. If this try
statement does not have a finally
clause, null
is returned.
JotInvalidElementException
public JotCodeBlock addFinallyBlock() throws JotInvalidElementException
finally
block. If the finally
clause
already exists, the existing one is returned.
JotInvalidElementException
public void removeFinallyBlock() throws JotInvalidElementException
finally
clause.
JotInvalidElementException
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.