groovy.util
Class AbstractFactory

java.lang.Object
  extended by groovy.util.AbstractFactory
All Implemented Interfaces:
Factory
Direct Known Subclasses:
ObjectGraphBuilder.ObjectFactory

public abstract class AbstractFactory
extends java.lang.Object
implements Factory

Author:
Andres Almiray

Constructor Summary
AbstractFactory()
           
 
Method Summary
 boolean isLeaf()
           
 boolean onHandleNodeAttributes(FactoryBuilderSupport builder, java.lang.Object node, java.util.Map attributes)
           
 void onNodeCompleted(FactoryBuilderSupport builder, java.lang.Object parent, java.lang.Object node)
           
 void setChild(FactoryBuilderSupport builder, java.lang.Object parent, java.lang.Object child)
           
 void setParent(FactoryBuilderSupport builder, java.lang.Object parent, java.lang.Object child)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface groovy.util.Factory
newInstance
 

Constructor Detail

AbstractFactory

public AbstractFactory()
Method Detail

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface Factory
Returns:
true if no child closures should be processed

onHandleNodeAttributes

public boolean onHandleNodeAttributes(FactoryBuilderSupport builder,
                                      java.lang.Object node,
                                      java.util.Map attributes)
Specified by:
onHandleNodeAttributes in interface Factory
Parameters:
builder - the FactoryBuilder
node - the node (returned from newINstance) to consider the attributes for
attributes - the attributes, a mutable set
Returns:
true if the factory builder should use standerd bean property matching for the remaining attributes

onNodeCompleted

public void onNodeCompleted(FactoryBuilderSupport builder,
                            java.lang.Object parent,
                            java.lang.Object node)
Specified by:
onNodeCompleted in interface Factory
Parameters:
builder - the FactoryBuilder
parent - the parent node (null if 'root')
node - the node just completed

setParent

public void setParent(FactoryBuilderSupport builder,
                      java.lang.Object parent,
                      java.lang.Object child)
Specified by:
setParent in interface Factory

setChild

public void setChild(FactoryBuilderSupport builder,
                     java.lang.Object parent,
                     java.lang.Object child)
Specified by:
setChild in interface Factory


Copyright © ${year} The Codehaus. All Rights Reserved.