gnu.lists

Class PairWithPosition

public class PairWithPosition extends Pair implements SourceLocator

A Pair with the file name and position it was read from.
Constructor Summary
PairWithPosition()
Only for serialization.
PairWithPosition(SourceLocator where, Object car, Object cdr)
PairWithPosition(Object car, Object cdr)
Method Summary
intgetColumnNumber()
StringgetFileName()
intgetLineNumber()
Get the line number of (the start of) this Expression.
StringgetPublicId()
StringgetSystemId()
booleanisStableSourceLocation()
static PairWithPositionmake(Object car, Object cdr, String filename, int line, int column)
static PairWithPositionmake(Object car, Object cdr, String filename, int position)
voidreadExternal(ObjectInput in)
voidsetFile(String filename)
voidsetLine(int lineno, int colno)
voidsetLine(int lineno)
voidwriteExternal(ObjectOutput out)

Constructor Detail

PairWithPosition

public PairWithPosition()
Only for serialization.

PairWithPosition

public PairWithPosition(SourceLocator where, Object car, Object cdr)

PairWithPosition

public PairWithPosition(Object car, Object cdr)

Method Detail

getColumnNumber

public final int getColumnNumber()

getFileName

public final String getFileName()

getLineNumber

public final int getLineNumber()
Get the line number of (the start of) this Expression. The "first" line is line 1; unknown is -1.

getPublicId

public String getPublicId()

getSystemId

public String getSystemId()

isStableSourceLocation

public boolean isStableSourceLocation()

make

public static PairWithPosition make(Object car, Object cdr, String filename, int line, int column)

make

public static PairWithPosition make(Object car, Object cdr, String filename, int position)

readExternal

public void readExternal(ObjectInput in)

setFile

public final void setFile(String filename)

setLine

public final void setLine(int lineno, int colno)

setLine

public final void setLine(int lineno)

writeExternal

public void writeExternal(ObjectOutput out)

Serial Data: Write the car followed by the cdr, followed by filename (as an Object, so it can be shared), followed by position (line|(column<<20)).