Package org.codehaus.groovy.control.customizers.builder

# Class SecureASTCustomizerFactory

java.lang.Object
groovy.util.AbstractFactory
org.codehaus.groovy.control.customizers.builder.SecureASTCustomizerFactory

All Implemented Interfaces:
  `Factory`

public class SecureASTCustomizerFactory extends AbstractFactory
This factory allows the generation of a `SecureASTCustomizer`. Embedded elements are delegated to a `SecureASTCustomizer` instance.

Since:
  2.1.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SecureASTCustomizerFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `isHandlesNodeChildren()`
  Indicates that secure AST customizer nodes accept nested closure content.
  `Object`
  `newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes)`
  Creates a secure AST customizer.
  `boolean`
  `onNodeChildren(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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SecureASTCustomizerFactory

    public SecureASTCustomizerFactory()

- ## Method Details

  - ### isHandlesNodeChildren

    public boolean isHandlesNodeChildren()
    Indicates that secure AST customizer nodes accept nested closure content.
    Specified by:
      `isHandlesNodeChildren` in interface `Factory`
    Overrides:
      `isHandlesNodeChildren` in class `AbstractFactory`
    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 builder
      `name` - the node name
      `value` - the supplied node value
      `attributes` - the node attributes
    Returns:
      a new `SecureASTCustomizer`
    Throws:
      `InstantiationException` - if instantiation fails
      `IllegalAccessException` - if access fails

  - ### onNodeChildren

    public boolean onNodeChildren(FactoryBuilderSupport builder, Object node, Closure childContent)
    Executes nested builder content against the secure customizer.
    Specified by:
      `onNodeChildren` in interface `Factory`
    Overrides:
      `onNodeChildren` in class `AbstractFactory`
    Parameters:
      `builder` - the active builder
      `node` - the current node
      `childContent` - the nested closure content
    Returns:
      `false` to continue normal processing