Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2594

Allow factories to intercept and handle child closures

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.6-beta-1
    • None
    • None

    Description

      Currently all node closures for a FactoryBuilderSupport node are always handled by the Builder. This allows the factory to handle the closure node themselfs, and permit or deny builder handling of the node.

      Two APIs added:
      boolean isHandlesNodeChildren() - must return true for the next API to be called in the factory lifecycle

      boolean onHandleNodeAttributes(FactoryBuilderSupport builder, Object node, Map attributes) - if teh previous API was true this will be called boefre each child closure is processe. If false is returned the builder will not process the child, otherwise if true is passed the child will be processed as normal.

      Attachments

        Activity

          People

            shemnon Daniel Ferrin
            shemnon Daniel Ferrin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: