|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.fife.ui.rsyntaxtextarea.parser.DefaultParseResult
public class DefaultParseResult
A basic implementation of ParseResult
. Most, if not all,
Parser
s can return instances of this class.
Parser
Constructor Summary | |
---|---|
DefaultParseResult(Parser parser)
|
Method Summary | |
---|---|
void |
addNotice(ParserNotice notice)
Adds a parser notice. |
void |
clearNotices()
Clears any parser notices in this result. |
java.lang.Exception |
getError()
Returns an error that occurred while parsing the document, if any. |
int |
getFirstLineParsed()
Returns the first line parsed. |
int |
getLastLineParsed()
Returns the first line parsed. |
java.util.List<ParserNotice> |
getNotices()
Returns the notices for the parsed section. |
Parser |
getParser()
Returns the parser that generated these notices. |
long |
getParseTime()
Returns the amount of time this parser took to parse the specified range of text. |
void |
setError(java.lang.Exception e)
Sets the error that occurred when last parsing the document, if any. |
void |
setParsedLines(int first,
int last)
Sets the line range parsed. |
void |
setParseTime(long time)
Sets the amount of time it took for this parser to parse the document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultParseResult(Parser parser)
Method Detail |
---|
public void addNotice(ParserNotice notice)
notice
- The new notice.clearNotices()
public void clearNotices()
addNotice(ParserNotice)
public java.lang.Exception getError()
getError
in interface ParseResult
null
if the document was
successfully parsed.public int getFirstLineParsed()
0
and parse the entire document.
getFirstLineParsed
in interface ParseResult
ParseResult.getLastLineParsed()
public int getLastLineParsed()
getLastLineParsed
in interface ParseResult
ParseResult.getFirstLineParsed()
public java.util.List<ParserNotice> getNotices()
getNotices
in interface ParseResult
ParserNotice
s.public long getParseTime()
0
for this value.
getParseTime
in interface ParseResult
0
if the
parse time was not recorded.public Parser getParser()
getParser
in interface ParseResult
public void setError(java.lang.Exception e)
e
- The error that occurred, or null
if no error
occurred.public void setParseTime(long time)
time
- The amount of time, in milliseconds.getParseTime()
public void setParsedLines(int first, int last)
first
- The first line parsed, inclusive.last
- The last line parsed, inclusive.getFirstLineParsed()
,
getLastLineParsed()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |