|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jibx.extras.DiscardElementMapper
public class DiscardElementMapper
Custom marshaller/unmarshaller for arbitrary ignored element. This ignores an element when unmarshalling, if one is present, and does nothing when marshalling.
Constructor Summary | |
---|---|
DiscardElementMapper()
|
Method Summary | |
---|---|
boolean |
isExtension(java.lang.String mapname)
Check if marshaller represents an extension mapping. |
boolean |
isPresent(IUnmarshallingContext ctx)
Check if instance present in XML. |
void |
marshal(java.lang.Object obj,
IMarshallingContext ictx)
Marshal instance of handled class. |
java.lang.Object |
unmarshal(java.lang.Object obj,
IUnmarshallingContext ictx)
Unmarshal instance of handled class. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiscardElementMapper()
Method Detail |
---|
public boolean isExtension(java.lang.String mapname)
IMarshaller
isExtension
in interface IMarshaller
mapname
- marshaller mapping name (generally the class name to be
handled, or abstract mapping type name)
true
if this mapping is an extension of the abstract
mapping, false
if notpublic void marshal(java.lang.Object obj, IMarshallingContext ictx)
IMarshaller
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
is not optional)ictx
- XML text output contextpublic boolean isPresent(IUnmarshallingContext ctx) throws JiBXException
IUnmarshaller
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
true
if expected parse data found,
false
if not
JiBXException
- on error in unmarshalling processpublic java.lang.Object unmarshal(java.lang.Object obj, IUnmarshallingContext ictx) throws JiBXException
IUnmarshaller
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
null
)
JiBXException
- on error in unmarshalling process
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |