org.jibx.binding.def
Class LinkableBase

java.lang.Object
  extended by org.jibx.binding.def.PassThroughComponent
      extended by org.jibx.binding.def.LinkableBase
All Implemented Interfaces:
IComponent
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.

Version:
1.0
Author:
Dennis M. Sosnoski

Field Summary
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
protected LinkableBase()
          No argument constructor.
  LinkableBase(IComponent wrap)
          Constructor.
 
Method Summary
protected  void handleRecursion()
          Handler for recursion.
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_isLinking

private boolean m_isLinking
Flag for linkage in progress.


m_isLinked

private boolean m_isLinked
Flag for linkage complete.

Constructor Detail

LinkableBase

protected LinkableBase()
No argument constructor. This requires the component to be set later, using the PassThroughComponent.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.


setLinkages

public void setLinkages()
                 throws JiBXException
Description copied from interface: IComponent
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 interface IComponent
Overrides:
setLinkages in class PassThroughComponent
Throws:
JiBXException - if error in configuration

print

public void print(int depth)
Specified by:
print in interface IComponent
Overrides:
print in class PassThroughComponent


Project Web Site