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()
groovy.lang.MetaClassRegistry , groovy.lang.MetaClassRegistry.MetaClassCreationHandle , org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl#setMetaClassCreationHandle(groovy.lang.MetaClassRegistry.MetaClassCreationHandle)
| Modifier and Type | Field and Description |
|---|---|
| public static final ExpandoMetaClassCreationHandle |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected MetaClass | createNormalMetaClass(Class<T> theClass, MetaClassRegistry registry)
Overrides groovy. |
| public static void | |
| public static void | enable()
Enables the ExpandoMetaClassCreationHandle with the registry
|
| public boolean | |
| public void | registerModifiedMetaClass(ExpandoMetaClass
The EMC emc)Registers a modified ExpandoMetaClass with the creation handle |
| instance | back to summary |
|---|---|
| public static final ExpandoMetaClassCreationHandle instance | |
| ExpandoMetaClassCreationHandle | back to summary |
|---|---|
| public ExpandoMetaClassCreationHandle() | |
| createNormalMetaClass | back to summary |
|---|---|
| protected MetaClass createNormalMetaClass(Class<T> theClass, MetaClassRegistry registry) Overrides groovy. | |
| disable | back to summary |
|---|---|
| public static void disable() | |
| enable | back to summary |
|---|---|
| public static void enable() Enables the ExpandoMetaClassCreationHandle with the registry
| |
| hasModifiedMetaClass | back to summary |
|---|---|
| public boolean hasModifiedMetaClass(ExpandoMetaClass emc) | |
| registerModifiedMetaClass | back to summary |
|---|---|
| public void registerModifiedMetaClass(ExpandoMetaClass emc) Registers a modified ExpandoMetaClass with the creation handle
| |