| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final LinkedList | |
| public static final int | |
| private static final MetaClass[] | |
| private static final MetaClassRegistryChangeEventListener[] | |
| private static MetaClassRegistry | |
| private static MetaClassRegistry | |
| private final FastArray | |
| public static final int | |
| private volatile MetaClassRegistry. | |
| private final ManagedConcurrentLinkedQueue | |
| public static final String | MODULE_META_INF_FILE
Deprecated
Use
ExtensionModuleScanner#MODULE_META_INF_FILE instead
|
| private final ExtensionModuleRegistry | |
| private final LinkedList | |
| private final FastArray | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | MetaClassRegistryImpl(boolean
defines whether or not the useAccessible)java.
method will be called to enable access to all methods when using reflection
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener
the listener listener)Implements groovy. |
| public void | addNonRemovableMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener
the listener listener)Implements groovy. |
| private void | |
| protected void | fireConstantMetaClassUpdate(Object
object instance if the MetaClass change is on a per-instance metaclass (or null if global) obj, Class<T> the class c, final MetaClass the old MetaClass oldMC, MetaClass the new MetaClass newMc)Causes the execution of all registered listeners. |
| public static synchronized MetaClassRegistry | |
| public FastArray | |
| public final MetaClass | getMetaClass(Class<T> theClass)
Implements groovy. |
| public MetaClass | |
| public MetaClassRegistry. | Returns: the handleImplements groovy. Warning experimental code, likely to change soon |
| public MetaClassRegistryChangeEventListener[] | getMetaClassRegistryChangeEventListeners()
Implements groovy. |
| public ExtensionModuleRegistry | |
| public FastArray | |
| private void | installMetaClassCreationHandle()
Looks for a class called 'groovy.runtime.metaclass.CustomMetaClassCreationHandle' and if it exists uses it as the MetaClassCreationHandle otherwise uses the default |
| public Iterator | Returns: the iterator.Implements groovy. |
| private static void | |
| public void | registerExtensionModuleFromProperties(final Properties properties, final ClassLoader classLoader, final Map<CachedClass, List<MetaMethod>> map)
|
| private void | registerMethods(final Class<T> theClass, final boolean useMethodWrapper, final boolean useInstanceMethods, Map<CachedClass, List<MetaMethod>> map)
|
| public void | removeMetaClass(Class<T>
The Java class of the MetaClass to remove theClass)Implements groovy. |
| public void | removeMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener
the listener listener)Implements groovy. |
| private void | setMetaClass(Class<T> theClass, MetaClass oldMc, MetaClass newMc)
if oldMc is null, newMc will replace whatever meta class was used before. |
| public void | setMetaClass(Class<T> theClass, MetaClass theMetaClass)
Implements groovy. |
| public void | |
| public void | setMetaClassCreationHandle(MetaClassRegistry.
the handle handleImplements groovy. |
| public boolean |
| changeListenerList | back to summary |
|---|---|
| private final LinkedList<MetaClassRegistryChangeEventListener> changeListenerList | |
| DONT_LOAD_DEFAULT | back to summary |
|---|---|
| public static final int DONT_LOAD_DEFAULT | |
| EMPTY_METACLASS_ARRAY | back to summary |
|---|---|
| private static final MetaClass[] EMPTY_METACLASS_ARRAY | |
| EMPTY_METACLASSREGISTRYCHANGEEVENTLISTENER_ARRAY | back to summary |
|---|---|
| private static final MetaClassRegistryChangeEventListener[] EMPTY_METACLASSREGISTRYCHANGEEVENTLISTENER_ARRAY | |
| instanceExclude | back to summary |
|---|---|
| private static MetaClassRegistry instanceExclude | |
| instanceInclude | back to summary |
|---|---|
| private static MetaClassRegistry instanceInclude | |
| instanceMethods | back to summary |
|---|---|
| private final FastArray instanceMethods | |
| LOAD_DEFAULT | back to summary |
|---|---|
| public static final int LOAD_DEFAULT | |
| metaClassCreationHandle | back to summary |
|---|---|
| private volatile MetaClassRegistry. | |
| metaClassInfo | back to summary |
|---|---|
| private final ManagedConcurrentLinkedQueue<MetaClass> metaClassInfo | |
| MODULE_META_INF_FILE | back to summary |
|---|---|
| public static final String MODULE_META_INF_FILE
Deprecated Use | |
| moduleRegistry | back to summary |
|---|---|
| private final ExtensionModuleRegistry moduleRegistry | |
| nonRemoveableChangeListenerList | back to summary |
|---|---|
| private final LinkedList<MetaClassRegistryChangeEventListener> nonRemoveableChangeListenerList | |
| staticMethods | back to summary |
|---|---|
| private final FastArray staticMethods | |
| useAccessible | back to summary |
|---|---|
| private final boolean useAccessible | |
| MetaClassRegistryImpl | back to summary |
|---|---|
| public MetaClassRegistryImpl() | |
| MetaClassRegistryImpl | back to summary |
|---|---|
| public MetaClassRegistryImpl(int loadDefault) | |
| MetaClassRegistryImpl | back to summary |
|---|---|
public MetaClassRegistryImpl(boolean useAccessible)
| |
| MetaClassRegistryImpl | back to summary |
|---|---|
| public MetaClassRegistryImpl(final int loadDefault, final boolean useAccessible) | |
| addMetaClassRegistryChangeEventListener | back to summary |
|---|---|
| public void addMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener) Implements groovy. Adds a listener for constant meta classes.
| |
| addNonRemovableMetaClassRegistryChangeEventListener | back to summary |
|---|---|
| public void addNonRemovableMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener) Implements groovy. Adds a listener for constant meta classes. This listener cannot be removed!
| |
| createMetaMethodFromClass | back to summary |
|---|---|
| private void createMetaMethodFromClass(Map<CachedClass, List<MetaMethod>> map, Class<T> aClass) | |
| fireConstantMetaClassUpdate | back to summary |
|---|---|
| protected void fireConstantMetaClassUpdate(Object obj, Class<T> c, final MetaClass oldMC, MetaClass newMc) Causes the execution of all registered listeners. This method is used mostly internal to kick of the listener notification. It can also be used by subclasses to achieve the same. | |
| getInstance | back to summary |
|---|---|
| public static synchronized MetaClassRegistry getInstance(int includeExtension) Singleton of MetaClassRegistry.
| |
| getInstanceMethods | back to summary |
|---|---|
| public FastArray getInstanceMethods() | |
| getMetaClass | back to summary |
|---|---|
| public final MetaClass getMetaClass(Class<T> theClass) Implements groovy. Doc from groovy. The main function of the registry If a meta class exists then return it otherwise create one, put it in the registry and return it | |
| getMetaClass | back to summary |
|---|---|
| public MetaClass getMetaClass(Object obj) | |
| getMetaClassCreationHandler | back to summary |
|---|---|
| public MetaClassRegistry. Implements groovy. Gets a handle internally used to create MetaClass implementations Warning experimental code, likely to change soon
| |
| getMetaClassRegistryChangeEventListeners | back to summary |
|---|---|
| public MetaClassRegistryChangeEventListener[] getMetaClassRegistryChangeEventListeners() Implements groovy. Gets an array of all registered ConstantMetaClassListener instances.
| |
| getModuleRegistry | back to summary |
|---|---|
| public ExtensionModuleRegistry getModuleRegistry() | |
| getStaticMethods | back to summary |
|---|---|
| public FastArray getStaticMethods() | |
| installMetaClassCreationHandle | back to summary |
|---|---|
| private void installMetaClassCreationHandle() Looks for a class called 'groovy.runtime.metaclass.CustomMetaClassCreationHandle' and if it exists uses it as the MetaClassCreationHandle otherwise uses the default | |
| iterator | back to summary |
|---|---|
| public Iterator Implements groovy. Returns an iterator to iterate over all constant meta classes. This iterator can be seen as making a snapshot of the current state of the registry. The snapshot will include all meta classes that has been used unless they are already collected. Collected meta classes will be skipped automatically, so you can expect that each element of the iteration is not null. Calling this method is thread safe, the usage of the iterator is not.
| |
| refreshMopMethods | back to summary |
|---|---|
| private static void refreshMopMethods(final Map<CachedClass, List<MetaMethod>> map) | |
| registerExtensionModuleFromProperties | back to summary |
|---|---|
| public void registerExtensionModuleFromProperties(final Properties properties, final ClassLoader classLoader, final Map<CachedClass, List<MetaMethod>> map) | |
| registerMethods | back to summary |
|---|---|
| private void registerMethods(final Class<T> theClass, final boolean useMethodWrapper, final boolean useInstanceMethods, Map<CachedClass, List<MetaMethod>> map) | |
| removeMetaClass | back to summary |
|---|---|
| public void removeMetaClass(Class<T> theClass) Implements groovy. Doc from groovy. Removes a cached MetaClass from the registry
| |
| removeMetaClassRegistryChangeEventListener | back to summary |
|---|---|
| public void removeMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener) Implements groovy. Removes a constant meta class listener.
| |
| setMetaClass | back to summary |
|---|---|
| private void setMetaClass(Class<T> theClass, MetaClass oldMc, MetaClass newMc) if oldMc is null, newMc will replace whatever meta class was used before. if oldMc is not null, then newMc will be used only if the stored mc is the same as oldMc | |
| setMetaClass | back to summary |
|---|---|
| public void setMetaClass(Class<T> theClass, MetaClass theMetaClass) Implements groovy. Registers a new MetaClass in the registry to customize the type | |
| setMetaClass | back to summary |
|---|---|
| public void setMetaClass(Object obj, MetaClass theMetaClass) | |
| setMetaClassCreationHandle | back to summary |
|---|---|
| public void setMetaClassCreationHandle(MetaClassRegistry. Implements groovy. Sets a handle internally used to create MetaClass implementations. When replacing the handle with a custom version, you should reuse the old handle to keep custom logic and to use the default logic as fall back. Warning experimental code, likely to change soon
| |
| useAccessible | back to summary |
|---|---|
| public boolean useAccessible() | |
| Modifier and Type | Field and Description |
|---|---|
| private final Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| map | back to summary |
|---|---|
| private final Map<CachedClass, List<MetaMethod>> map | |
| DefaultModuleListener | back to summary |
|---|---|
| public DefaultModuleListener(final Map<CachedClass, List<MetaMethod>> map) | |
| onModule | back to summary |
|---|---|
| public void onModule(final ExtensionModule module) Implements org. | |