GrailsBuildEventListener (Grails 2.4.4)
Date: 2014-10-28

Package: org.codehaus.groovy.grails.cli.support

## [Java] Class GrailsBuildEventListener

- org.codehaus.groovy.grails.cli.support.GrailsBuildEventListener

- All Implemented Interfaces and Traits:
    org.apache.tools.ant.BuildListener

      public class GrailsBuildEventListener
      extends java.lang.Object

  Authors:
    Graeme Rocher
  Since:
    1.1

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected java.util.Map<java.lang.String, java.util.List<groovy.lang.Closure>>` | `globalEventHooks` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GrailsBuildEventListener (groovy.lang.GroovyClassLoader scriptClassLoader, groovy.lang.Binding binding, BuildSettings buildSettings)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `protected void` | `addGrailsBuildListener(java.lang.String listenerClassName)`
    `protected void` | `addGrailsBuildListener(java.lang.Class listenerClass)`
    `void` | `addGrailsBuildListener(GrailsBuildListener listener)`
    `void` | `buildFinished(org.apache.tools.ant.BuildEvent buildEvent)`
    `void` | `buildStarted(org.apache.tools.ant.BuildEvent buildEvent)`
    `void` | `event(java.lang.String eventName, java.util.List arguments)` For backwards compatibility with _Events.groovy script
    `void` | `event(java.lang.String eventName)` For backwards compatibility with _Events.groovy script
    `protected java.io.File` | `findEventsScript(java.io.File dir)`
    `groovy.lang.Binding` | `getBinding()`
    `void` | `initialize()`
    `protected void` | `loadEventHooks(BuildSettings buildSettings)`
    `void` | `loadEventsScript(java.io.File eventScript)`
    `protected void` | `loadGrailsBuildListeners()`
    `void` | `messageLogged(org.apache.tools.ant.BuildEvent buildEvent)`
    `void` | `setClassLoader(groovy.lang.GroovyClassLoader classLoader)`
    `void` | `setGlobalEventHooks(java.util.Map<java.lang.String, java.util.List<groovy.lang.Closure>> globalEventHooks)`
    `void` | `targetFinished(org.apache.tools.ant.BuildEvent buildEvent)`
    `void` | `targetStarted(org.apache.tools.ant.BuildEvent buildEvent)`
    `void` | `taskFinished(org.apache.tools.ant.BuildEvent buildEvent)`
    `void` | `taskStarted(org.apache.tools.ant.BuildEvent buildEvent)`
    `void` | `triggerEvent(java.lang.String eventName)` Triggers and event for the given name and binding
    `void` | `triggerEvent(java.lang.String eventName, java.lang.Object... arguments)` Triggers an event for the given name and arguments

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### @java.lang.SuppressWarnings("rawtypes") protected java.util.Map<java.lang.String, java.util.List<groovy.lang.Closure>> globalEventHooks

  - ### Constructor Detail

    - #### public GrailsBuildEventListener(groovy.lang.GroovyClassLoader scriptClassLoader, groovy.lang.Binding binding, BuildSettings buildSettings)

  - ### Method Detail

    - #### protected void addGrailsBuildListener(java.lang.String listenerClassName)

    - #### @java.lang.SuppressWarnings("rawtypes") protected void addGrailsBuildListener(java.lang.Class listenerClass)

    - #### public void addGrailsBuildListener(GrailsBuildListener listener)

    - #### public void buildFinished(org.apache.tools.ant.BuildEvent buildEvent)

    - #### public void buildStarted(org.apache.tools.ant.BuildEvent buildEvent)

    - #### @java.lang.Deprecated public void event(java.lang.String eventName, @java.lang.SuppressWarnings("rawtypes") java.util.List arguments)

      For backwards compatibility with _Events.groovy script

      deprecated:
        Use #triggerEvent instead
      Parameters:
        `eventName` - The event name
        `arguments` - The arguments

    - #### @java.lang.Deprecated public void event(java.lang.String eventName)

      For backwards compatibility with _Events.groovy script

      deprecated:
        Use #triggerEvent instead
      Parameters:
        `eventName` - The event name

    - #### protected java.io.File findEventsScript(java.io.File dir)

    - #### public groovy.lang.Binding getBinding()

    - #### public void initialize()

    - #### protected void loadEventHooks(BuildSettings buildSettings)

    - #### public void loadEventsScript(java.io.File eventScript)

    - #### protected void loadGrailsBuildListeners()

    - #### public void messageLogged(org.apache.tools.ant.BuildEvent buildEvent)

    - #### public void setClassLoader(groovy.lang.GroovyClassLoader classLoader)

    - #### public void setGlobalEventHooks(@java.lang.SuppressWarnings("rawtypes") java.util.Map<java.lang.String, java.util.List<groovy.lang.Closure>> globalEventHooks)

    - #### public void targetFinished(org.apache.tools.ant.BuildEvent buildEvent)

    - #### public void targetStarted(org.apache.tools.ant.BuildEvent buildEvent)

    - #### public void taskFinished(org.apache.tools.ant.BuildEvent buildEvent)

    - #### public void taskStarted(org.apache.tools.ant.BuildEvent buildEvent)

    - #### public void triggerEvent(java.lang.String eventName)

      Triggers and event for the given name and binding

      Parameters:
        `eventName` - The name of the event

    - #### @java.lang.SuppressWarnings("rawtypes") public void triggerEvent(java.lang.String eventName, java.lang.Object... arguments)

      Triggers an event for the given name and arguments

      Parameters:
        `eventName` - The name of the event
        `arguments` - The arguments