public class ComponentProperty extends PassThroughComponent
Modifier and Type | Field and Description |
---|---|
private boolean |
m_forceUnmarshal
Fake content to force unmarshal to create an object.
|
private PropertyDefinition |
m_property
Property definition.
|
private boolean |
m_skipMarshal
Skip marshalling code tests flag.
|
m_component
Constructor and Description |
---|
ComponentProperty(PropertyDefinition prop,
IComponent impl,
boolean skip)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
genAttributeMarshal(ContextMethodBuilder mb)
Generate attribute marshalling code.
|
void |
genAttributeUnmarshal(ContextMethodBuilder mb)
Generate attribute unmarshalling code.
|
void |
genContentMarshal(ContextMethodBuilder mb)
Generate element or text marshalling code.
|
void |
genContentUnmarshal(ContextMethodBuilder mb)
Generate element or text unmarshalling code.
|
private void |
genLoadUnmarshalInstance(ContextMethodBuilder mb)
Generate the code to load, and if necessary create, the object instance
to be unmarshalled.
|
private void |
genStoreUnmarshalInstance(ContextMethodBuilder mb)
Generate the code to store the unmarshalled object instance.
|
PropertyDefinition |
getProperty()
Get the property information.
|
boolean |
hasContent()
Check if component defines one or more elements or text values as
children of the containing element.
|
boolean |
isOptional()
Check if component is an optional item.
|
void |
print(int depth) |
void |
setForceUnmarshal(boolean force)
Set flag to force unmarshalling to create an object.
|
void |
setSkipping(boolean skip)
Set flag for skipping marshalling presence test code generation.
|
genAttrPresentTest, genContentPresentTest, genLoadId, genNewInstance, getType, getWrapperName, hasAttribute, hasId, setLinkages, setWrappedComponent
private final PropertyDefinition m_property
private boolean m_skipMarshal
private boolean m_forceUnmarshal
public ComponentProperty(PropertyDefinition prop, IComponent impl, boolean skip)
prop
- actual property definitionimpl
- component that defines marshalling and unmarshallingskip
- flag for marshalling code tests to be skippedpublic void setSkipping(boolean skip)
skip
- true
if skipping, false
if notpublic void setForceUnmarshal(boolean force)
force
- true
if skipping, false
if notpublic PropertyDefinition getProperty()
null
value directly to the property when
unmarshalling a missing or xsi:nil element.private void genLoadUnmarshalInstance(ContextMethodBuilder mb) throws JiBXException
mb
- JiBXException
private void genStoreUnmarshalInstance(ContextMethodBuilder mb) throws JiBXException
mb
- JiBXException
public boolean isOptional()
IComponent
isOptional
in interface IComponent
isOptional
in class PassThroughComponent
true
if optional, false
if requiredpublic boolean hasContent()
IComponent
ILinkable.setLinkages()
.hasContent
in interface IComponent
hasContent
in class PassThroughComponent
true
if one or more content values defined
for containing element, false
if notpublic void genAttributeUnmarshal(ContextMethodBuilder mb) throws JiBXException
IComponent
genAttributeUnmarshal
in interface IComponent
genAttributeUnmarshal
in class PassThroughComponent
mb
- method builderJiBXException
- if error in configurationpublic void genAttributeMarshal(ContextMethodBuilder mb) throws JiBXException
IComponent
genAttributeMarshal
in interface IComponent
genAttributeMarshal
in class PassThroughComponent
mb
- method builderJiBXException
- if error in configurationpublic void genContentUnmarshal(ContextMethodBuilder mb) throws JiBXException
IComponent
genContentUnmarshal
in interface IComponent
genContentUnmarshal
in class PassThroughComponent
mb
- method builderJiBXException
- if error in configurationpublic void genContentMarshal(ContextMethodBuilder mb) throws JiBXException
IComponent
genContentMarshal
in interface IComponent
genContentMarshal
in class PassThroughComponent
mb
- method builderJiBXException
- if error in configurationpublic void print(int depth)
print
in interface IComponent
print
in class PassThroughComponent