org.loom.binding.factories
Class DefaultNodeFactory

java.lang.Object
  extended by org.loom.binding.factories.DefaultNodeFactory
All Implemented Interfaces:
NodeFactory

public class DefaultNodeFactory
extends java.lang.Object
implements NodeFactory

Default NodeFactory implementation


Constructor Summary
DefaultNodeFactory()
           
 
Method Summary
 Node create(java.lang.Class<?> clazz, java.lang.String propertyPath)
          Instantiates a chain of Nodes for a propertyPath
 Node createNode(PropertyWrapper propertyWrapper)
           
 void setPropertyWrapperFactory(PropertyWrapperFactory propertyWrapperFactory)
           
 Node visit(java.lang.Class<?> clazz, java.lang.String[] propertyPath, int index)
          Instantiates a chain of Nodes for a propertyPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultNodeFactory

public DefaultNodeFactory()
Method Detail

create

public Node create(java.lang.Class<?> clazz,
                   java.lang.String propertyPath)
Description copied from interface: NodeFactory
Instantiates a chain of Nodes for a propertyPath

Specified by:
create in interface NodeFactory
Parameters:
clazz - The class of this node.
propertyPath - The full path to be traversed, e.g. "customer.street.name"
Returns:
The chain of Nodes for this property path

visit

public Node visit(java.lang.Class<?> clazz,
                  java.lang.String[] propertyPath,
                  int index)
Instantiates a chain of Nodes for a propertyPath

Parameters:
clazz - The class of this node.
propertyPath - The normalized path to be traversed, e.g. [ "customer", "street", "name" ] for customer.street.name
index - the current node index
Returns:
The chain of Nodes for this index and ahead

createNode

public Node createNode(PropertyWrapper propertyWrapper)

setPropertyWrapperFactory

public void setPropertyWrapperFactory(PropertyWrapperFactory propertyWrapperFactory)