| java.lang.Object org.jibx.binding.def.DirectGeneric
DirectGeneric | public class DirectGeneric implements IComponent(Code) | | Linkage to generic object with defined marshaller and/or unmarshaller. This
provides methods used to generate code for marshalling and unmarshalling
objects of types unknown at binding time, so long as they have mappings
defined.
author: Dennis M. Sosnoski version: 1.0 |
DirectGeneric | public DirectGeneric(IContainer parent, String type)(Code) | | Constructor without implicit property.
Parameters: parent - containing binding definition structure Parameters: type - fully qualified class name of object type handled by thisbinding (null if unspecified) |
DirectGeneric | public DirectGeneric(IContainer parent, String type, PropertyDefinition prop)(Code) | | Constructor with defined property.
Parameters: parent - containing binding definition structure Parameters: type - fully qualified class name of object type handled by thisbinding (null if unspecified) Parameters: prop - associated property information |
genMarshal | public void genMarshal(ContextMethodBuilder mb) throws JiBXException(Code) | | Generate marshalling code for this mapping. The generated code loads the
object reference and casts it to the generic marshal interface, then
calls the marshal method of that interface.
Parameters: mb - method builder |
genTestPresent | public void genTestPresent(ContextMethodBuilder mb)(Code) | | Generate presence test code for this mapping. The generated code just
checks that a start tag is next in the document, rather than an end tag.
Parameters: mb - method builder |
genUnmarshal | public void genUnmarshal(ContextMethodBuilder mb) throws JiBXException(Code) | | Generate unmarshalling code for this mapping. The generated code just
calls the generic unmarshal element method, leaving the unmarshalled
object on the stack (after casting it, if necessary, to the appropriate
type).
TODO: Instead call unmarshalling method with class passed directly, for
better error reporting.
Parameters: mb - method builder |
hasAttribute | public boolean hasAttribute()(Code) | | |
hasContent | public boolean hasContent()(Code) | | |
hasId | public boolean hasId()(Code) | | |
isOptional | public boolean isOptional()(Code) | | |
print | public void print(int depth)(Code) | | |
setLinkages | public void setLinkages()(Code) | | |
|
|