Package org.jibx.binding.def
Class StructureReference
java.lang.Object
org.jibx.binding.def.PassThroughComponent
org.jibx.binding.def.StructureReference
- All Implemented Interfaces:
IComponent
,ILinkable
Reference to a structure definition. This is used as a placeholder when
building the component structure of a binding definition. It's necessary
because the referenced structure may not have been parsed yet. During the
linkage phase that follows parsing this looks up the appropriate structure
definition and sets up the corresponding component structure. Thereafter it
operates as a simple pass-through wrapper for the top child component.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IContainer
Containing binding component.private final IContextObj
Containing binding definition structure.private final String
Identifier for referenced structure definition.private boolean
Object load needed for marshalling flag (used with object binding).private final PropertyDefinition
Property definition (may benull
).private boolean
Flag for marshalling code generation to be skipped by component.Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
-
Constructor Summary
ConstructorsConstructorDescriptionStructureReference
(IContainer contain, String label, PropertyDefinition prop, boolean hasname, IContextObj cobj) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Generate attribute marshalling code.void
Generate element or text marshalling code.void
print
(int depth) void
Establish and validate linkages between binding components.Methods inherited from class org.jibx.binding.def.PassThroughComponent
genAttributeUnmarshal, genAttrPresentTest, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, getWrapperName, hasAttribute, hasContent, hasId, isOptional, setWrappedComponent
-
Field Details
-
m_container
Containing binding component. -
m_contextObject
Containing binding definition structure. -
m_property
Property definition (may benull
). -
m_label
Identifier for referenced structure definition. -
m_skipMarshal
private boolean m_skipMarshalFlag for marshalling code generation to be skipped by component. -
m_needLoad
private boolean m_needLoadObject load needed for marshalling flag (used with object binding).
-
-
Constructor Details
-
StructureReference
public StructureReference(IContainer contain, String label, PropertyDefinition prop, boolean hasname, IContextObj cobj) Constructor.- Parameters:
contain
- containing binding componentlabel
- reference structure identifierprop
- property definition (may benull
)hasname
- element name used with reference flagcobj
- context object
-
-
Method Details
-
genAttributeMarshal
Description copied from interface:IComponent
Generate attribute marshalling code. This is called within the code generation for the marshaller of the class associated with the containing element. It needs to generate the necessary code for handling the marshalling operation, consuming the marshalled object reference from the stack.- Specified by:
genAttributeMarshal
in interfaceIComponent
- Overrides:
genAttributeMarshal
in classPassThroughComponent
- Parameters:
mb
- method builder- Throws:
JiBXException
- if error in configuration
-
genContentMarshal
Description copied from interface:IComponent
Generate element or text marshalling code. This is called within the code generation for the marshaller of the class associated with the containing element. It needs to generate the necessary code for handling the marshalling operation, consuming the marshalled object reference from the stack.- Specified by:
genContentMarshal
in interfaceIComponent
- Overrides:
genContentMarshal
in classPassThroughComponent
- Parameters:
mb
- method builder- Throws:
JiBXException
- if error in configuration
-
setLinkages
Description copied from interface:ILinkable
Establish and validate linkages between binding components. This is called after the basic binding structures have been set up. All linkages between components must be resolved by this method, in order to prevent problems due to the order of definitions between components. This implies that each component must in turn call the same method for each child component. None of the other method calls defined by this interface are valid until after this call.- Specified by:
setLinkages
in interfaceILinkable
- Overrides:
setLinkages
in classPassThroughComponent
- Throws:
JiBXException
- if error in configuration
-
print
public void print(int depth) - Specified by:
print
in interfaceIComponent
- Overrides:
print
in classPassThroughComponent
-