Package org.jibx.binding.def
Class LinkableBase
- java.lang.Object
-
- org.jibx.binding.def.PassThroughComponent
-
- org.jibx.binding.def.LinkableBase
-
- All Implemented Interfaces:
IComponent
,ILinkable
- Direct Known Subclasses:
MappingBase
public abstract class LinkableBase extends PassThroughComponent
Base class for components that can be linked from multiple locations within the binding definition structure. The implemented basic behavior is a simple pass-through component, with the addition of recursion checking during the linking phase.- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
m_isLinked
Flag for linkage complete.private boolean
m_isLinking
Flag for linkage in progress.-
Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LinkableBase()
No argument constructor.LinkableBase(IComponent wrap)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
handleRecursion()
Handler for recursion.protected boolean
isLinked()
Check if linkage processing for this component is complete.void
print(int depth)
void
setLinkages()
Establish and validate linkages between binding components.-
Methods inherited from class org.jibx.binding.def.PassThroughComponent
genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, getWrapperName, hasAttribute, hasContent, hasId, isOptional, setWrappedComponent
-
-
-
-
Constructor Detail
-
LinkableBase
protected LinkableBase()
No argument constructor. This requires the component to be set later, using thePassThroughComponent.setWrappedComponent(org.jibx.binding.def.IComponent)
method.
-
LinkableBase
public LinkableBase(IComponent wrap)
Constructor.- Parameters:
wrap
- wrapped binding component
-
-
Method Detail
-
handleRecursion
protected void handleRecursion()
Handler for recursion. If recursion is found during linking this method will be called. The base class implementation does nothing, but may be overridden by subclases to implement the appropriate behavior.
-
isLinked
protected boolean isLinked()
Check if linkage processing for this component is complete.- Returns:
true
if complete,false
if not
-
setLinkages
public void setLinkages() throws JiBXException
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
-
-