|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.japaki.text.AbstractParser<T>
net.sf.japaki.text.PeekParser<T>
public class PeekParser<T>
Parses a string without changing the start index.
| Constructor Summary | |
|---|---|
protected |
PeekParser(Parser<T> parser)
Creates a new peek parser based on the specified parser. |
| Method Summary | ||
|---|---|---|
static
|
newParser(Parser<T> parser)
Creates a new peek parser based on the specified parser. |
|
protected void |
parseIt(ParseReader in,
T target)
Parse the input text with the base parser. |
|
String |
treeView()
Returns a tree view of this parser. |
|
protected void |
writeIt(ParseWriter out,
T source)
Does nothing. |
|
| Methods inherited from class net.sf.japaki.text.AbstractParser |
|---|
getLogger, handleException, parse, toString, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected PeekParser(Parser<T> parser)
parser - base parser
NullPointerException - if parser is null| Method Detail |
|---|
public static <T> Parser<T> newParser(Parser<T> parser)
parser - base parser
NullPointerException - if parser is null
protected void parseIt(ParseReader in,
T target)
throws IOException,
ParseException
parseIt in class AbstractParser<T>in - the position where to start parsingtarget - place where the parsed object is stored.
NullPointerException - if in or target
or one of its (sub-) properties is null
and the parser cannot handle it
BeanStoreException - if the parsed value could not be stored
IOException - if an I/O error occurs
ParseException - if the beginning of the string in in
cannot be parsed
protected void writeIt(ParseWriter out,
T source)
writeIt in class AbstractParser<T>out - the stream and position where to put the formatted text.source - source objectpublic String treeView()
Parser
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||