Save This Page
Home » groovy-src-1.6.3 » org.codehaus » groovy » runtime » metaclass » [javadoc | source]
org.codehaus.groovy.runtime.metaclass
public class: MetaClassRegistryImpl [javadoc | source]
java.lang.Object
   org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl

All Implemented Interfaces:
    MetaClassRegistry

A registry of MetaClass instances which caches introspection & reflection information and allows methods to be dynamically added to existing classes at runtime
Field Summary
public static final  int LOAD_DEFAULT     
public static final  int DONT_LOAD_DEFAULT     
Constructor:
 public MetaClassRegistryImpl() 
 public MetaClassRegistryImpl(int loadDefault) 
 public MetaClassRegistryImpl(boolean useAccessible) 
 public MetaClassRegistryImpl(int loadDefault,
    boolean useAccessible) 
Method from org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl Summary:
addMetaClassRegistryChangeEventListener,   fireConstantMetaClassUpdate,   getInstance,   getInstanceMethods,   getMetaClass,   getMetaClass,   getMetaClassCreationHandler,   getMetaClassRegistryChangeEventListeners,   getStaticMethods,   iterator,   removeMetaClass,   removeMetaClassRegistryChangeEventListener,   setMetaClass,   setMetaClass,   setMetaClassCreationHandle,   useAccessible
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl Detail:
 public  void addMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener) 
    Adds a listener for constant meta classes.
 protected  void fireConstantMetaClassUpdate(Class c,
    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.
 public static MetaClassRegistry getInstance(int includeExtension) 
    Singleton of MetaClassRegistry.
 public FastArray getInstanceMethods() 
 public final MetaClass getMetaClass(Class theClass) 
 public MetaClass getMetaClass(Object obj) 
 public MetaClassCreationHandle getMetaClassCreationHandler() 
    Gets a handle internally used to create MetaClass implementations WARNING: experimental code, likely to change soon
 public MetaClassRegistryChangeEventListener[] getMetaClassRegistryChangeEventListeners() 
    Gets an array of of all registered ConstantMetaClassListener instances.
 public FastArray getStaticMethods() 
 public Iterator iterator() 
    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.
 public  void removeMetaClass(Class theClass) 
 public  void removeMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener) 
    Removes a constant meta class listener.
 public  void setMetaClass(Class theClass,
    MetaClass theMetaClass) 
    Registers a new MetaClass in the registry to customize the type
 public  void setMetaClass(Object obj,
    MetaClass theMetaClass) 
 public  void setMetaClassCreationHandle(MetaClassCreationHandle handle) 
    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
 public boolean useAccessible()