|
||||||
| 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.
| Field Summary | |
|---|---|
private java.lang.String |
m_attributePresenceName
Name for attribute presence test method ( null if none). |
private ClassFile |
m_class
Class handled by binding. |
private java.lang.String |
m_completeName
Complete method name ( null if none). |
private java.lang.String |
m_completeSignature
Signature used for complete method. |
private java.lang.String |
m_contentPresenceName
Name for content presence test method ( null if none). |
private java.lang.String |
m_factoryName
Binding factory name used for activating namespace translation on marshalling ( null if translation not required). |
private java.lang.String |
m_marshalAttributeName
Name for marshal attribute method ( null if none). |
private java.lang.String |
m_marshalContentName
Name for marshal content method ( null if none). |
private java.lang.String |
m_marshalSignature
Signature used for marshalling (and prepare) methods. |
private java.lang.String |
m_newInstanceName
New instance method name. |
private java.lang.String |
m_prepareName
Prepare method name ( null if none). |
private java.lang.String |
m_unmarshalAttributeName
Name for unmarshal attribute method ( null if none). |
private java.lang.String |
m_unmarshalContentName
Name for unmarshal content method ( null if none). |
private java.lang.String |
m_unmarshalSignature
Signature used for unmarshalling (and new instance) methods. |
private static java.lang.String |
MARSHALLING_CONTEXT
|
private static java.lang.String |
MARSHALLING_CONTEXT_SIG
|
private static java.lang.String |
POP_NAMESPACES_METHOD
|
private static java.lang.String |
POP_NAMESPACES_SIG
|
private static java.lang.String |
PRESENCE_TEST_SIG
|
private static java.lang.String |
PUSH_NAMESPACES_METHOD
|
private static java.lang.String |
PUSH_NAMESPACES_SIG
|
private static java.lang.String |
UNMARSHALLING_CONTEXT
|
private static java.lang.String |
UNMARSHALLING_CONTEXT_SIG
|
| Constructor Summary | |
|---|---|
PrecompiledBinding(int index,
java.lang.String[][] abmaps,
boolean xlated,
java.lang.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. |
java.lang.String |
getAttributeMarshalMethod()
Get the method which marshals attributes from an instance. |
java.lang.String |
getAttributePresentTestMethod()
Get the method which checks attributes to determine if an instance is present. |
java.lang.String |
getAttributeUnmarshalMethod()
Get the method which unmarshals attributes into an instance. |
java.lang.String |
getCompleteMethod()
Get the method which handles unmarshalling completion. |
java.lang.String |
getContentMarshalMethod()
Get the method which marshals child elements and character data content from an instance. |
java.lang.String |
getContentPresentTestMethod()
Get the method which checks child elements to determine if an instance is present. |
java.lang.String |
getContentUnmarshalMethod()
Get the method which unmarshals child elements and character data content into an instance. |
java.lang.String |
getCreateMethod()
Get the method which creates an instance of the bound class if one does not already exist. |
java.lang.String |
getPrepareMethod()
Get the method which handles preparation for marshalling an instance. |
java.lang.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 |
| Field Detail |
|---|
private static final java.lang.String MARSHALLING_CONTEXT
private static final java.lang.String UNMARSHALLING_CONTEXT
private static final java.lang.String MARSHALLING_CONTEXT_SIG
private static final java.lang.String UNMARSHALLING_CONTEXT_SIG
private static final java.lang.String PRESENCE_TEST_SIG
private static final java.lang.String PUSH_NAMESPACES_METHOD
private static final java.lang.String PUSH_NAMESPACES_SIG
private static final java.lang.String POP_NAMESPACES_METHOD
private static final java.lang.String POP_NAMESPACES_SIG
private final ClassFile m_class
private final java.lang.String m_newInstanceName
private final java.lang.String m_completeName
null if none).
private final java.lang.String m_prepareName
null if none).
private final java.lang.String m_attributePresenceName
null if none).
private final java.lang.String m_contentPresenceName
null if none).
private final java.lang.String m_unmarshalAttributeName
null if none).
private final java.lang.String m_unmarshalContentName
null if none).
private final java.lang.String m_marshalAttributeName
null if none).
private final java.lang.String m_marshalContentName
null if none).
private final java.lang.String m_unmarshalSignature
private final java.lang.String m_completeSignature
private final java.lang.String m_marshalSignature
private final java.lang.String m_factoryName
null if translation not required).
| Constructor Detail |
|---|
public PrecompiledBinding(int index,
java.lang.String[][] abmaps,
boolean xlated,
java.lang.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 java.lang.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 java.lang.String getAttributeMarshalMethod()
throws JiBXException
ITypeBinding
getAttributeMarshalMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public java.lang.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 java.lang.String getAttributeUnmarshalMethod()
throws JiBXException
ITypeBinding
getAttributeUnmarshalMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public java.lang.String getCompleteMethod()
throws JiBXException
ITypeBinding
getCompleteMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public java.lang.String getContentMarshalMethod()
throws JiBXException
ITypeBinding
getContentMarshalMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public java.lang.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 java.lang.String getContentUnmarshalMethod()
throws JiBXException
ITypeBinding
getContentUnmarshalMethod in interface ITypeBindingnull if none
JiBXException - on error in code generation
public java.lang.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 java.lang.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 | |||||