Extension SDK

oracle.jdeveloper.jot
Interface JotLocalVariableDeclaration

All Superinterfaces:
JotBlockElement, JotElement, JotHasModifiers, JotVariableDeclaration

public interface JotLocalVariableDeclaration
extends JotVariableDeclaration, JotBlockElement

The JotLocalVariableDeclaration represents a local variable declaration.

See Also:
JotVariableDeclaration, JotLocalVariable

Field Summary
 
Fields inherited from interface oracle.jdeveloper.jot.JotBlockElement
LOCAL_CLASS_TYPE, STATEMENT_TYPE, VARIABLE_DECLARATION_TYPE
 
Method Summary
 JotLocalVariable addLocalVariable(JotLocalVariable marker, boolean before, java.lang.String varName)
          Adds a new local variable to this declaration.
 JotLocalVariable addLocalVariable(java.lang.String varName)
          Adds a new local variable to the end of this declaration.
 JotLocalVariable[] getLocalVariables()
          Retrieves the local variables contained in this declaration.
 void removeLocalVariable(JotLocalVariable var)
          Removes a local variable from this declaration.
 
Methods inherited from interface oracle.jdeveloper.jot.JotVariableDeclaration
addVariable, addVariable, getAsFieldDeclaration, getAsLocalVariableDeclaration, getType, getVariables, removeVariable, setType
 
Methods inherited from interface oracle.jdeveloper.jot.JotHasModifiers
getModifiers, setModifiers
 
Methods inherited from interface oracle.jdeveloper.jot.JotElement
getElementName, getElementType, getEndOffset, getID, getJotWorkArea, getParent, getStartOffset, isExistent, isReadOnly, isStructureKnown, setParent
 
Methods inherited from interface oracle.jdeveloper.jot.JotBlockElement
getAsLocalClass, getAsStatement, getAsVariableDeclaration, getElementType
 

Method Detail

getLocalVariables

public JotLocalVariable[] getLocalVariables()
Retrieves the local variables contained in this declaration.

Returns:
an array of JotLocalVariables representing this declarations's local variables. This declaration will contains at least one local variable as long as it is valid.

addLocalVariable

public JotLocalVariable addLocalVariable(JotLocalVariable marker,
                                         boolean before,
                                         java.lang.String varName)
                                  throws JotException
Adds a new local variable to this declaration.

Parameters:
marker - an existing local variable in this declaration to position relative to, or null to position at the beginning or end.
before - whether to position the new local variable before or after the existing local variable; or, if the marker variable is null, whether to position the new local variable at the beginning or the end of this declaration.
varName - the name of the new local variable.
Returns:
a JotLocalVariable representing the new local variable.
Throws:
JotException - if this declaration cannot be modified.

addLocalVariable

public JotLocalVariable addLocalVariable(java.lang.String varName)
                                  throws JotException
Adds a new local variable to the end of this declaration.

Parameters:
varName - the name of the new variable.
Returns:
a JotLocalVariable representing the new local variable.
Throws:
JotException - if this declaration cannot be modified.

removeLocalVariable

public void removeLocalVariable(JotLocalVariable var)
                         throws JotException
Removes a local variable from this declaration. If the local variable removed is the last variable in this declaration, this declaration will automatically be removed from its containing class.

Parameters:
var - the local variable to remove. If the variable is not part of this declaration, the request to remove it is ignored.
Throws:
JotException - if the variable cannot be removed from this declaration.

Extension SDK

 

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