Top Constructors Methods
groovy.util

public abstract Class AbstractFactory

extends Object
implements Factory
Class Inheritance
All Implemented Interfaces
groovy.util.Factory
Known Direct Subclasses
groovy.util.ObjectGraphBuilder.ObjectFactory, org.codehaus.groovy.control.customizers.builder.CustomizersFactory, org.codehaus.groovy.control.customizers.builder.ImportCustomizerFactory, org.codehaus.groovy.control.customizers.builder.InlinedASTCustomizerFactory, org.codehaus.groovy.control.customizers.builder.SecureASTCustomizerFactory, org.codehaus.groovy.control.customizers.builder.SourceAwareCustomizerFactory
Imports
groovy.lang.Closure, java.util.Map

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
isHandlesNodeChildren()

Implements groovy.util.Factory.isHandlesNodeChildren.

Does this factory "Own" its child closure.
public boolean
public void
onFactoryRegistration(FactoryBuilderSupport
the build the factory has been registered to
builder
,
String
the name the factory has been registered under
registeredName
,
String group)

Implements groovy.util.Factory.onFactoryRegistration.

Called when a factory is registered to a builder
public boolean
onHandleNodeAttributes(FactoryBuilderSupport
the FactoryBuilder
builder
,
Object
the node (returned from newINstance) to consider the attributes for
node
,
Map<K, V>
the attributes, a mutable set
attributes
)

Implements groovy.util.Factory.onHandleNodeAttributes.

public boolean
onNodeChildren(FactoryBuilderSupport
the FactoryBuilder
builder
,
Object
the node (returned from newINstance) to consider the attributes for
node
,
Closure<V>
the child content closure of the builder
childContent
)

Implements groovy.util.Factory.onNodeChildren.

Only called if it isLeaf is false and isHandlesNodeChildren is true
public void
onNodeCompleted(FactoryBuilderSupport
the FactoryBuilder
builder
,
Object
the parent node (null if 'root')
parent
,
Object
the node just completed
node
)

Implements groovy.util.Factory.onNodeCompleted.

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractFactoryback to summary
public AbstractFactory()

Method Detail

isHandlesNodeChildrenback to summary
public boolean isHandlesNodeChildren()

Implements groovy.util.Factory.isHandlesNodeChildren.

Doc from groovy.util.Factory.isHandlesNodeChildren.

Does this factory "Own" its child closure.

Returns:boolean

true if the factory should have onContentClosure() called, false if the builder should handle it

isLeafback to summary
public boolean isLeaf()

Implements groovy.util.Factory.isLeaf.

Returns:boolean

Doc from groovy.util.Factory.isLeaf.

true if no child closures should be processed

onFactoryRegistrationback to summary
public void onFactoryRegistration(FactoryBuilderSupport builder, String registeredName, String group)

Implements groovy.util.Factory.onFactoryRegistration.

Doc from groovy.util.Factory.onFactoryRegistration.

Called when a factory is registered to a builder

Parameters
builder:FactoryBuilderSupport

the build the factory has been registered to

registeredName:String

the name the factory has been registered under

onHandleNodeAttributesback to summary
public boolean onHandleNodeAttributes(FactoryBuilderSupport builder, Object node, Map<K, V> attributes)

Implements groovy.util.Factory.onHandleNodeAttributes.

Parameters
builder:FactoryBuilderSupport

Doc from groovy.util.Factory.onHandleNodeAttributes.

the FactoryBuilder

node:Object

Doc from groovy.util.Factory.onHandleNodeAttributes.

the node (returned from newINstance) to consider the attributes for

attributes:Map<K, V>

Doc from groovy.util.Factory.onHandleNodeAttributes.

the attributes, a mutable set

Returns:boolean

Doc from groovy.util.Factory.onHandleNodeAttributes.

true if the factory builder should use standard bean property matching for the remaining attributes

onNodeChildrenback to summary
public boolean onNodeChildren(FactoryBuilderSupport builder, Object node, Closure<V> childContent)

Implements groovy.util.Factory.onNodeChildren.

Doc from groovy.util.Factory.onNodeChildren.

Only called if it isLeaf is false and isHandlesNodeChildren is true

Parameters
builder:FactoryBuilderSupport

the FactoryBuilder

node:Object

the node (returned from newINstance) to consider the attributes for

childContent:Closure<V>

the child content closure of the builder

Returns:boolean

true if the factory builder should apply default node processing to the content child

onNodeCompletedback to summary
public void onNodeCompleted(FactoryBuilderSupport builder, Object parent, Object node)

Implements groovy.util.Factory.onNodeCompleted.

Parameters
builder:FactoryBuilderSupport

Doc from groovy.util.Factory.onNodeCompleted.

the FactoryBuilder

parent:Object

Doc from groovy.util.Factory.onNodeCompleted.

the parent node (null if 'root')

node:Object

Doc from groovy.util.Factory.onNodeCompleted.

the node just completed

setChildback to summary
public void setChild(FactoryBuilderSupport builder, Object parent, Object child)

Implements groovy.util.Factory.setChild.

setParentback to summary
public void setParent(FactoryBuilderSupport builder, Object parent, Object child)

Implements groovy.util.Factory.setParent.