Package groovy.lang
Class ExpandoMetaClassCreationHandle
java.lang.Object
groovy.lang.MetaClassRegistry.MetaClassCreationHandle
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()
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected MetaClass
createNormalMetaClass
(Class theClass, MetaClassRegistry registry) static void
disable()
static void
enable()
Enables the ExpandoMetaClassCreationHandle with the registryExpandoMetaClassCreationHandle.enable();
boolean
void
Registers a modified ExpandoMetaClass with the creation handleMethods inherited from class groovy.lang.MetaClassRegistry.MetaClassCreationHandle
create, isDisableCustomMetaClassLookup, setDisableCustomMetaClassLookup
-
Field Details
-
instance
-
-
Constructor Details
-
ExpandoMetaClassCreationHandle
public ExpandoMetaClassCreationHandle()
-
-
Method Details
-
createNormalMetaClass
- Overrides:
createNormalMetaClass
in classMetaClassRegistry.MetaClassCreationHandle
-
registerModifiedMetaClass
Registers a modified ExpandoMetaClass with the creation handle- Parameters:
emc
- The EMC
-
hasModifiedMetaClass
-
enable
public static void enable()Enables the ExpandoMetaClassCreationHandle with the registry
ExpandoMetaClassCreationHandle.enable();
-
disable
public static void disable()
-