IComponent, ILinkablepublic class ElementWrapper extends java.lang.Object implements IComponent
| Modifier and Type | Field | Description |
|---|---|---|
private IComponent |
m_component |
Property value binding component.
|
private DefinitionContext |
m_defContext |
Binding definition context.
|
private boolean |
m_directAccess |
Flag for value from collection (TODO: fix this in update).
|
private boolean |
m_isNillable |
Flag for nillable element.
|
private NameDefinition |
m_name |
Element name information.
|
private boolean |
m_optionalIgnored |
Flag for optional ignored element (TODO: fix this in update).
|
private boolean |
m_optionalNormal |
Flag for optional normal element (TODO: fix this in update).
|
private boolean |
m_structureObject |
Flag for optional structure object (TODO: fix this in update).
|
protected static java.lang.String |
MARSHAL_ATTRIBUTE |
|
protected static java.lang.String |
MARSHAL_CLOSESTART_EMPTY |
|
protected static java.lang.String |
MARSHAL_CLOSESTART_EMPTY_SIGNATURE |
|
private static java.lang.String |
MARSHAL_CLOSESTARTCONTENT |
|
private static java.lang.String |
MARSHAL_CLOSESTARTEMPTY |
|
private static java.lang.String |
MARSHAL_CLOSESTARTSIGNATURE |
|
protected static java.lang.String |
MARSHAL_SIGNATURE |
|
private static java.lang.String |
MARSHAL_STARTNAMESPACESSIGNATURE |
|
protected static java.lang.String |
MARSHAL_STARTTAG_ATTRIBUTES |
|
protected static java.lang.String |
MARSHAL_STARTTAG_SIGNATURE |
|
private static java.lang.String |
MARSHAL_WRITEENDMETHOD |
|
private static java.lang.String |
MARSHAL_WRITEENDSIGNATURE |
|
private static java.lang.String |
MARSHAL_WRITESTARTATTRIBUTES |
|
private static java.lang.String |
MARSHAL_WRITESTARTNAMESPACES |
|
private static java.lang.String |
MARSHAL_WRITESTARTNOATTRIBUTES |
|
private static java.lang.String |
MARSHAL_WRITESTARTSIGNATURE |
|
private static java.lang.String |
MARSHALLING_CONTEXT |
|
protected static java.lang.String |
UNMARSHAL_ATTRIBUTE_BOOLEAN_NAME |
|
protected static java.lang.String |
UNMARSHAL_ATTRIBUTE_BOOLEAN_SIGNATURE |
|
private static java.lang.String |
UNMARSHAL_ISATMETHOD |
|
private static java.lang.String |
UNMARSHAL_ISATSIGNATURE |
|
private static java.lang.String |
UNMARSHAL_PARSE_TO_START_NAME |
|
private static java.lang.String |
UNMARSHAL_PARSE_TO_START_SIGNATURE |
|
private static java.lang.String |
UNMARSHAL_PARSEENDMETHOD |
|
private static java.lang.String |
UNMARSHAL_PARSEENDSIGNATURE |
|
private static java.lang.String |
UNMARSHAL_PARSEPASTSTART |
|
private static java.lang.String |
UNMARSHAL_PARSESTARTATTRIBUTES |
|
private static java.lang.String |
UNMARSHAL_PARSESTARTNOATTRIBUTES |
|
private static java.lang.String |
UNMARSHAL_PARSESTARTSIGNATURE |
|
private static java.lang.String |
UNMARSHAL_SKIP_NAME |
|
private static java.lang.String |
UNMARSHAL_SKIP_SIGNATURE |
|
private static java.lang.String |
UNMARSHAL_SKIPELEMENTMETHOD |
|
private static java.lang.String |
UNMARSHAL_SKIPELEMENTSIGNATURE |
|
private static java.lang.String |
UNMARSHALLING_CONTEXT |
| Constructor | Description |
|---|---|
ElementWrapper(DefinitionContext defc,
NameDefinition name,
IComponent wrap,
boolean nillable) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
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 |
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 |
setDirect(boolean direct) |
Set the direct access flag.
|
void |
setLinkages() |
Establish and validate linkages between binding components.
|
void |
setOptionalIgnored(boolean opt) |
Set flag for an optional ignored element.
|
void |
setOptionalNormal(boolean opt) |
Set flag for an optional normal element.
|
void |
setStructureObject(boolean opt) |
Set flag for an optional structure object.
|
java.lang.String |
toString() |
private static final java.lang.String UNMARSHAL_PARSESTARTATTRIBUTES
private static final java.lang.String UNMARSHAL_PARSESTARTNOATTRIBUTES
private static final java.lang.String UNMARSHAL_PARSEPASTSTART
private static final java.lang.String UNMARSHAL_PARSESTARTSIGNATURE
private static final java.lang.String UNMARSHAL_PARSEENDMETHOD
private static final java.lang.String UNMARSHAL_PARSEENDSIGNATURE
private static final java.lang.String UNMARSHAL_ISATMETHOD
private static final java.lang.String UNMARSHAL_ISATSIGNATURE
private static final java.lang.String UNMARSHAL_SKIPELEMENTMETHOD
private static final java.lang.String UNMARSHAL_SKIPELEMENTSIGNATURE
private static final java.lang.String MARSHAL_WRITESTARTNAMESPACES
private static final java.lang.String MARSHAL_STARTNAMESPACESSIGNATURE
private static final java.lang.String MARSHAL_WRITESTARTATTRIBUTES
private static final java.lang.String MARSHAL_WRITESTARTNOATTRIBUTES
private static final java.lang.String MARSHAL_WRITESTARTSIGNATURE
private static final java.lang.String MARSHAL_CLOSESTARTCONTENT
private static final java.lang.String MARSHAL_CLOSESTARTEMPTY
private static final java.lang.String MARSHAL_CLOSESTARTSIGNATURE
private static final java.lang.String MARSHAL_WRITEENDMETHOD
private static final java.lang.String MARSHAL_WRITEENDSIGNATURE
private static final java.lang.String UNMARSHAL_PARSE_TO_START_NAME
private static final java.lang.String UNMARSHAL_PARSE_TO_START_SIGNATURE
protected static final java.lang.String UNMARSHAL_ATTRIBUTE_BOOLEAN_NAME
protected static final java.lang.String UNMARSHAL_ATTRIBUTE_BOOLEAN_SIGNATURE
private static final java.lang.String UNMARSHAL_SKIP_NAME
private static final java.lang.String UNMARSHAL_SKIP_SIGNATURE
protected static final java.lang.String MARSHAL_STARTTAG_ATTRIBUTES
protected static final java.lang.String MARSHAL_STARTTAG_SIGNATURE
protected static final java.lang.String MARSHAL_CLOSESTART_EMPTY
protected static final java.lang.String MARSHAL_CLOSESTART_EMPTY_SIGNATURE
protected static final java.lang.String MARSHAL_ATTRIBUTE
protected static final java.lang.String MARSHAL_SIGNATURE
private static final java.lang.String MARSHALLING_CONTEXT
private static final java.lang.String UNMARSHALLING_CONTEXT
private final IComponent m_component
private final DefinitionContext m_defContext
private final NameDefinition m_name
private final boolean m_isNillable
private boolean m_directAccess
private boolean m_optionalIgnored
private boolean m_optionalNormal
private boolean m_structureObject
public ElementWrapper(DefinitionContext defc, NameDefinition name, IComponent wrap, boolean nillable)
defc - definition context for this componentname - element name definitionwrap - wrapped binding component (may be null, in the
case of a throwaway component)nillable - flag for nillable elementpublic void setDirect(boolean direct)
direct - true if direct access from collection,
false if notpublic void setOptionalIgnored(boolean opt)
opt - true if optional ignored element,
false if notpublic void setStructureObject(boolean opt)
opt - true if optional structure object,
false if notpublic void setOptionalNormal(boolean opt)
opt - true if optional normal element,
false if notpublic boolean isOptional()
IComponentisOptional in interface IComponenttrue if optional, false if requiredpublic boolean hasAttribute()
IComponenthasAttribute in interface IComponenttrue if one or more attribute values defined for
containing element, false if notpublic void genAttrPresentTest(ContextMethodBuilder mb)
IComponentgenAttrPresentTest in interface IComponentmb - method builderpublic void genAttributeUnmarshal(ContextMethodBuilder mb)
IComponentgenAttributeUnmarshal in interface IComponentmb - method builderpublic void genAttributeMarshal(ContextMethodBuilder mb)
IComponentgenAttributeMarshal 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 notpublic void genContentPresentTest(ContextMethodBuilder mb) throws JiBXException
IComponentgenContentPresentTest in interface IComponentmb - method builderJiBXException - if configuration errorpublic void genContentUnmarshal(ContextMethodBuilder mb) throws JiBXException
IComponentgenContentUnmarshal in interface IComponentmb - method builderJiBXException - if error in configurationpublic void genContentMarshal(ContextMethodBuilder mb) throws JiBXException
IComponentgenContentMarshal in interface IComponentmb - method builderJiBXException - if error in configurationpublic void genNewInstance(ContextMethodBuilder mb) throws JiBXException
IComponentgenNewInstance in interface IComponentmb - method builderJiBXException - if error in configurationpublic java.lang.String getType()
IComponentgetType in interface IComponentpublic boolean hasId()
IComponenthasId in interface IComponenttrue if ID value defined for instances,
false if notpublic void genLoadId(ContextMethodBuilder mb) throws JiBXException
IComponentString).genLoadId in interface IComponentmb - method builderJiBXException - if configuration errorpublic NameDefinition getWrapperName()
IComponentgetWrapperName in interface IComponentnull if no wrapper elementpublic void setLinkages()
throws JiBXException
ILinkablesetLinkages in interface ILinkableJiBXException - if error in configurationpublic void print(int depth)
print in interface IComponentpublic java.lang.String toString()
toString in class java.lang.Object