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