Class CustomizersFactory
java.lang.Object
groovy.util.AbstractFactory
org.codehaus.groovy.control.customizers.builder.CustomizersFactory
- All Implemented Interfaces:
Factory,PostCompletionFactory
This factory generates an array of compilation customizers.
- Since:
- 2.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes) Creates the mutable collection that accumulates compilation customizers.postCompleteNode(FactoryBuilderSupport factory, Object parent, Object node) Converts the collected customizers to an array when node construction completes.voidsetChild(FactoryBuilderSupport builder, Object parent, Object child) Adds child customizers to the current collection node.Methods inherited from class groovy.util.AbstractFactory
isHandlesNodeChildren, isLeaf, onFactoryRegistration, onHandleNodeAttributes, onNodeChildren, onNodeCompleted, setParent
-
Constructor Details
-
CustomizersFactory
public CustomizersFactory()
-
-
Method Details
-
newInstance
public Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes) throws InstantiationException, IllegalAccessException Creates the mutable collection that accumulates compilation customizers.- Specified by:
newInstancein interfaceFactory- Parameters:
builder- the active buildername- the node namevalue- the supplied node valueattributes- the node attributes- Returns:
- a new collection used to gather customizers
- Throws:
InstantiationException- if instance creation failsIllegalAccessException- if access fails
-
setChild
Adds child customizers to the current collection node.- Specified by:
setChildin interfaceFactory- Overrides:
setChildin classAbstractFactory- Parameters:
builder- the active builderparent- the parent nodechild- the child node
-
postCompleteNode
Converts the collected customizers to an array when node construction completes.- Specified by:
postCompleteNodein interfacePostCompletionFactory- Parameters:
factory- the active builderparent- the parent nodenode- the completed node- Returns:
- a customizer array or the original node
-