Extension SDK

oracle.jdeveloper.jot
Interface JotForInitializer

All Superinterfaces:
JotElement

public interface JotForInitializer
extends JotElement

A JotForInitialzer represents the initialization clause of a for statement. An initialization clause can contain either a variable declaration (with one or more variables) or a list of statement expressions. The initializer can also be empty.

Since:
9.0.2

Method Summary
 JotStatementExpression addExpression(JotStatementExpression marker, boolean before, java.lang.String exp)
          Adds a new expression to this initialization clause.
 JotStatementExpression[] getExpressions()
          Retrieves the list of statement expressions contained in this initialization clause.
 JotVariableDeclaration getVariableDeclaration()
          Retrieves the variable declaration contained in this initialization clause, or null if this clause does not contain a variable declaration.
 void removeExpression(JotStatementExpression exp)
          Removes an existing expression from this initialization clause.
 void setInitializationText(java.lang.String text)
          Sets the text of this initialization clause.
 JotVariableDeclaration setVariableDeclaration(java.lang.String vType, java.lang.String vName)
          Sets the contents of this initialization clause to a variable declaration.
 
Methods inherited from interface oracle.jdeveloper.jot.JotElement
getElementName, getElementType, getEndOffset, getID, getJotWorkArea, getParent, getStartOffset, isExistent, isReadOnly, isStructureKnown, setParent
 

Method Detail

getVariableDeclaration

public JotVariableDeclaration getVariableDeclaration()
Retrieves the variable declaration contained in this initialization clause, or null if this clause does not contain a variable declaration.


setVariableDeclaration

public JotVariableDeclaration setVariableDeclaration(java.lang.String vType,
                                                     java.lang.String vName)
Sets the contents of this initialization clause to a variable declaration. Any existing contents are removed.

Parameters:
vType - the type of the variable declaration
vName - the name of the first variable of the declaration.

getExpressions

public JotStatementExpression[] getExpressions()
Retrieves the list of statement expressions contained in this initialization clause. If this clause does not contain any statement expressions, an empty array is returned.


addExpression

public JotStatementExpression addExpression(JotStatementExpression marker,
                                            boolean before,
                                            java.lang.String exp)
Adds a new expression to this initialization clause. If this clause does not currently contain any statement expressions, a new list will be created. This will remove an existing variable declaration.

Parameters:
marker - an existing expression to position relative to, or null if the expression should be positioned at the beginning or end of the update clause.
before - whether to position the new expression before or after the existing marker expression; or if marker is null, whether to position the new expression at the beginning or the end of the update clause
exp - the new expression to add.
Returns:
the newly created expression

removeExpression

public void removeExpression(JotStatementExpression exp)
Removes an existing expression from this initialization clause.

Parameters:
exp - the expression to remove

setInitializationText

public void setInitializationText(java.lang.String text)
Sets the text of this initialization clause.


Extension SDK

 

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