|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
public interface MetaClassRegistry
A MetaClassRegistry is an object that is responsible for managing the a cache of MetaClass instances. Each java.lang.Class instance has an associated MetaClass and client code can query this interface for the MetaClass for a given associated java.lang.Class
Nested Class Summary | |
---|---|
class |
MetaClassRegistry.MetaClassCreationHandle
Class used as base for the creation of MetaClass implementations. |
Method Summary | |
---|---|
void
|
addMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener)
adds a meta class change listener for constant meta classes |
void
|
addNonRemovableMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener)
adds a meta class change listener for constant meta classes. |
MetaClass
|
getMetaClass(Class theClass)
|
MetaClassRegistry.MetaClassCreationHandle
|
getMetaClassCreationHandler()
Retrieves the MetaClassCreationHandle that is responsible for constructing MetaClass instances |
MetaClassRegistryChangeEventListener[]
|
getMetaClassRegistryChangeEventListeners()
Returns all registered class change listener for constant meta classes. |
Iterator
|
iterator()
gets a snapshot of the current constant meta classes and returns it as Iterator. |
void
|
removeMetaClass(Class theClass)
Removes a cached MetaClass from the registry |
void
|
removeMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener)
removes a meta class change listener for constant meta classes |
void
|
setMetaClass(Class theClass, MetaClass theMetaClass)
|
void
|
setMetaClassCreationHandle(MetaClassRegistry.MetaClassCreationHandle handle)
Sets the MetaClassCreationHandle instance that is responsible for constructing instances |
Method Detail |
---|
public void addMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener)
listener
- - the update listener
public void addNonRemovableMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener)
listener
- - the update listener
public MetaClass getMetaClass(Class theClass)
public MetaClassRegistry.MetaClassCreationHandle getMetaClassCreationHandler()
public MetaClassRegistryChangeEventListener[] getMetaClassRegistryChangeEventListeners()
public Iterator iterator()
Note: This Iterator may not used with multiple threads.
public void removeMetaClass(Class theClass)
theClass
- The Java class of the MetaClass to remove
public void removeMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener)
listener
- - the update listener
public void setMetaClass(Class theClass, MetaClass theMetaClass)
public void setMetaClassCreationHandle(MetaClassRegistry.MetaClassCreationHandle handle)
handle
- The handle instance
Copyright © 2003-2013 The Codehaus. All rights reserved.