MetaClassRegistry.MetaClassCreationHandle (Groovy 5.1.0)
Description: declaration: package: groovy.lang, interface: MetaClassRegistry, class: MetaClassCreationHandle

Package groovy.lang

# Class MetaClassRegistry.MetaClassCreationHandle

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

Direct Known Subclasses:
  `ExpandoMetaClassCreationHandle`

Enclosing interface:
  MetaClassRegistry

public static class MetaClassRegistry.MetaClassCreationHandle extends Object
Class used as base for the creation of MetaClass implementations. The Class defaults to MetaClassImpl, if the class loading fails to find a special metaclass. The name for such a metaclass would be the class name it is created for with the prefix "groovy.runtime.metaclass." By replacing the handle in the registry you can have any control over the creation of what MetaClass is used for a class that you want to have. WARNING: experimental code, likely to change soon

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MetaClassCreationHandle()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final MetaClass`
  `create(Class theClass, MetaClassRegistry registry)`
  Creates a metaclass implementation for theClass.
  `protected MetaClass`
  `createNormalMetaClass(Class theClass, MetaClassRegistry registry)`
  `boolean`
  `isDisableCustomMetaClassLookup()`
  Returns whether custom metaclasses are disabled.
  `void`
  `setDisableCustomMetaClassLookup(boolean disableCustomMetaClassLookup)`
  Set flag saying to disable lookup of custom metaclasses It's enough to call this method only once in your application for handle which was set in to registry as every new handle will inherit this property

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MetaClassCreationHandle

    public MetaClassCreationHandle()

- ## Method Details

  - ### create

    public final MetaClass create(Class theClass, MetaClassRegistry registry)
    Creates a metaclass implementation for theClass.
    Parameters:
      `theClass` - The class to create a metaclass for
      `registry` - The metaclass registry the metaclass we be registered in.

  - ### createNormalMetaClass

    protected MetaClass createNormalMetaClass(Class theClass, MetaClassRegistry registry)

  - ### isDisableCustomMetaClassLookup

    public boolean isDisableCustomMetaClassLookup()
    Returns whether custom metaclasses are disabled.

  - ### setDisableCustomMetaClassLookup

    public void setDisableCustomMetaClassLookup(boolean disableCustomMetaClassLookup)
    Set flag saying to disable lookup of custom metaclasses It's enough to call this method only once in your application for handle which was set in to registry as every new handle will inherit this property
    Parameters:
      `disableCustomMetaClassLookup` - flag saying to disable lookup of custom metaclasses