Class SecureASTCustomizerFactory
java.lang.Object
groovy.util.AbstractFactory
org.codehaus.groovy.control.customizers.builder.SecureASTCustomizerFactory
- All Implemented Interfaces:
Factory
This factory allows the generation of a
SecureASTCustomizer. Embedded elements are delegated
to a SecureASTCustomizer instance.- Since:
- 2.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates that secure AST customizer nodes accept nested closure content.newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes) Creates a secure AST customizer.booleanonNodeChildren(FactoryBuilderSupport builder, Object node, Closure childContent) Executes nested builder content against the secure customizer.Methods inherited from class groovy.util.AbstractFactory
isLeaf, onFactoryRegistration, onHandleNodeAttributes, onNodeCompleted, setChild, setParent
-
Constructor Details
-
SecureASTCustomizerFactory
public SecureASTCustomizerFactory()
-
-
Method Details
-
isHandlesNodeChildren
public boolean isHandlesNodeChildren()Indicates that secure AST customizer nodes accept nested closure content.- Specified by:
isHandlesNodeChildrenin interfaceFactory- Overrides:
isHandlesNodeChildrenin classAbstractFactory- Returns:
true
-
newInstance
public Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes) throws InstantiationException, IllegalAccessException Creates a secure AST customizer.- Parameters:
builder- the active buildername- the node namevalue- the supplied node valueattributes- the node attributes- Returns:
- a new
SecureASTCustomizer - Throws:
InstantiationException- if instantiation failsIllegalAccessException- if access fails
-
onNodeChildren
Executes nested builder content against the secure customizer.- Specified by:
onNodeChildrenin interfaceFactory- Overrides:
onNodeChildrenin classAbstractFactory- Parameters:
builder- the active buildernode- the current nodechildContent- the nested closure content- Returns:
falseto continue normal processing
-