public abstract class AbstractFactory extends java.lang.Object implements Factory
| Constructor and Description |
|---|
AbstractFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isHandlesNodeChildren()
Does this factory "Own" it's child closure.
|
boolean |
isLeaf() |
void |
onFactoryRegistration(FactoryBuilderSupport builder,
java.lang.String registeredName,
java.lang.String group)
Called when a factory is registered to a builder
|
boolean |
onHandleNodeAttributes(FactoryBuilderSupport builder,
java.lang.Object node,
java.util.Map attributes) |
boolean |
onNodeChildren(FactoryBuilderSupport builder,
java.lang.Object node,
Closure childContent)
Only called if it isLeaf is false and isHandlesNodeChildren is true
|
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewInstancepublic boolean isLeaf()
public boolean isHandlesNodeChildren()
FactoryisHandlesNodeChildren in interface Factorypublic void onFactoryRegistration(FactoryBuilderSupport builder, java.lang.String registeredName, java.lang.String group)
FactoryonFactoryRegistration in interface Factorybuilder - the build the factory has been registered toregisteredName - the name the factory has been registered underpublic boolean onHandleNodeAttributes(FactoryBuilderSupport builder, java.lang.Object node, java.util.Map attributes)
onHandleNodeAttributes in interface Factorybuilder - the FactoryBuildernode - the node (returned from newINstance) to consider the attributes forattributes - the attributes, a mutable setpublic boolean onNodeChildren(FactoryBuilderSupport builder, java.lang.Object node, Closure childContent)
FactoryonNodeChildren in interface Factorybuilder - the FactoryBuildernode - the node (returned from newINstance) to consider the attributes forchildContent - the child content closure of the builderpublic void onNodeCompleted(FactoryBuilderSupport builder, java.lang.Object parent, java.lang.Object node)
onNodeCompleted in interface Factorybuilder - the FactoryBuilderparent - the parent node (null if 'root')node - the node just completedpublic void setParent(FactoryBuilderSupport builder, java.lang.Object parent, java.lang.Object child)
public void setChild(FactoryBuilderSupport builder, java.lang.Object parent, java.lang.Object child)