com.borland.jbuilder.jot
Interface JotSourceElement

All Known Subinterfaces:
JotAssignment, JotBinaryExpression, JotBreak, JotCase, JotCatch, JotCodeBlock, JotComment, JotCondition, JotContinue, JotDefault, JotDo, JotExpression, JotExpressionStatement, JotFieldDeclaration, JotFinally, JotFor, JotIf, JotInitBlock, JotInitializer, JotLabelled, JotMethodCall, JotNew, JotReturn, JotStatement, JotSubscript, JotSwitch, JotSynchronized, JotThrow, JotTry, JotTypeop, JotUnaryExpression, JotVariableDeclaration, JotWhile

public interface JotSourceElement

The base interface for all Jot elements extracted from a source file. Jot elements extracted from .class files never implement this interface.


Method Summary
 int getIndentLevel()
          Represents the logical number of indentions which need to take place for this element.
 JotSourceElement getParent()
          Returns the element which contains the current element.
 java.lang.String getText()
          Returns the text for the given element.
 boolean isModified()
          True means the text has been changed since last parsed
 void setModified(boolean yesNo)
           
 void setText(java.lang.String text)
          Sets the given text to be the new text for the given element.
 

Method Detail

getText

public java.lang.String getText()
Returns the text for the given element. Compound elements (e.g. a method) return the text for everything it contains. Modified text is reparsed before returning the requested text

setText

public void setText(java.lang.String text)
Sets the given text to be the new text for the given element. This sets the isModified() property to true and will force a reparse on the next getText(). Use with care, because all child Jot elements of this element will be discarded (and new ones generated) whenever a parent's text is set.

isModified

public boolean isModified()
True means the text has been changed since last parsed

setModified

public void setModified(boolean yesNo)

getParent

public JotSourceElement getParent()
Returns the element which contains the current element. For example, a JotExpression may belong to a JotExpressionStatement

getIndentLevel

public int getIndentLevel()
Represents the logical number of indentions which need to take place for this element. Zero sits on the left margin