|
Extension SDK | |||||||||
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 | |
java.lang.String |
getElementName()
Returns the name of this element. |
int |
getElementType()
Returns this element's type as an integer. |
int |
getEndOffset()
This method exists for historical reasons. |
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()
This method exists for historical reasons. |
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()
JotWorkArea
s that are beyond the scope of a single file, or
elements contained in class files or preparsed library files.
Retreives the starting offset of this element in the sourcefile. The value '-1' is returned if the element is not an existing element in the file, the element does not come from a source file, or the element is a JotFile.
public int getEndOffset()
JotWorkArea
s that are beyond the scope of a single file, or
elements contained in class files or preparsed library files.
Retreives the ending offset of this element in the sourcefile. The value '-1' is returned if the element is not an existing element in the file, the element does not come from a source file, or the element is a JotFile.
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()
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.public java.lang.String getElementName()
public int getElementType()
JotElement
public java.lang.String getID()
Jot.create(java.lang.String)
.
public JotElement getParent()
null
if this element has no parent.
null
if this element has no parent.public void setParent(JotElement element)
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 JotException
isStructureKnown
will return false.
JotException
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.