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
Methods inherited from interface oracle.jdeveloper.jot.JotElement |
getElementName, getElementType, getEndOffset, getID, getJotWorkArea, getParent, getStartOffset, isExistent, isReadOnly, isStructureKnown, setParent |
getLocalVariables
public JotLocalVariable[] getLocalVariables()
- Retrieves the local variables contained in this declaration.
- Returns:
- an array of
JotLocalVariable
s 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.