public class PairWithPosition extends ImmutablePair implements SourceLocator
Pair
with the file name and position it was read from.ATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, ELEMENT_VALUE, EOF_VALUE, eofValue, FLOAT_VALUE, INT_S16_VALUE, INT_S32_VALUE, INT_S64_VALUE, INT_S8_VALUE, INT_U16_VALUE, INT_U32_VALUE, INT_U64_VALUE, INT_U8_VALUE, OBJECT_VALUE, PRIM_VALUE, PROCESSING_INSTRUCTION_VALUE, TEXT_BYTE_VALUE
Constructor and Description |
---|
PairWithPosition()
Only for serialization.
|
PairWithPosition(java.lang.Object car,
java.lang.Object cdr) |
PairWithPosition(SourceLocator where,
java.lang.Object car,
java.lang.Object cdr) |
Modifier and Type | Method and Description |
---|---|
int |
getColumnNumber()
Return current column number.
|
java.lang.String |
getFileName()
Normally same as getSystemId.
|
int |
getLineNumber()
Get the line number of (the start of) this Expression.
|
java.lang.String |
getPublicId() |
java.lang.String |
getSystemId() |
boolean |
isStableSourceLocation()
True if position is unlikely to change.
|
static PairWithPosition |
make(java.lang.Object car,
java.lang.Object cdr,
java.lang.String filename,
int position) |
static PairWithPosition |
make(java.lang.Object car,
java.lang.Object cdr,
java.lang.String filename,
int line,
int column) |
void |
readExternal(java.io.ObjectInput in) |
void |
setFile(java.lang.String filename) |
void |
setLine(int lineno) |
void |
setLine(int lineno,
int colno) |
void |
writeExternal(java.io.ObjectOutput out) |
setCar, setCdr
compareTo, compareTo, equals, equals, get, getCar, getCdr, getPosNext, getPosPrevious, hashCode, hasNext, isEmpty, lastPair, length, make, nextPos, readResolve, setCdrBackdoor, size, toArray, toArray
chain1, chain4, checkNonList, consume, consX, createPos, createRelativePos, getIterator, length, list1, list2, list3, list4, listLength, listTail, makeList, makeList, makeList, reverseInPlace, setPosNext, setPosPrevious, toString
copyPos, isAfterPos, nextIndex, releasePos
add, add, addAll, addAll, addPos, clear, compare, compare, compare, consumeNext, consumePosRange, contains, containsAll, elements, endPos, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, getAttribute, getAttributeLength, getContainingSequenceSize, getEffectiveIndex, getIndexDifference, getIterator, getIteratorAtPos, getLowBound, getNextKind, getNextTypeName, getNextTypeObject, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hasPrevious, indexOf, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextMatching, parentPos, previousPos, rank, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, stableCompare, startPos, subList, subSequence, subSequencePos, toString, unsupported, unsupportedException
public PairWithPosition()
public PairWithPosition(SourceLocator where, java.lang.Object car, java.lang.Object cdr)
public PairWithPosition(java.lang.Object car, java.lang.Object cdr)
public final void setFile(java.lang.String filename)
public final void setLine(int lineno, int colno)
public final void setLine(int lineno)
public final java.lang.String getFileName()
SourceLocator
public java.lang.String getPublicId()
getPublicId
in interface javax.xml.transform.SourceLocator
getPublicId
in interface org.xml.sax.Locator
public java.lang.String getSystemId()
getSystemId
in interface javax.xml.transform.SourceLocator
getSystemId
in interface org.xml.sax.Locator
public final int getLineNumber()
getLineNumber
in interface javax.xml.transform.SourceLocator
getLineNumber
in interface org.xml.sax.Locator
public final int getColumnNumber()
SourceLocator
getColumnNumber
in interface javax.xml.transform.SourceLocator
getColumnNumber
in interface org.xml.sax.Locator
public boolean isStableSourceLocation()
SourceLocator
public static PairWithPosition make(java.lang.Object car, java.lang.Object cdr, java.lang.String filename, int line, int column)
public static PairWithPosition make(java.lang.Object car, java.lang.Object cdr, java.lang.String filename, int position)
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class Pair
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class Pair
java.io.IOException
java.lang.ClassNotFoundException