Methods Summary |
---|
public boolean | equals(java.lang.Object other)
if (other instanceof Mark) {
Mark m = (Mark) other;
return this.reader == m.reader && this.fileId == m.fileId
&& this.cursor == m.cursor && this.line == m.line
&& this.col == m.col;
}
return false;
|
public int | getColumnNumber()
return col;
|
public java.lang.String | getFile()
return this.fileName;
|
public int | getLineNumber()
return line;
|
public java.lang.String | getPublicId()
return null;
|
public java.lang.String | getSystemId()
return getFile();
|
public java.net.URL | getURL()Gets the URL of the resource with which this Mark is associated
return ctxt.getResource(getFile());
|
public boolean | isGreater(org.apache.jasper.compiler.Mark other)
boolean greater = false;
if (this.line > other.line) {
greater = true;
} else if (this.line == other.line && this.col > other.col) {
greater = true;
}
return greater;
|
public org.apache.jasper.compiler.Mark | popStream()Restores this mark's state to a previously stored stream.
// make sure we have something to pop
if ( includeStack.size() <= 0 ) {
return null;
}
// get previous state in stack
IncludeState state = (IncludeState) includeStack.pop( );
// set new variables
cursor = state.cursor;
line = state.line;
col = state.col;
fileId = state.fileId;
fileName = state.fileName;
baseDir = state.baseDir;
stream = state.stream;
return this;
|
public void | pushStream(char[] inStream, int inFileId, java.lang.String name, java.lang.String inBaseDir, java.lang.String inEncoding)Sets this mark's state to a new stream.
It will store the current stream in it's includeStack.
// store current state in stack
includeStack.push(new IncludeState(cursor, line, col, fileId,
fileName, baseDir,
encoding, stream) );
// set new variables
cursor = 0;
line = 1;
col = 1;
fileId = inFileId;
fileName = name;
baseDir = inBaseDir;
encoding = inEncoding;
stream = inStream;
|
public java.lang.String | toShortString()
return "("+line+","+col+")";
|
public java.lang.String | toString()
return getFile()+"("+line+","+col+")";
|