com.borland.jbuilder.jot
Interface JotMarker

All Known Subinterfaces:
JotAnonymousClass, JotAssignment, JotBinaryExpression, JotBreak, JotCase, JotCatch, JotClassSource, JotCodeBlock, JotComment, JotCommentable, JotCondition, JotConstructorSource, JotContinue, JotDefault, JotDo, JotDocTag, JotExpression, JotExpressionStatement, JotFieldDeclaration, JotFinally, JotFor, JotIf, JotImport, JotInitBlock, JotInitializer, JotInnerClass, JotLabelled, JotMethodCall, JotMethodSource, JotNew, JotPackage, JotParameterDeclaration, JotReturn, JotSourceFile, JotStatement, JotSubscript, JotSwitch, JotSynchronized, JotThrow, JotTry, JotTypeop, JotUnaryExpression, JotVariableDeclaration, JotWhile

public interface JotMarker

This interface is implemented by any source element that has non-zero length. It is used primarily for relative positioning of new source elements as in the addXXX() methods of JotCodeBlock.


Method Summary
 void addUserData(java.lang.Object key, java.lang.Object data)
          Allows user data to be associated with this JotMarker.
 int getEndPosition()
          Returns the ending character position of this marker relative to the beginning of the file.
 int getStartPosition()
          Returns the starting character position of this marker relative to the beginning of the file.
 java.lang.Object getUserData(java.lang.Object key)
          Retrieves the user data associated with this JotMarker.
 

Method Detail

getStartPosition

public int getStartPosition()
Returns the starting character position of this marker relative to the beginning of the file.

getEndPosition

public int getEndPosition()
Returns the ending character position of this marker relative to the beginning of the file.

addUserData

public void addUserData(java.lang.Object key,
                        java.lang.Object data)
Allows user data to be associated with this JotMarker. The data may be removed by adding the same key and specifying null as the data.
Parameters:
key - an Object which will can be used to identify the data
data - an Object which a Jot client would like associated with this JotMarker. If the value is null, then the user data will be removed for this item.
See Also:
getUserData

getUserData

public java.lang.Object getUserData(java.lang.Object key)
Retrieves the user data associated with this JotMarker.
Parameters:
key - is the Object which identifies the client data to extract.
Returns:
the Object which is associated with the key or null if no matching data is found.