|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.binding.def.PrecompiledBinding
public class PrecompiledBinding
Linkage to object marshalling/unmarshalling code for a class handled by an abstract mapping in a precompiled binding. This is constructed from the information in the binding factory, then used in the actual code generation processing to call the methods when referenced.
| Constructor Summary | |
|---|---|
PrecompiledBinding(int index,
String[][] abmaps,
boolean xlated,
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 |
genNewInstance(ContextMethodBuilder mb)
Generate code to create new instance of object. |
String |
getAttributeMarshalMethod()
Get the method which marshals attributes from an instance. |
String |
getAttributePresentTestMethod()
Get the method which checks attributes to determine if an instance is present. |
String |
getAttributeUnmarshalMethod()
Get the method which unmarshals attributes into an instance. |
String |
getCompleteMethod()
Get the method which handles unmarshalling completion. |
String |
getContentMarshalMethod()
Get the method which marshals child elements and character data content from an instance. |
String |
getContentPresentTestMethod()
Get the method which checks child elements to determine if an instance is present. |
String |
getContentUnmarshalMethod()
Get the method which unmarshals child elements and character data content into an instance. |
String |
getCreateMethod()
Get the method which creates an instance of the bound class if one does not already exist. |
String |
getPrepareMethod()
Get the method which handles preparation for marshalling an instance. |
String |
getType()
Get type expected by component. |
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 PrecompiledBinding(int index,
String[][] abmaps,
boolean xlated,
String factname)
throws JiBXException
index - abstract mapping index in bindingabmaps - abstract mapping information from bindingxlated - translated namespaces for binding flagfactname - binding factory name
JiBXException - on error loading class information| Method Detail |
|---|
public boolean isOptional()
IComponent
isOptional in interface IComponenttrue if optional, false if required
public void genAttributeUnmarshal(ContextMethodBuilder mb)
throws JiBXException
IComponent
genAttributeUnmarshal in interface IComponentmb - method builder
JiBXException - if error in configuration
public void genAttributeMarshal(ContextMethodBuilder mb)
throws JiBXException
IComponent
genAttributeMarshal in interface IComponentmb - method builder
JiBXException - if error in configuration
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 configuration
public void genNewInstance(ContextMethodBuilder mb)
throws JiBXException
IComponent
genNewInstance in interface IComponentmb - method builder
JiBXException - if error in configuration
public void genAttrPresentTest(ContextMethodBuilder mb)
throws JiBXException
IComponent
genAttrPresentTest in interface IComponentmb - method builder
JiBXException - if configuration error
public void genContentPresentTest(ContextMethodBuilder mb)
throws JiBXException
IComponent
genContentPresentTest in interface IComponentmb - method builder
JiBXException - if configuration errorpublic 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 void setLinkages()
ILinkable
setLinkages in interface ILinkablepublic NameDefinition getWrapperName()
IComponent
getWrapperName in interface IComponentnull if no wrapper elementpublic boolean hasAttribute()
IComponent
hasAttribute in interface IComponenttrue if one or more attribute values defined for
containing element, false if notpublic boolean hasContent()
IComponentILinkable.setLinkages().
hasContent in interface IComponenttrue if one or more content values defined
for containing element, false if not
public String getAttributeMarshalMethod()
throws JiBXException
ITypeBinding
getAttributeMarshalMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public String getAttributePresentTestMethod()
throws JiBXException
ITypeBindingtrue if an attribute of the mapping
is found, false if not.
getAttributePresentTestMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public String getAttributeUnmarshalMethod()
throws JiBXException
ITypeBinding
getAttributeUnmarshalMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public String getCompleteMethod()
throws JiBXException
ITypeBinding
getCompleteMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public String getContentMarshalMethod()
throws JiBXException
ITypeBinding
getContentMarshalMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public String getContentPresentTestMethod()
throws JiBXException
ITypeBindingtrue if an attribute of the mapping
is found, false if not.
getContentPresentTestMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public String getContentUnmarshalMethod()
throws JiBXException
ITypeBinding
getContentUnmarshalMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public String getCreateMethod()
throws JiBXException
ITypeBindingnull that reference will
simply be returned; otherwise, a new instance will be created and
returned. This method also handles any appropriate pre-set processing for
the instance.
getCreateMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public String getPrepareMethod()
throws JiBXException
ITypeBinding
getPrepareMethod in interface ITypeBindingnull if none
JiBXException - on error in code generationpublic void print(int depth)
print in interface IComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||