|
Extension SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The JotStatement interface represents a statement in a Java source
file. Statements fall into one of 15 types; the
getStatementType method can be used to determine
the type of a JotStatement.
| Field Summary | |
static int |
BLOCK_STATEMENT
The statement type for code blocks. |
static int |
BREAK_STATEMENT
The statement type for break statements |
static int |
CASE_CLAUSE
The statement type for case clauses. |
static int |
CONTINUE_STATEMENT
The statement type for continue statements |
static int |
DO_STATEMENT
The statement type for do statements |
static int |
ELSE_CLAUSE
The statement type for else clauses. |
static int |
EMPTY_STATEMENT
The statement for an empty statement. |
static int |
EXPRESSION_STATEMENT
The statement type for expression statements |
static int |
FOR_STATEMENT
The statement type for for statements |
static int |
IF_STATEMENT
The statement type for if statements |
static int |
RETURN_STATEMENT
The statement type for return statements |
static int |
SWITCH_STATEMENT
The statement type for switch statements |
static int |
SYNCHRONIZED_STATEMENT
The statement type for synchronized statements |
static int |
THROW_STATEMENT
The statement type for throw statements |
static int |
TRY_STATEMENT
The statement type for try statements |
static int |
WHILE_STATEMENT
The statement type for while statements |
| Fields inherited from interface oracle.jdeveloper.jot.JotBlockElement |
LOCAL_CLASS_TYPE, STATEMENT_TYPE, VARIABLE_DECLARATION_TYPE |
| Method Summary | |
void |
addLabel(java.lang.String label)
Add a label to this statement. |
JotBlockStatement |
getAsBlock()
Retrieves the JotBlockStatement representing this
statement if it is a block statement. |
JotBreak |
getAsBreak()
Retrieves the JotBreak representing this
statement if it is a break statement. |
JotCase |
getAsCase()
Retrieves the JotCase representing this
statement if it is a case statement. |
JotContinue |
getAsContinue()
Retrieves the JotContinue representing this
statement if it is a continue statement. |
JotDo |
getAsDo()
Retrieves the JotConditional representing this
statement if it is a do statement. |
JotExpressionStatement |
getAsExpressionStatement()
Retrieves the JotExpressionStatement representing this
statement if it is an expression statement. |
JotFor |
getAsFor()
Retrieves the JotFor representing this
statement if it is a for statement. |
JotIf |
getAsIf()
Retrieves the JotIf representing this
statement if it is an if statement. |
JotReturn |
getAsReturn()
Retrieves the JotReturn representing this
statement if it is a return statement. |
JotSwitch |
getAsSwitch()
Retrieves the JotSwitch representing this
statement if it is a switch statement. |
JotSynchronized |
getAsSynchronized()
Retrieves the JotSynchronized representing this
statement if it is a synchronized statement. |
JotThrow |
getAsThrow()
Retrieves the JotThrow representing this
statement if it is a throw statement. |
JotTry |
getAsTry()
Retrieves the JotTry representing this
statement if it is a try statement. |
JotWhile |
getAsWhile()
Retrieves the JotConditional representing this
statement if it is a while statement. |
java.lang.String[] |
getLabels()
Retrieves the labels associated with this statement. |
java.lang.String |
getStatementText()
Retrieves the text representation of this JotStatement. |
int |
getStatementType()
Retrieves the statement type of this JotStatement. |
void |
removeLabel(java.lang.String label)
Removes a label from a statement. |
| Methods inherited from interface oracle.jdeveloper.jot.JotBlockElement |
getAsLocalClass, getAsStatement, getAsVariableDeclaration, getElementType |
| Methods inherited from interface oracle.jdeveloper.jot.JotElement |
getElementName, getEndOffset, getID, getJotWorkArea, getParent, getStartOffset, isExistent, isReadOnly, isStructureKnown, setParent |
| Field Detail |
public static final int BLOCK_STATEMENT
public static final int EXPRESSION_STATEMENT
public static final int IF_STATEMENT
if statements
public static final int SWITCH_STATEMENT
switch statements
public static final int WHILE_STATEMENT
while statements
public static final int DO_STATEMENT
do statements
public static final int FOR_STATEMENT
for statements
public static final int BREAK_STATEMENT
break statements
public static final int CONTINUE_STATEMENT
continue statements
public static final int RETURN_STATEMENT
return statements
public static final int THROW_STATEMENT
throw statements
public static final int TRY_STATEMENT
try statements
public static final int SYNCHRONIZED_STATEMENT
synchronized statements
public static final int CASE_CLAUSE
case clauses. Note that a
case clause is not strictly a statement; however, JOT treats
it as a statement for convenience.
public static final int ELSE_CLAUSE
else clauses. Note that an
else clause is not strictly a statement; however, JOT treats
it as a statement for convenience.
public static final int EMPTY_STATEMENT
getAs... method.
| Method Detail |
public java.lang.String getStatementText()
public java.lang.String[] getLabels()
public void addLabel(java.lang.String label)
label - the new label to add to this statementpublic void removeLabel(java.lang.String label)
label - the label to removepublic int getStatementType()
public JotBlockStatement getAsBlock()
JotBlockStatement representing this
statement if it is a block statement.
JotBlockStatement instance if this
statement is a block statement, or null otherwise.public JotExpressionStatement getAsExpressionStatement()
JotExpressionStatement representing this
statement if it is an expression statement.
JotExpressionStatement instance if this
statement is an expression statement, or null otherwise.public JotIf getAsIf()
JotIf representing this
statement if it is an if statement.
JotIf instance if this
statement is an if statement, or null otherwise.public JotSwitch getAsSwitch()
JotSwitch representing this
statement if it is a switch statement.
JotSwitch instance if this
statement is a switch statement, or null otherwise.public JotWhile getAsWhile()
JotConditional representing this
statement if it is a while statement.
JotConditional instance if this
statement is a while statement, or null otherwise.public JotDo getAsDo()
JotConditional representing this
statement if it is a do statement.
JotConditional instance if this
statement is a do statement, or null otherwise.public JotFor getAsFor()
JotFor representing this
statement if it is a for statement.
JotFor instance if this
statement is a for statement, or null otherwise.public JotBreak getAsBreak()
JotBreak representing this
statement if it is a break statement.
JotBreak instance if this
statement is a break statement, or null otherwise.public JotContinue getAsContinue()
JotContinue representing this
statement if it is a continue statement.
JotContinue instance if this
statement is a continue statement, or null otherwise.public JotReturn getAsReturn()
JotReturn representing this
statement if it is a return statement.
JotReturn instance if this
statement is a return statement, or null otherwise.public JotThrow getAsThrow()
JotThrow representing this
statement if it is a throw statement.
JotThrow instance if this
statement is a throw statement, or null otherwise.public JotTry getAsTry()
JotTry representing this
statement if it is a try statement.
JotTry instance if this
statement is a try statement, or null otherwise.public JotSynchronized getAsSynchronized()
JotSynchronized representing this
statement if it is a synchronized statement.
JotSynchronized instance if this
statement is a synchronized statement, or null otherwise.public JotCase getAsCase()
JotCase representing this
statement if it is a case statement.
JotCase instance if this
statement is a case statement, or null otherwise.
|
Extension SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©1997, 2003, Oracle. All rights reserved.