|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Parser<T>
A parser transforms an object into a string and vice versa.
It is based on Format
,
but uses an abstract position and generics.
Method Summary | |
---|---|
void |
parse(ParseReader in,
T target)
Parses text starting at the specified position. |
String |
treeView()
Returns a tree view of this parser. |
void |
write(ParseWriter out,
T source)
Formats the source object and writes it into the output stream |
Method Detail |
---|
void parse(ParseReader in, T target) throws IOException, ParseException
in
- the position where to start parsingtarget
- place where the parsed object is stored.
ClassCastException
- if generics rules are violated
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 parsedvoid write(ParseWriter out, T source) throws IOException, FormatException
out
- the stream and position where to put the formatted text.source
- source object
ClassCastException
- if generics rules are violated
NullPointerException
- if out
is null
IOException
- if an I/O error occurs
FormatException
- if the source object can not be formatted with
this parser.String treeView()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |