Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.runtime.metaclass
[Java] Class MetaClassRegistryImpl

    java.lang.Object
      org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl

All Implemented Interfaces:
  MetaClassRegistry

    public class MetaClassRegistryImpl
    extends java.lang.Object

A registry of MetaClass instances which caches introspection & reflection information and allows methods to be dynamically added to existing classes at runtime

Authors:
  James Strachan
  John Wilson
  Jochen Theodorou
  Graeme Rocher
  Alex Tkachman

Version:
  \$Revision\$

Field Summary
`static int` | `DONT_LOAD_DEFAULT`
`static int` | `LOAD_DEFAULT`
`static java.lang.String` | `MODULE_META_INF_FILE`

Constructor Summary
`MetaClassRegistryImpl()`
`MetaClassRegistryImpl(int loadDefault)`
`MetaClassRegistryImpl(boolean useAccessible)` @param useAccessible defines whether or not the java.lang.reflect.AccessibleObject#setAccessible(boolean) method will be called to enable access to all methods when using reflection
`MetaClassRegistryImpl(int loadDefault, boolean useAccessible)`

Method Summary
`void` | `addMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener)`
`void` | `addNonRemovableMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener)` Removes a constant meta class listener.
`protected void` | `fireConstantMetaClassUpdate(java.lang.Object obj, java.lang.Class c, MetaClass oldMC, MetaClass newMc)`
`static MetaClassRegistry` | `getInstance(int includeExtension)`
`FastArray` | `getInstanceMethods()`
`MetaClass` | `getMetaClass(java.lang.Class theClass)`
`MetaClass` | `getMetaClass(java.lang.Object obj)`
`MetaClassCreationHandle` | `getMetaClassCreationHandler()`
`MetaClassRegistryChangeEventListener[]` | `getMetaClassRegistryChangeEventListeners()`
`ExtensionModuleRegistry` | `getModuleRegistry()`
`FastArray` | `getStaticMethods()`
`java.util.Iterator` | `iterator()`
`void` | `registerExtensionModuleFromProperties(java.util.Properties properties, java.lang.ClassLoader classLoader, java.util.Map map)`
`void` | `removeMetaClass(java.lang.Class theClass)`
`void` | `removeMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener)`
`void` | `setMetaClass(java.lang.Class theClass, MetaClass theMetaClass)`
`void` | `setMetaClass(java.lang.Object obj, MetaClass theMetaClass)`
`void` | `setMetaClassCreationHandle(MetaClassCreationHandle handle)`
`boolean` | `useAccessible()`

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Field Detail

### DONT_LOAD_DEFAULT

    public static final int DONT_LOAD_DEFAULT

### LOAD_DEFAULT

    public static final int LOAD_DEFAULT

### MODULE_META_INF_FILE

    public static final java.lang.String MODULE_META_INF_FILE

Constructor Detail

### MetaClassRegistryImpl

    public MetaClassRegistryImpl()

### MetaClassRegistryImpl

    public MetaClassRegistryImpl(int loadDefault)

### MetaClassRegistryImpl

    public MetaClassRegistryImpl(boolean useAccessible)

  Parameters:
    `useAccessible` - defines whether or not the java.lang.reflect.AccessibleObject#setAccessible(boolean) method will be called to enable access to all methods when using reflection

### MetaClassRegistryImpl

    public MetaClassRegistryImpl(int loadDefault, boolean useAccessible)

Method Detail

### addMetaClassRegistryChangeEventListener

    public void addMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener)

### addNonRemovableMetaClassRegistryChangeEventListener

    public void addNonRemovableMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener)

  Removes a constant meta class listener.
  Parameters:
    `listener` - the listener

### fireConstantMetaClassUpdate

    protected void fireConstantMetaClassUpdate(java.lang.Object obj, java.lang.Class c, MetaClass oldMC, MetaClass newMc)

### getInstance

    public static MetaClassRegistry getInstance(int includeExtension)

### getInstanceMethods

    public FastArray getInstanceMethods()

### getMetaClass

    public final MetaClass getMetaClass(java.lang.Class theClass)

### getMetaClass

    public MetaClass getMetaClass(java.lang.Object obj)

### getMetaClassCreationHandler

    public MetaClassCreationHandle getMetaClassCreationHandler()

### getMetaClassRegistryChangeEventListeners

    public MetaClassRegistryChangeEventListener[] getMetaClassRegistryChangeEventListeners()

### getModuleRegistry

    public ExtensionModuleRegistry getModuleRegistry()

### getStaticMethods

    public FastArray getStaticMethods()

### iterator

    public java.util.Iterator iterator()

### registerExtensionModuleFromProperties

    public void registerExtensionModuleFromProperties(java.util.Properties properties, java.lang.ClassLoader classLoader, java.util.Map map)

### removeMetaClass

    public void removeMetaClass(java.lang.Class theClass)

### removeMetaClassRegistryChangeEventListener

    public void removeMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener)

### setMetaClass

    public void setMetaClass(java.lang.Class theClass, MetaClass theMetaClass)

### setMetaClass

    public void setMetaClass(java.lang.Object obj, MetaClass theMetaClass)

### setMetaClassCreationHandle

    public void setMetaClassCreationHandle(MetaClassCreationHandle handle)

### useAccessible

    public boolean useAccessible()

Groovy Documentation