|
Extension SDK 9.0.5 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A JotElement
is a handle to its corresponding element in the
Java Object Tree. A JotElement
provides common interfaces for
all elements in the Java Object Tree.
Methods that require the underlying element to exist throw a
JotException
. isExistant()
can be used to determine
if the element exists beforehand.
This interface is not intended to be implemented by clients.
Method Summary | |
JotElement[] |
getChildren()
Retrieves a list of children belonging to this element, if any exist. |
JotElement[] |
getContainedElements()
Retrieves a list of elements contained one level below this element in the AST. |
java.lang.String |
getElementName()
Returns the name of this element. |
int |
getElementType()
Returns this element's type as an integer. |
int |
getEndOffset()
Retreives the ending offset of this element in the sourcefile. |
java.lang.String |
getID()
Returns a string representation of this element as a handle. |
JotWorkArea |
getJotWorkArea()
Retrieves the JotWorkArea which contains this element,
or null if no JotWorkArea contains this node. |
JotElement |
getParent()
Returns the element directly containing this element, or null if this element has no parent. |
int |
getStartOffset()
Retreives the starting offset of this element in the sourcefile. |
boolean |
isExistent()
Determines whether this JotElement currently exists in the model. |
boolean |
isReadOnly()
Returns whether this JotElement is read-only. |
boolean |
isStructureKnown()
Determines whether or not the contents of this element are knowable. |
void |
setParent(JotElement element)
Sets the parent of this element. |
Method Detail |
public int getStartOffset() throws JotInvalidElementException
JotInvalidElementException
public int getEndOffset() throws JotInvalidElementException
JotInvalidElementException
public boolean isExistent()
JotElement
currently exists in the model.
As elements to not represent the actual elements found in the tree, there
may be occasion where a client has maintained an old or invalid element.
true
if this element exists in the JotModel
.public boolean isReadOnly() throws JotInvalidElementException
JotElement
is read-only. The Jot only
permits elements to be written to if their underlying resource is
specifically opened in the environment or contined by the project,
or super-project of this element explicitely, and the resource is not
also read-only
true
if this element is read-only.
JotInvalidElementException
public java.lang.String getElementName() throws JotInvalidElementException
JotInvalidElementException
public int getElementType()
JotElement
public java.lang.String getID()
Jot.create(java.lang.String)
.
public JotElement getParent() throws JotInvalidElementException
null
if this element has no parent.
null
if this element has no parent.
JotInvalidElementException
public void setParent(JotElement element) throws JotInvalidElementException
JotInvalidElementException
public JotWorkArea getJotWorkArea()
JotWorkArea
which contains this element,
or null
if no JotWorkArea
contains this node.
JotWorkArea
which contains this element, or
null
if no JotWorkArea
contains this element.public boolean isStructureKnown() throws JotInvalidElementException, JotException
isStructureKnown
will return false.
JotInvalidElementException
JotException
public JotElement[] getChildren()
JotElement[]
containing the children of this element.
The array is empty of no children exist.public JotElement[] getContainedElements()
JotElement[]
containing the children of this element.
The array is empty of no children exist.
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.