Groovy Documentation

groovy.lang
[Java] Class ExpandoMetaClassCreationHandle

java.lang.Object
  groovy.lang.MetaClassRegistry.MetaClassCreationHandle
      groovy.lang.ExpandoMetaClassCreationHandle

public class ExpandoMetaClassCreationHandle
extends 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()

Authors:
Graeme Rocher
See Also:
MetaClassRegistry
groovy.lang.MetaClassRegistry.MetaClassCreationHandle
MetaClassRegistryImpl.setMetaClassCreationHandle
Since:
1.5


Field Summary
static ExpandoMetaClassCreationHandle instance

 
Method Summary
protected MetaClass createNormalMetaClass(java.lang.Class theClass, MetaClassRegistry registry)

static void disable()

static void enable()

boolean hasModifiedMetaClass(ExpandoMetaClass emc)

void registerModifiedMetaClass(ExpandoMetaClass emc)

Registers a modified ExpandoMetaClass with the creation handle

 

Field Detail

instance

public static final ExpandoMetaClassCreationHandle instance


 
Method Detail

createNormalMetaClass

protected MetaClass createNormalMetaClass(java.lang.Class theClass, MetaClassRegistry registry)


disable

public static void disable()


enable

public static void enable()

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


hasModifiedMetaClass

public boolean hasModifiedMetaClass(ExpandoMetaClass emc)


registerModifiedMetaClass

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


 

Groovy Documentation