[Java] Class ExpandoMetaClassCreationHandle
- groovy.lang.ExpandoMetaClassCreationHandle
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:
- MetaClassRegistry
- groovy.lang.MetaClassRegistry.MetaClassCreationHandle
- MetaClassRegistryImpl.setMetaClassCreationHandle
- Since:
- 1.5
Field Summary
Modifiers | Name | Description |
---|---|---|
static ExpandoMetaClassCreationHandle | instance |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
protected MetaClass |
createNormalMetaClass(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
public static final ExpandoMetaClassCreationHandle instance
Method Detail
protected MetaClass createNormalMetaClass(Class theClass, MetaClassRegistry registry)
public static void disable()
public static void enable()
Enables the ExpandoMetaClassCreationHandle with the registry ExpandoMetaClassCreationHandle.enable();
public boolean hasModifiedMetaClass(ExpandoMetaClass emc)
public void registerModifiedMetaClass(ExpandoMetaClass emc)
Registers a modified ExpandoMetaClass with the creation handle
- Parameters:
-
emc
- The EMC
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.5.14/html/gapi/groovy/lang/ExpandoMetaClassCreationHandle.html