|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibx.binding.def.DirectGeneric
public class DirectGeneric
Linkage to generic object with defined marshaller and/or unmarshaller. This provides methods used to generate code for marshalling and unmarshalling objects of types unknown at binding time, so long as they have mappings defined.
Field Summary | |
---|---|
private static java.lang.String |
ISEND_METHOD
|
private static java.lang.String |
ISEND_SIGNATURE
|
private PropertyDefinition |
m_property
Optional property definition. |
private java.lang.String |
m_type
Type handled by this binding. |
private static java.lang.String |
MARSHALLABLE_INTERFACE
|
private static java.lang.String |
MARSHALLABLE_METHOD
|
private static java.lang.String |
MARSHALLABLE_SIGNATURE
|
private static java.lang.String |
UNMARSHALELEMENT_METHOD
|
private static java.lang.String |
UNMARSHALELEMENT_SIGNATURE
|
Constructor Summary | |
---|---|
DirectGeneric(IContainer parent,
java.lang.String type)
Constructor without implicit property. |
|
DirectGeneric(IContainer parent,
java.lang.String type,
PropertyDefinition prop)
Constructor with defined property. |
Method Summary | |
---|---|
boolean |
checkContentSequence(boolean text)
Check sequence of content values. |
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. |
java.lang.String |
getType()
Get type expected by component. |
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 ISEND_METHOD
private static final java.lang.String ISEND_SIGNATURE
private static final java.lang.String UNMARSHALELEMENT_METHOD
private static final java.lang.String UNMARSHALELEMENT_SIGNATURE
private static final java.lang.String MARSHALLABLE_INTERFACE
private static final java.lang.String MARSHALLABLE_METHOD
private static final java.lang.String MARSHALLABLE_SIGNATURE
private final java.lang.String m_type
private final PropertyDefinition m_property
Constructor Detail |
---|
public DirectGeneric(IContainer parent, java.lang.String type)
parent
- containing binding definition structuretype
- fully qualified class name of object type handled by this
binding (null
if unspecified)public DirectGeneric(IContainer parent, java.lang.String type, PropertyDefinition prop)
parent
- containing binding definition structuretype
- fully qualified class name of object type handled by this
binding (null
if unspecified)prop
- associated property informationMethod Detail |
---|
public void genTestPresent(ContextMethodBuilder mb)
mb
- method builderpublic void genUnmarshal(ContextMethodBuilder mb) throws JiBXException
mb
- method builder
JiBXException
public void genMarshal(ContextMethodBuilder mb) throws JiBXException
mb
- method builder
JiBXException
public boolean isOptional()
IComponent
isOptional
in interface IComponent
true
if optional, false
if requiredpublic boolean hasAttribute()
IComponent
hasAttribute
in interface IComponent
true
if one or more attribute values defined for
containing element, false
if notpublic void genAttrPresentTest(ContextMethodBuilder mb)
IComponent
genAttrPresentTest
in interface IComponent
mb
- method builderpublic void genAttributeUnmarshal(ContextMethodBuilder mb)
IComponent
genAttributeUnmarshal
in interface IComponent
mb
- method builderpublic void genAttributeMarshal(ContextMethodBuilder mb)
IComponent
genAttributeMarshal
in interface IComponent
mb
- method builderpublic boolean hasContent()
IComponent
IComponent.setLinkages()
.
hasContent
in interface IComponent
true
if one or more content values defined
for containing element, false
if notpublic void genContentPresentTest(ContextMethodBuilder mb) throws JiBXException
IComponent
genContentPresentTest
in interface IComponent
mb
- method builder
JiBXException
- if configuration errorpublic void genContentUnmarshal(ContextMethodBuilder mb) throws JiBXException
IComponent
genContentUnmarshal
in interface IComponent
mb
- method builder
JiBXException
- if error in configurationpublic void genContentMarshal(ContextMethodBuilder mb) throws JiBXException
IComponent
genContentMarshal
in interface IComponent
mb
- method builder
JiBXException
- if error in configurationpublic void genNewInstance(ContextMethodBuilder mb)
IComponent
genNewInstance
in interface IComponent
mb
- method builderpublic java.lang.String getType()
IComponent
getType
in interface IComponent
public boolean hasId()
IComponent
hasId
in interface IComponent
true
if ID value defined for instances,
false
if notpublic void genLoadId(ContextMethodBuilder mb)
IComponent
String
).
genLoadId
in interface IComponent
mb
- method builderpublic boolean checkContentSequence(boolean text)
IComponent
checkContentSequence
in interface IComponent
text
- allow text value flag from last component
public void setLinkages()
IComponent
setLinkages
in interface IComponent
public void print(int depth)
print
in interface IComponent
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |