MetaClassRegistryCleaner (Grails 6.0.0)

Package: grails.build.support

## [Java] Class MetaClassRegistryCleaner

- grails.build.support.MetaClassRegistryCleaner

- All Implemented Interfaces and Traits:
    groovy.lang.MetaClassRegistryChangeEventListener

      @java.lang.SuppressWarnings("rawtypes")
      public class MetaClassRegistryCleaner
      extends java.lang.Object
      implements groovy.lang.MetaClassRegistryChangeEventListener

  Allows clean-up of changes made to the MetaClassRegistry.

  Authors:
    Graeme Rocher
  Since:
    2.0

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `private static class` | `MetaClassRegistryCleaner.IdentityWeakReference` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private static MetaClassRegistryCleaner` | `INSTANCE` |
    `private static java.lang.Object` | `NO_CUSTOM_METACLASS` |
    `private java.util.Map<java.lang.Class, java.lang.Object>` | `alteredClasses` |
    `private java.util.Map<IdentityWeakReference, java.lang.Object>` | `alteredInstances` |
    `private static boolean` | `cleaning` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `private MetaClassRegistryCleaner ()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static void` | `addAlteredMetaClass(java.lang.Class cls, groovy.lang.MetaClass altered)`
    `` | `public void` | `clean()`
    `` | `public static void` | `cleanAndRemove(MetaClassRegistryCleaner cleaner)`
    `` | `private void` | `cleanMetaClassOfClass(org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl registry)`
    `` | `private void` | `cleanMetaClassOfInstance(org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl registry)`
    `` | `public static MetaClassRegistryCleaner` | `createAndRegister()`
    `` | `public void` | `updateConstantMetaClass(groovy.lang.MetaClassRegistryChangeEvent cmcu)`
    `` | `private void` | `updateMetaClassOfClass(groovy.lang.MetaClass oldMetaClass, java.lang.Class classToUpdate)`
    `` | `private void` | `updateMetaClassOfInstance(groovy.lang.MetaClass oldMetaClass, java.lang.Object instanceToUpdate)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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

    - #### private static final MetaClassRegistryCleaner INSTANCE

    - #### private static final java.lang.Object NO_CUSTOM_METACLASS

    - #### private java.util.Map<java.lang.Class, java.lang.Object> alteredClasses

    - #### private java.util.Map<IdentityWeakReference, java.lang.Object> alteredInstances

    - #### private static boolean cleaning

  - ### Constructor Detail

    - #### private MetaClassRegistryCleaner()

  - ### Method Detail

    - #### public static void addAlteredMetaClass(java.lang.Class cls, groovy.lang.MetaClass altered)

    - #### public void clean()

    - #### public static void cleanAndRemove(MetaClassRegistryCleaner cleaner)

    - #### private void cleanMetaClassOfClass(org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl registry)

    - #### private void cleanMetaClassOfInstance(org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl registry)

    - #### public static MetaClassRegistryCleaner createAndRegister()

    - #### public void updateConstantMetaClass(groovy.lang.MetaClassRegistryChangeEvent cmcu)

    - #### private void updateMetaClassOfClass(groovy.lang.MetaClass oldMetaClass, java.lang.Class classToUpdate)

    - #### private void updateMetaClassOfInstance(groovy.lang.MetaClass oldMetaClass, java.lang.Object instanceToUpdate)