|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.elib.base.SourceSpan
Untamed: A description of where a particular piece of Twine came from, such as a range of source code, suitable for use by a debugger.
Woven into a piece of Twine so it remembers where it came from.
Field Summary | |
private int |
myEndCol
|
private int |
myEndLine
|
private boolean |
myIsOneToOne
|
private int |
myStartCol
|
private int |
myStartLine
|
private String |
myUrl
|
private static long |
serialVersionUID
|
static StaticMaker |
SourceSpanMaker
Enabled: |
Fields inherited from interface org.erights.e.elib.serial.Persistent |
HONORARY, HONORED_NAMES |
Fields inherited from interface org.erights.e.elib.serial.DeepPassByCopy |
HONORARY, HONORED_NAMES |
Constructor Summary | |
SourceSpan(String url,
boolean isOneToOne,
int startLine,
int startCol,
int endLine,
int endCol)
Enabled: |
Method Summary | |
int |
getEndCol()
Enabled: Position of last character of span within this last line. |
int |
getEndLine()
Enabled: Line number of line holding the last character of the span. |
Object[] |
getSpreadUncall()
Enabled: '__makeSourceSpan(myUrl, myIsOneToOne, myStartLine, myStartCol, myEndLine, myEndCol)' |
int |
getStartCol()
Enabled: Position of first character of span within the first line. |
int |
getStartLine()
Enabled: Line number of beginning of span, in the text unit (file?) described by url. |
String |
getUrl()
Enabled: Where might (this version of) the source text be found? Users of SourceSpan should prevent or prepare for the possibility that the text retrieved from a remembered Url may no longer be the original version. |
boolean |
isOneToOne()
Enabled: Does each character in that Twine map to the corresponding source character position? |
SourceSpan |
notOneToOne()
Enabled: Return a non-oneToOne form of this SourceSpan |
static SourceSpan |
optCover(SourceSpan optA,
SourceSpan optB)
Enabled: Returns a new SourceSpan that covers the original two. |
String |
toString()
Suppressed: |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
public static final StaticMaker SourceSpanMaker
private final String myUrl
private final boolean myIsOneToOne
private final int myStartLine
private final int myStartCol
private final int myEndLine
private final int myEndCol
Constructor Detail |
public SourceSpan(String url, boolean isOneToOne, int startLine, int startCol, int endLine, int endCol)
Method Detail |
public Object[] getSpreadUncall()
getSpreadUncall
in interface Selfless
public String getUrl()
public boolean isOneToOne()
If so, then startLine must be the same as endLine, and the described Twine's size should be 'endCol - startCol + 1'. Otherwise, all the characters in the Twine map to all the characters described by this SourceSpan.
public int getStartLine()
public int getStartCol()
public int getEndLine()
public int getEndCol()
public static SourceSpan optCover(SourceSpan optA, SourceSpan optB)
Either input may be null, as may the output. If either input is null, the result is null. If the two don't have the same Url, the result is null. Finally, the result describes the minimal span that includes both the originals. Iff the originals are both oneToOne and optB immediately follows optA on the same line, then the result is also oneToOne.
public SourceSpan notOneToOne()
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |