|
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.util.TreeNode<Component> org.beanio.internal.parser.Component org.beanio.internal.parser.ParserComponent org.beanio.internal.parser.DelegatingParser
public abstract class DelegatingParser
Constructor Summary | |
---|---|
DelegatingParser()
Constructs a new DelegatingParser. |
Method Summary | |
---|---|
void |
clearValue(ParsingContext context)
Clears the current property value. |
protected Parser |
getParser()
|
int |
getSize()
Returns the size of a single occurrence of this element, which is used to offset field positions for repeating segments and fields. |
Object |
getValue(ParsingContext context)
Returns the unmarshalled property value. |
boolean |
hasContent(ParsingContext context)
Returns whether this parser or any of its descendant have content for marshalling. |
boolean |
isIdentifier()
Returns whether this parser or any descendant of this parser is used to identify a record during unmarshalling. |
boolean |
isLazy()
Returns whether this node must exist during unmarshalling. |
boolean |
marshal(MarshallingContext context)
Marshals a record. |
boolean |
matches(UnmarshallingContext context)
Returns whether this parser and its children match a record being unmarshalled. |
void |
setValue(ParsingContext context,
Object value)
Sets the property value for marshaling. |
boolean |
unmarshal(UnmarshallingContext context)
Unmarshals a record. |
Methods inherited from class org.beanio.internal.parser.ParserComponent |
---|
isSupportedChild |
Methods inherited from class org.beanio.internal.parser.Component |
---|
registerLocals |
Methods inherited from class org.beanio.internal.util.TreeNode |
---|
add, clone, find, getChildren, getFirst, getName, iterator, print, setName, size, sort, toParamString, toString, updateReferences |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.beanio.internal.parser.Parser |
---|
getName |
Constructor Detail |
---|
public DelegatingParser()
Method Detail |
---|
public boolean matches(UnmarshallingContext context)
Parser
context
- the UnmarshallingContext
public boolean unmarshal(UnmarshallingContext context)
Parser
context
- the UnmarshallingContext
public boolean marshal(MarshallingContext context) throws IOException
Parser
context
- the MarshallingContext
IOException
- if an I/O error occurspublic void clearValue(ParsingContext context)
Parser
context
- the ParsingContext
public void setValue(ParsingContext context, Object value)
Parser
context
- the ParsingContext
value
- the property valuepublic Object getValue(ParsingContext context)
Parser
context
- the ParsingContext
public int getSize()
Parser
The concept of size is dependent on the stream format. The size of an element in a fixed length stream format is determined by the length of the element in characters, while other stream formats calculate size based on the number of fields. Some stream formats, such as XML, may ignore size settings.
public boolean isLazy()
Parser
public boolean isIdentifier()
Parser
public boolean hasContent(ParsingContext context)
Parser
context
- the ParsingContext
protected Parser getParser()
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |