|
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.MarshallerImpl
public class MarshallerImpl
Default Marshaller
implementation.
Constructor Summary | |
---|---|
MarshallerImpl(MarshallingContext context,
Selector layout,
RecordMarshaller recordMarshaller)
Constructs a new UnmarshallerImpl |
Method Summary | |
---|---|
protected Object |
getRecordValue()
Returns the record value for the most recent marshalled bean object. |
Marshaller |
marshal(Object bean)
Marshals a single bean object. |
Marshaller |
marshal(String recordName,
Object bean)
Marshals a single bean object. |
String[] |
toArray()
Returns the most recent marshalled bean object as a String[] for csv and delimited formatted streams. |
Document |
toDocument()
Returns the most recent marshalled bean object as a Document for xml
formatted streams. |
List<String> |
toList()
Returns the most recent marshalled bean object as a List for csv
and delimited formatted streams. |
String |
toString()
Returns the most recent marshalled bean object as a String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MarshallerImpl(MarshallingContext context, Selector layout, RecordMarshaller recordMarshaller)
context
- the UnmarshallingContext
layout
- the stream layoutrecordMarshaller
- the RecordMarshaller
for converting record text to record valuesMethod Detail |
---|
public Marshaller marshal(Object bean) throws BeanWriterException
Marshaller
marshal
in interface Marshaller
bean
- the bean object to marshal
BeanWriterException
- if a record is not matched for the given bean object,
or in some other rare (but fatal) conditionspublic Marshaller marshal(String recordName, Object bean) throws BeanWriterException
Marshaller
marshal
in interface Marshaller
recordName
- the name of the record to marshalbean
- the bean object to marshal
BeanWriterException
- if a record is not matched for the given record name
and bean object, or in some other rare (but fatal) conditionspublic String toString()
Marshaller
toString
in interface Marshaller
toString
in class Object
public String[] toArray() throws BeanWriterException
Marshaller
toArray
in interface Marshaller
BeanWriterException
- if an array is not supported by the stream formatpublic List<String> toList() throws BeanWriterException
Marshaller
List
for csv
and delimited formatted streams.
toList
in interface Marshaller
List
of fields
BeanWriterException
- if an array is not supported by the stream formatpublic Document toDocument() throws BeanWriterException
Marshaller
Document
for xml
formatted streams.
toDocument
in interface Marshaller
Document
BeanWriterException
- if Document
is not supported by the stream formatprotected Object getRecordValue()
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |