|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.beanio.internal.parser.UnmarshallerImpl
public class UnmarshallerImpl
Default Unmarshaller
implementation.
Constructor Summary | |
---|---|
UnmarshallerImpl(UnmarshallingContext context,
Selector layout,
RecordUnmarshaller recordUnmarshaller)
Constructs a new UnmarshallerImpl |
Method Summary | |
---|---|
RecordContext |
getRecordContext()
Returns record information for the most recent unmarshalled bean object. |
String |
getRecordName()
Returns the record or group name of the most recent unmarshalled bean object. |
Object |
unmarshal(List<String> list)
Unmarshals a bean object from the given List of fields. |
Object |
unmarshal(Node node)
Unmarshals a bean object from the given Node . |
Object |
unmarshal(String text)
Unmarshals a bean object from the given record text. |
Object |
unmarshal(String[] array)
Unmarshals a bean object from the given String[] of fields. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UnmarshallerImpl(UnmarshallingContext context, Selector layout, RecordUnmarshaller recordUnmarshaller)
context
- the UnmarshallingContext
layout
- the stream layoutrecordUnmarshaller
- the RecordUnmarshaller
for converting record text to record valuesMethod Detail |
---|
public Object unmarshal(String text) throws MalformedRecordException, UnidentifiedRecordException, UnexpectedRecordException, InvalidRecordException
Unmarshaller
unmarshal
in interface Unmarshaller
text
- the record text to unmarhal
MalformedRecordException
- if the record text could not be parsed (due to the
expected syntax of the stream format)
UnidentifiedRecordException
- if the record type could not be identified
UnexpectedRecordException
- if the record is out of sequence
InvalidRecordException
- if the record fails validationpublic Object unmarshal(List<String> list) throws BeanReaderException, UnidentifiedRecordException, UnexpectedRecordException, InvalidRecordException
Unmarshaller
List
of fields. This method is supported by
CSV and delimited formatted streams only.
unmarshal
in interface Unmarshaller
list
- the List
of fields to unmarshal
BeanReaderException
- if a List
is not supported by the stream format,
or if the bean is bound to a record group, or if some other rare (but fatal) error occurs
UnidentifiedRecordException
- if the record type could not be identified
UnexpectedRecordException
- if the record is out of sequence
InvalidRecordException
- if the record fails validationpublic Object unmarshal(String[] array) throws BeanReaderException, UnidentifiedRecordException, UnexpectedRecordException, InvalidRecordException
Unmarshaller
unmarshal
in interface Unmarshaller
array
- the String[] of fields to unmarshal
BeanReaderException
- if a String[] is not supported by the stream format,
or if the bean is bound to a record group, or if some other rare (but fatal) error occurs
UnidentifiedRecordException
- if the record type could not be identified
UnexpectedRecordException
- if the record is out of sequence
InvalidRecordException
- if the record fails validationpublic Object unmarshal(Node node) throws BeanReaderException, UnidentifiedRecordException, UnexpectedRecordException, InvalidRecordException
Unmarshaller
Node
. This method is supported by
XML formatted streams only.
unmarshal
in interface Unmarshaller
node
- the Node
to unmarshal
BeanReaderException
- if a Node
is not supported by the stream format,
or if the bean is bound to a record group, or if some other rare (but fatal) error occurs
UnidentifiedRecordException
- if the record type could not be identified
UnexpectedRecordException
- if the record is out of sequence
InvalidRecordException
- if the record fails validationpublic String getRecordName()
Unmarshaller
getRecordName
in interface Unmarshaller
public RecordContext getRecordContext()
Unmarshaller
getRecordContext
in interface Unmarshaller
RecordContext
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |