oracle.jdeveloper.jot
Interface JotLocalVariableDeclaration
- All Superinterfaces:
- JotBlockElement, JotCodeElement, 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.JotCodeElement |
addPrecedingComment, childrenContainErrors, delete, getContainingJotFile, getLeftWhitespace, getLength, getRightWhitespace, isInError, isSource, setLeftWhitespace, setRightWhitespace |
Methods inherited from interface oracle.jdeveloper.jot.JotElement |
getChildren, getContainedElements, getElementName, getElementType, getEndOffset, getID, getJotWorkArea, getParent, getStartOffset, isExistent, isReadOnly, isStructureKnown, setParent |
getLocalVariables
public JotLocalVariable[] getLocalVariables()
throws JotInvalidElementException
- 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.
- Throws:
JotInvalidElementException
addLocalVariable
public JotLocalVariable addLocalVariable(JotLocalVariable marker,
boolean before,
java.lang.String varName)
throws JotInvalidElementException,
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.
JotInvalidElementException
addLocalVariable
public JotLocalVariable addLocalVariable(java.lang.String varName)
throws JotInvalidElementException,
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.
JotInvalidElementException
removeLocalVariable
public void removeLocalVariable(JotLocalVariable var)
throws JotInvalidElementException,
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.
JotInvalidElementException
Copyright © 1997, 2004, Oracle. All rights reserved.