GrailsDomainClassCleaner (Grails 3.2.8)
Date: 2017-03-23

Package: org.grails.plugins.domain.support

## [Groovy] Class GrailsDomainClassCleaner

- org.grails.plugins.domain.support.GrailsDomainClassCleaner

- All Implemented Interfaces and Traits:
    org.springframework.context.ApplicationListener, org.springframework.context.ApplicationContextAware

      @groovy.util.logging.Commons
      class GrailsDomainClassCleaner
      extends java.lang.Object

  Clears static Grails "instance api" instances from domain classes when ApplicationContext's ContextClosedEvent is received.

  Authors:
    Lari Hotari

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected org.springframework.context.ApplicationContext` | `applicationContext` |
    `protected GrailsApplication` | `grailsApplication` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GrailsDomainClassCleaner (GrailsApplication grailsApplication)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected java.lang.Object` | `clearAllStaticApiInstances()`
    `` | `protected java.lang.Object` | `clearStaticApiInstances(java.lang.Class clazz)`
    `` | `void` | `onApplicationEvent(org.springframework.context.event.ContextClosedEvent event)`
    `` | `protected java.lang.Object` | `removeDomainClassMetaClasses()`
    `` | `void` | `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`

  - ### 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

    - #### protected org.springframework.context.ApplicationContext applicationContext

    - #### protected GrailsApplication grailsApplication

  - ### Constructor Detail

    - #### GrailsDomainClassCleaner(GrailsApplication grailsApplication)

  - ### Method Detail

    - #### protected java.lang.Object clearAllStaticApiInstances()

    - #### protected java.lang.Object clearStaticApiInstances(java.lang.Class clazz)

    - #### void onApplicationEvent(org.springframework.context.event.ContextClosedEvent event)

    - #### protected java.lang.Object removeDomainClassMetaClasses()

    - #### @java.lang.Override void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)