Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.parser.java.v2.model.statement
Interface SourceStatement

All Superinterfaces:
Element, SourceBlockElement, SourceElement
All Known Subinterfaces:
SourceAssertStatement, SourceBlockStatement, SourceBreakStatement, SourceCatchClause, SourceCompoundStatement, SourceConditionalStatement, SourceContinueStatement, SourceDoStatement, SourceElseClause, SourceEmptyStatement, SourceExpressionStatement, SourceFinallyClause, SourceForStatement, SourceIfStatement, SourceReturnStatement, SourceSimpleStatement, SourceSwitchStatement, SourceSynchStatement, SourceThrowStatement, SourceTryStatement, SourceWhileStatement

public interface SourceStatement
extends SourceElement, SourceBlockElement

This is the common base interface of all statements. All statements can be classified as: simple, block, compound. Block statements are statements that are blocks. Simple statements have no child statements and optionally have expressions. Compound statements have child statements and optionally have expressions.


Field Summary
static SourceStatement[] EMPTY_ARRAY
           

 

Fields inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT

 

Method Summary
 java.util.List<SourceStatementLabel> getStatementLabels()
           
 short getStatementToken()
           

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
addSelf, addSelf, addSelfAfter, addSelfBefore, adjustTextIndentation, clearBinding, cloneSelf, compile, getBinding, getChildren, getChildren, getCompiledObject, getContainedElements, getEndOffset, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, hasErrors, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelf

 

Field Detail

EMPTY_ARRAY

static final SourceStatement[] EMPTY_ARRAY

Method Detail

getStatementToken

short getStatementToken()
Returns:
The token identifying what kind of statement this is. For simple statements, you'll get: 0: "expr;". Optional primary expression. KW_RETURN: "return optional_expr;". Optional primary expression. KW_THROW: "throw expr;". Required primary expression. KW_BREAK: "break optional_label_name;". Optional name. KW_CONTINUE: "continue optional_label_name;". Optional name. KW_CASE: "case expr:". Required primary expression. KW_DEFAULT: "default:". KW_ASSERT: "assert boolean-expr: output-expr;". Required primary expression, optional output expression.

getStatementLabels

java.util.List<SourceStatementLabel> getStatementLabels()
Returns:
The SourceStatementLabel array corresponding to this statement's label. Unlike all the other parse tree API array calls, this returns null if there are no labels. This is because labels rarely occur and there's no point creating a zero-length array for each statement. Returns a collection of SourceStatementLabel's.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.