|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.binding.def.DirectObject
public class DirectObject
Linkage to object with supplied marshaller and unmarshaller. This provides methods used to generate code for calling the supplied classes.
| Constructor Summary | |
|---|---|
DirectObject(IContainer parent,
DefinitionContext defc,
ClassFile target,
boolean abs,
ClassFile mcf,
ClassFile ucf,
String mapname,
NameDefinition name,
String factname)
Constructor. |
|
| Method Summary | |
|---|---|
void |
genAttributeMarshal(ContextMethodBuilder mb)
Generate attribute marshalling code. |
void |
genAttributeUnmarshal(ContextMethodBuilder mb)
Generate attribute unmarshalling code. |
void |
genAttrPresentTest(ContextMethodBuilder mb)
Generate code to test for attribute present. |
void |
genContentMarshal(ContextMethodBuilder mb)
Generate element or text marshalling code. |
void |
genContentPresentTest(ContextMethodBuilder mb)
Generate code to test for content present. |
void |
genContentUnmarshal(ContextMethodBuilder mb)
Generate element or text unmarshalling code. |
void |
genLoadId(ContextMethodBuilder mb)
Generate code to load ID value of instance to stack. |
void |
genMarshal(ContextMethodBuilder mb)
Generate marshalling code for this mapping. |
void |
genNewInstance(ContextMethodBuilder mb)
Generate code to create new instance of object. |
void |
genTestPresent(ContextMethodBuilder mb)
Generate presence test code for this mapping. |
void |
genUnmarshal(ContextMethodBuilder mb)
Generate unmarshalling code for this mapping. |
ClassFile |
getMarshaller()
Get marshaller class used for mapping. |
ClassFile |
getTargetClass()
Get target class for mapping. |
String |
getType()
Get type expected by component. |
ClassFile |
getUnmarshaller()
Get unmarshaller class used for mapping. |
NameDefinition |
getWrapperName()
Get element wrapper name. |
boolean |
hasAttribute()
Check if component defines one or more attribute values of the containing element. |
boolean |
hasContent()
Check if component defines one or more elements or text values as children of the containing element. |
boolean |
hasId()
Check if component defines an ID value for instances of context object. |
boolean |
isOptional()
Check if component is an optional item. |
void |
print(int depth)
|
void |
setLinkages()
Establish and validate linkages between binding components. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectObject(IContainer parent,
DefinitionContext defc,
ClassFile target,
boolean abs,
ClassFile mcf,
ClassFile ucf,
String mapname,
NameDefinition name,
String factname)
throws JiBXException
parent - containing binding definition structuredefc - active definitions contexttarget - class handled by this bindingabs - abstract mapping flagmcf - marshaller class information (null if input only
binding)ucf - unmarshaller class information (null if output
only binding)mapname - mapping name in binding definition tables
(null if to be constructed)name - element name information (null if no element
name)factname - binding factory name for marshalling namespace
translation (null if no namespace translation)
JiBXException - if configuration error| Method Detail |
|---|
public void genTestPresent(ContextMethodBuilder mb)
throws JiBXException
mb - method builder
JiBXException - if error in generating code
public void genUnmarshal(ContextMethodBuilder mb)
throws JiBXException
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.
mb - method builder
JiBXException - if error in generating code
public void genMarshal(ContextMethodBuilder mb)
throws JiBXException
mb - method builder
JiBXException - if error in configurationpublic ClassFile getTargetClass()
public ClassFile getMarshaller()
throws JiBXException
JiBXException - if error in transformation
public ClassFile getUnmarshaller()
throws JiBXException
JiBXException - if error in transformationpublic boolean isOptional()
IComponent
isOptional in interface IComponenttrue if optional, false if requiredpublic boolean hasAttribute()
IComponent
hasAttribute in interface IComponenttrue if one or more attribute values defined for
containing element, false if notpublic void genAttrPresentTest(ContextMethodBuilder mb)
IComponent
genAttrPresentTest in interface IComponentmb - method builderpublic void genAttributeUnmarshal(ContextMethodBuilder mb)
IComponent
genAttributeUnmarshal in interface IComponentmb - method builderpublic void genAttributeMarshal(ContextMethodBuilder mb)
IComponent
genAttributeMarshal in interface IComponentmb - method builderpublic boolean hasContent()
IComponentILinkable.setLinkages().
hasContent in interface IComponenttrue if one or more content values defined
for containing element, false if not
public void genContentPresentTest(ContextMethodBuilder mb)
throws JiBXException
IComponent
genContentPresentTest in interface IComponentmb - method builder
JiBXException - if configuration error
public void genContentUnmarshal(ContextMethodBuilder mb)
throws JiBXException
IComponent
genContentUnmarshal in interface IComponentmb - method builder
JiBXException - if error in configuration
public void genContentMarshal(ContextMethodBuilder mb)
throws JiBXException
IComponent
genContentMarshal in interface IComponentmb - method builder
JiBXException - if error in configurationpublic void genNewInstance(ContextMethodBuilder mb)
IComponent
genNewInstance in interface IComponentmb - method builderpublic String getType()
IComponent
getType in interface IComponentpublic boolean hasId()
IComponent
hasId in interface IComponenttrue if ID value defined for instances,
false if notpublic void genLoadId(ContextMethodBuilder mb)
IComponentString).
genLoadId in interface IComponentmb - method builderpublic NameDefinition getWrapperName()
IComponent
getWrapperName in interface IComponentnull if no wrapper element
public void setLinkages()
throws JiBXException
ILinkable
setLinkages in interface ILinkableJiBXException - if error in configurationpublic void print(int depth)
print in interface IComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||