Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.domain
[Groovy] Class GrailsDomainClassCleaner

    java.lang.Object
      org.codehaus.groovy.grails.domain.GrailsDomainClassCleaner

All Implemented Interfaces:
  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
`protected org.springframework.context.ApplicationContext` | `applicationContext`
`protected GrailsApplication` | `grailsApplication`

Constructor Summary
`GrailsDomainClassCleaner(GrailsApplication grailsApplication)`

Method Summary
`protected java.lang.Object` | `clearAllStaticApiInstances()`
`protected java.lang.Object` | `clearStaticApiInstances(java.lang.Class clazz)`
`void` | `onApplicationEvent(org.springframework.context.event.ContextClosedEvent event)`
`void` | `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`

Methods inherited from 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

### applicationContext

    protected org.springframework.context.ApplicationContext applicationContext

### grailsApplication

    protected GrailsApplication grailsApplication

Constructor Detail

### GrailsDomainClassCleaner

    GrailsDomainClassCleaner(GrailsApplication grailsApplication)

Method Detail

### clearAllStaticApiInstances

    protected java.lang.Object clearAllStaticApiInstances()

### clearStaticApiInstances

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

### onApplicationEvent

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

### setApplicationContext

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

Groovy Documentation