| java.lang.Object org.jibx.binding.def.DirectObject
DirectObject | public class DirectObject implements IComponent(Code) | | Linkage to object with supplied marshaller and unmarshaller. This provides
methods used to generate code for calling the supplied classes.
author: Dennis M. Sosnoski version: 1.0 |
DirectObject | public DirectObject(IContainer parent, DefinitionContext defc, ClassFile target, boolean abs, ClassFile mcf, ClassFile ucf, int slot, NameDefinition name) throws JiBXException(Code) | | Constructor.
Parameters: parent - containing binding definition structure Parameters: target - class handled by this binding Parameters: abs - abstract mapping flag Parameters: mcf - marshaller class information (null if input onlybinding) Parameters: ucf - unmarshaller class information (null if outputonly binding) Parameters: slot - marshaller/unmarshaller slot number (-1 if to bedefined later) Parameters: name - element name information (null if no elementname) throws: JiBXException - if configuration error |
genMarshal | public void genMarshal(ContextMethodBuilder mb) throws JiBXException(Code) | | Generate marshalling code for this mapping. The generated code finds
and calls the marshaller, passing the object to be marshalled (which
should have been loaded to the stack by the prior generated code)..
Parameters: mb - method builder throws: JiBXException - if error in configuration |
genTestPresent | public void genTestPresent(ContextMethodBuilder mb) throws JiBXException(Code) | | Generate presence test code for this mapping. The generated code finds
the unmarshaller and calls the test method, leaving the result on the
stack.
Parameters: mb - method builder throws: JiBXException - if error in generating code |
genUnmarshal | public void genUnmarshal(ContextMethodBuilder mb) throws JiBXException(Code) | | Generate unmarshalling code for this mapping. The generated code finds
and calls the unmarshaller with the object to be unmarshaller (which
needs to be loaded on the stack by the code prior to this call, but may
be null ). The unmarshalled object (or null in
the case of a missing optional item) is left on the stack after this
call. The calling method generally needs to cast this object reference to
the appropriate type before using it.
Parameters: mb - method builder throws: JiBXException - if error in generating code |
getMarshaller | public ClassFile getMarshaller() throws JiBXException(Code) | | Get marshaller class used for mapping. If a name has been supplied the
actual marshaller class is created by extending the base class the first
time this method is called.
marshaller class information throws: JiBXException - if error in transformation |
getTargetClass | public ClassFile getTargetClass()(Code) | | Get target class for mapping.
target class information |
getUnmarshaller | public ClassFile getUnmarshaller() throws JiBXException(Code) | | Get unmarshaller class used for mapping. If a name has been supplied the
actual unmarshaller class is created by extending the base class the
first time this method is called.
unmarshaller class information throws: JiBXException - if error in transformation |
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) | | |
|
|