Extension SDK

oracle.jdeveloper.jot
Interface JotBlockElement

All Superinterfaces:
JotElement
All Known Subinterfaces:
JotBlockStatement, JotBreak, JotCase, JotConditional, JotContinue, JotDo, JotElse, JotExpressionStatement, JotFor, JotHasChildStatement, JotIf, JotLocalClass, JotLocalVariableDeclaration, JotReturn, JotStatement, JotSwitch, JotSynchronized, JotThrow, JotTry, JotWhile

public interface JotBlockElement
extends JotElement

A JotBlockElement is an element that can be contained within a code block. A JotBlockElement is one of: a variable declaration; a local class declaratation, or a statement. The type of the element can be determined by calling the getElementType() method.

Since:
5.0
See Also:
JotLocalVariableDeclaration, JotLocalClass, JotStatement, "Section 14.2 of the Java Language Specification"

Field Summary
static int LOCAL_CLASS_TYPE
          The element type value representing a local class declaration.
static int STATEMENT_TYPE
          The element type value representing a statement.
static int VARIABLE_DECLARATION_TYPE
          The element type value representing a variable declaration.
 
Method Summary
 JotLocalClass getAsLocalClass()
          Retrieves the JotLocalClass representing this block element if it is a local class declaration.
 JotStatement getAsStatement()
          Retrieves the JotStatement representing this block element if it is a statement.
 JotLocalVariableDeclaration getAsVariableDeclaration()
          Retrieves the JotLocalVariableDeclaration representing this block element if it is a variable declaration.
 int getElementType()
          Retrieves the type of element represented by this JotBlockElement.
 
Methods inherited from interface oracle.jdeveloper.jot.JotElement
getElementName, getEndOffset, getID, getJotWorkArea, getParent, getStartOffset, isExistent, isReadOnly, isStructureKnown, setParent
 

Field Detail

VARIABLE_DECLARATION_TYPE

public static final int VARIABLE_DECLARATION_TYPE
The element type value representing a variable declaration.

See Also:
getElementType(), Constant Field Values

LOCAL_CLASS_TYPE

public static final int LOCAL_CLASS_TYPE
The element type value representing a local class declaration.

See Also:
getElementType(), Constant Field Values

STATEMENT_TYPE

public static final int STATEMENT_TYPE
The element type value representing a statement.

See Also:
getElementType(), Constant Field Values
Method Detail

getElementType

public int getElementType()
Retrieves the type of element represented by this JotBlockElement.

Specified by:
getElementType in interface JotElement
Returns:
an integer value indicating the element type.
See Also:
VARIABLE_DECLARATION_TYPE, LOCAL_CLASS_TYPE, STATEMENT_TYPE

getAsVariableDeclaration

public JotLocalVariableDeclaration getAsVariableDeclaration()
Retrieves the JotLocalVariableDeclaration representing this block element if it is a variable declaration.

Returns:
a JotLocalVariableDeclaration instance if this block element is a variable declaration, or null otherwise.

getAsLocalClass

public JotLocalClass getAsLocalClass()
Retrieves the JotLocalClass representing this block element if it is a local class declaration.

Returns:
a JotLocalClass instance if this block element is a local class declaration, or null otherwise.

getAsStatement

public JotStatement getAsStatement()
Retrieves the JotStatement representing this block element if it is a statement.

Returns:
a JotStatement instance if this block element is a statement, or null otherwise.

Extension SDK

 

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