public class MappingReference extends PassThroughComponent
Modifier and Type | Field and Description |
---|---|
private IContainer |
m_container
Containing binding definition structure.
|
private IContextObj |
m_contextObject
Context object.
|
private boolean |
m_isNillable
Flag for nillable element.
|
private boolean |
m_isSynthetic
Synthetic reference added to empty collection flag
|
private IMapping |
m_mapping
Referenced mapping.
|
private NameDefinition |
m_name
Name from reference (only allowed with abstract mappings)
|
private PropertyDefinition |
m_property
Property definition.
|
private java.lang.String |
m_referenceQName
Qualified name of type for abstract mapping.
|
private java.lang.String |
m_referenceText
Ordinary name of type for abstract mapping.
|
private java.lang.String |
m_type
Fully qualified name of mapped type.
|
private IComponent |
m_wrappedReference
Generated wrapped component, used when checking for both attributes
and elements present.
|
m_component
Constructor and Description |
---|
MappingReference(IContainer contain,
PropertyDefinition prop,
java.lang.String type,
java.lang.String reftext,
java.lang.String refqname,
IContextObj objc,
NameDefinition name,
boolean synth,
boolean nillable)
Constructor from property and type.
|
Modifier and Type | Method and Description |
---|---|
void |
genContentUnmarshal(ContextMethodBuilder mb)
Patch the generated code to remove the unmarshalled object when it's a
"this" reference with both elements and attributes.
|
IMapping |
getMapping() |
java.lang.String |
getType()
Get type expected by component.
|
boolean |
isOptional()
Check if component is an optional item.
|
void |
print(int depth) |
void |
setLinkages()
Establish and validate linkages between binding components.
|
genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genLoadId, genNewInstance, getWrapperName, hasAttribute, hasContent, hasId, setWrappedComponent
private final IContainer m_container
private final PropertyDefinition m_property
private final boolean m_isNillable
private java.lang.String m_type
private java.lang.String m_referenceText
private java.lang.String m_referenceQName
private final IContextObj m_contextObject
private final NameDefinition m_name
private final boolean m_isSynthetic
private IMapping m_mapping
private IComponent m_wrappedReference
public MappingReference(IContainer contain, PropertyDefinition prop, java.lang.String type, java.lang.String reftext, java.lang.String refqname, IContextObj objc, NameDefinition name, boolean synth, boolean nillable)
contain
- containing binding definition structureprop
- property definitiontype
- fully qualified name of mapped typereftext
- ordinary text name for abstract mapping reference
(null
if not specified)refqname
- qualified type name for abstract mapping reference
(null
if not specified)objc
- current object contextname
- reference name definition (only allowed with abstract
mappings)synth
- sythentic reference added to empty collection flagnillable
- flag for nillable elementpublic IMapping getMapping()
public boolean isOptional()
IComponent
isOptional
in interface IComponent
isOptional
in class PassThroughComponent
true
if optional, false
if requiredpublic java.lang.String getType()
IComponent
getType
in interface IComponent
getType
in class PassThroughComponent
public void setLinkages() throws JiBXException
ILinkable
setLinkages
in interface ILinkable
setLinkages
in class PassThroughComponent
JiBXException
- if error in configurationpublic void genContentUnmarshal(ContextMethodBuilder mb) throws JiBXException
genContentUnmarshal
in interface IComponent
genContentUnmarshal
in class PassThroughComponent
mb
- JiBXException
public void print(int depth)
print
in interface IComponent
print
in class PassThroughComponent