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.
 
 
 
| 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 | 
 
EMPTY_ARRAY
static final SourceStatement[] EMPTY_ARRAY
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 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.
 
Copyright © 1997, 2011, Oracle. All rights reserved.