Package groovy.util
Class AbstractFactory
java.lang.Object
groovy.util.AbstractFactory
- All Implemented Interfaces:
- Factory
- Direct Known Subclasses:
- CustomizersFactory,- ImportCustomizerFactory,- InlinedASTCustomizerFactory,- SecureASTCustomizerFactory,- SourceAwareCustomizerFactory
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanDoes this factory "Own" its child closure.booleanisLeaf()voidonFactoryRegistration(FactoryBuilderSupport builder, String registeredName, String group) Called when a factory is registered to a builderbooleanonHandleNodeAttributes(FactoryBuilderSupport builder, Object node, Map attributes) booleanonNodeChildren(FactoryBuilderSupport builder, Object node, Closure childContent) Only called if it isLeaf is false and isHandlesNodeChildren is truevoidonNodeCompleted(FactoryBuilderSupport builder, Object parent, Object node) voidsetChild(FactoryBuilderSupport builder, Object parent, Object child) voidsetParent(FactoryBuilderSupport builder, Object parent, Object child) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface groovy.util.FactorynewInstance
- 
Constructor Details- 
AbstractFactorypublic AbstractFactory()
 
- 
- 
Method Details- 
isLeafpublic boolean isLeaf()
- 
isHandlesNodeChildrenpublic boolean isHandlesNodeChildren()Description copied from interface:FactoryDoes this factory "Own" its child closure.- Specified by:
- isHandlesNodeChildrenin interface- Factory
- Returns:
- true if the factory should have onContentClosure() called, false if the builder should handle it
 
- 
onFactoryRegistrationpublic void onFactoryRegistration(FactoryBuilderSupport builder, String registeredName, String group) Description copied from interface:FactoryCalled when a factory is registered to a builder- Specified by:
- onFactoryRegistrationin interface- Factory
- Parameters:
- builder- the build the factory has been registered to
- registeredName- the name the factory has been registered under
 
- 
onHandleNodeAttributes- Specified by:
- onHandleNodeAttributesin 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 standard bean property matching for the remaining attributes
 
- 
onNodeChildrenDescription copied from interface:FactoryOnly called if it isLeaf is false and isHandlesNodeChildren is true- Specified by:
- onNodeChildrenin interface- Factory
- Parameters:
- builder- the FactoryBuilder
- node- the node (returned from newINstance) to consider the attributes for
- childContent- the child content closure of the builder
- Returns:
- true if the factory builder should apply default node processing to the content child
 
- 
onNodeCompleted- Specified by:
- onNodeCompletedin interface- Factory
- Parameters:
- builder- the FactoryBuilder
- parent- the parent node (null if 'root')
- node- the node just completed
 
- 
setParent
- 
setChild
 
-