Package groovy.lang

Class ExpandoMetaClassCreationHandle

public class ExpandoMetaClassCreationHandle extends MetaClassRegistry.MetaClassCreationHandle

A handle for the MetaClassRegistry that changes all classes loaded into the Grails VM to use ExpandoMetaClass instances

The handle should be registered with the Groovy runtime before Groovy loads, for example in your main method. GroovySystem.metaClassRegistry.metaClassCreationHandle = new ExpandoMetaClassCreationHandle()

See Also:
  • Field Details

  • Constructor Details

    • ExpandoMetaClassCreationHandle

      public ExpandoMetaClassCreationHandle()
  • Method Details

    • createNormalMetaClass

      protected MetaClass createNormalMetaClass(Class theClass, MetaClassRegistry registry)
      createNormalMetaClass in class MetaClassRegistry.MetaClassCreationHandle
    • registerModifiedMetaClass

      public void registerModifiedMetaClass(ExpandoMetaClass emc)
      Registers a modified ExpandoMetaClass with the creation handle
      emc - The EMC
    • hasModifiedMetaClass

      public boolean hasModifiedMetaClass(ExpandoMetaClass emc)
    • enable

      public static void enable()

      Enables the ExpandoMetaClassCreationHandle with the registry ExpandoMetaClassCreationHandle.enable();

    • disable

      public static void disable()