|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.binding.def.PassThroughComponent
org.jibx.binding.def.ObjectBinding
public class ObjectBinding
Binding modifiers that apply to a class reference. This adds the methods used for handling binding operations to the object class (or a helper class), then generates calls to the added methods as this binding definition is used.
| Field Summary |
|---|
| Fields inherited from class org.jibx.binding.def.PassThroughComponent |
|---|
m_component |
| Constructor Summary | |
|---|---|
ObjectBinding(IContainer contain,
IContextObj objc,
String type,
String fact,
String pres,
String posts,
String pget,
String ctype)
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. |
BoundClass |
getBoundClass()
Get class linked to binding element. |
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. |
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)
|
boolean |
setIdChild(IComponent child)
Set ID property. |
void |
setLinkages()
Establish and validate linkages between binding components. |
| Methods inherited from class org.jibx.binding.def.PassThroughComponent |
|---|
getWrapperName, hasAttribute, setWrappedComponent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jibx.binding.def.IComponent |
|---|
getWrapperName, hasAttribute |
| Constructor Detail |
|---|
public ObjectBinding(IContainer contain,
IContextObj objc,
String type,
String fact,
String pres,
String posts,
String pget,
String ctype)
throws JiBXException
contain - containing binding definition componentobjc - current object contexttype - fully qualified class name for bound objectfact - user new instance factory methodpres - user preset method for unmarshallingposts - user postset method for unmarshallingpget - user preget method for marshallingctype - type to use for creating new instance (null if
not specified)
JiBXException - if method not found| Method Detail |
|---|
public BoundClass getBoundClass()
IContextObj
getBoundClass in interface IContextObjpublic boolean setIdChild(IComponent child)
IContextObj
setIdChild in interface IContextObjchild - child defining the ID property
true if successful, false if ID
already definedpublic boolean isOptional()
IComponent
isOptional in interface IComponentisOptional in class PassThroughComponenttrue if optional, false if requiredpublic boolean hasContent()
IComponentILinkable.setLinkages().
hasContent in interface IComponenthasContent in class PassThroughComponenttrue if one or more content values defined
for containing element, false if not
public void genAttrPresentTest(ContextMethodBuilder mb)
throws JiBXException
IComponent
genAttrPresentTest in interface IComponentgenAttrPresentTest in class PassThroughComponentmb - method builder
JiBXException - if configuration error
public void genContentPresentTest(ContextMethodBuilder mb)
throws JiBXException
IComponent
genContentPresentTest in interface IComponentgenContentPresentTest in class PassThroughComponentmb - method builder
JiBXException - if configuration error
public void genAttributeUnmarshal(ContextMethodBuilder mb)
throws JiBXException
IComponent
genAttributeUnmarshal in interface IComponentgenAttributeUnmarshal in class PassThroughComponentmb - method builder
JiBXException - if error in configuration
public void genAttributeMarshal(ContextMethodBuilder mb)
throws JiBXException
IComponent
genAttributeMarshal in interface IComponentgenAttributeMarshal in class PassThroughComponentmb - method builder
JiBXException - if error in configuration
public void genContentUnmarshal(ContextMethodBuilder mb)
throws JiBXException
IComponent
genContentUnmarshal in interface IComponentgenContentUnmarshal in class PassThroughComponentmb - method builder
JiBXException - if error in configuration
public void genContentMarshal(ContextMethodBuilder mb)
throws JiBXException
IComponent
genContentMarshal in interface IComponentgenContentMarshal in class PassThroughComponentmb - method builder
JiBXException - if error in configuration
public void genNewInstance(ContextMethodBuilder mb)
throws JiBXException
IComponent
genNewInstance in interface IComponentgenNewInstance in class PassThroughComponentmb - method builder
JiBXException - if error in configurationpublic String getType()
IComponent
getType in interface IComponentgetType in class PassThroughComponentpublic boolean hasId()
IComponent
hasId in interface IComponenthasId in class PassThroughComponenttrue if ID value defined for instances,
false if not
public void genLoadId(ContextMethodBuilder mb)
throws JiBXException
IComponentString).
genLoadId in interface IComponentgenLoadId in class PassThroughComponentmb - method builder
JiBXException - if configuration error
public void setLinkages()
throws JiBXException
ILinkable
setLinkages in interface ILinkablesetLinkages in class PassThroughComponentJiBXException - if error in configuration
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 IComponentprint in class PassThroughComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||