|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FieldFormat
A FieldFormat provides format specific processing for a Field
parser.
Implementations of this interface must be thread-safe.
Method Summary | |
---|---|
String |
extract(UnmarshallingContext context,
boolean reportErrors)
Extracts the field text from a record. |
int |
getSize()
Returns the size of the field. |
void |
insertField(MarshallingContext context,
String text)
Inserts field text into a record. |
boolean |
insertValue(MarshallingContext context,
Object value)
Inserts a value into a record. |
boolean |
isLazy()
TODO rename isLazy to something better?? Returns whether this field is optionally present in the record. |
boolean |
isNillable()
Returns whether this field is nillable. |
Method Detail |
---|
String extract(UnmarshallingContext context, boolean reportErrors)
May return Value.INVALID
if the field is invalid, or Value.NIL
if the field is explicitly set to nil or null such as in an XML or JSON formatted
stream.
Implementations should also remove any field padding before returning the text.
context
- the UnmarshallingContext
holding the record
boolean insertValue(MarshallingContext context, Object value)
insertField(MarshallingContext, String)
is called. If the method returns true, insertField(MarshallingContext, String)
is not invoked.
context
- the MarshallingContext
value
- the value to insert into the record
insertField(MarshallingContext, String)
must be invoked, false otherwisevoid insertField(MarshallingContext context, String text)
context
- the MarshallingContext
holding the recordtext
- the field text to insert into the recordint getSize()
boolean isNillable()
boolean isLazy()
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |