|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMarshaller
Marshaller interface definition. This interface must be implemented by the handler for marshalling an object.
Instances of classes implementing this interface must be serially reusable, meaning they can store state information while in the process of marshalling an object but must reset all state when called to marshal another object after the first one is done (even if the first object throws an exception during marshalling). The JiBX framework will only create one instance of a marshaller class (per marshalling context) for each mapped class using that marshaller. Generally the marshaller instance will not be called recursively, but this may happen in cases where the binding definition includes recursive mappings and the marshaller uses other marshallers (as opposed to handling all children directly).
Method Summary | |
---|---|
boolean |
isExtension(java.lang.String mapname)
Check if marshaller represents an extension mapping. |
void |
marshal(java.lang.Object obj,
IMarshallingContext ctx)
Marshal instance of handled class. |
Method Detail |
---|
boolean isExtension(java.lang.String mapname)
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 notvoid marshal(java.lang.Object obj, IMarshallingContext ctx) throws JiBXException
obj
- object to be marshalled (may be null
if property
is not optional)ctx
- XML text output context
JiBXException
- on error in marshalling process
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |