Groovy Documentation

org.codehaus.groovy.grails.commons
[Java] Class GrailsMetaClassUtils

java.lang.Object
  org.codehaus.groovy.grails.commons.GrailsMetaClassUtils

public class GrailsMetaClassUtils

Provides utility methods for working with the Groovy MetaClass API.

Authors:
Graeme Rocher
Since:
0.5


Method Summary
static void copyExpandoMetaClass(java.lang.Class fromClass, java.lang.Class toClass, boolean removeSource)

Copies the ExpandoMetaClass dynamic methods and properties from one Class to another.

static groovy.lang.ExpandoMetaClass getExpandoMetaClass(java.lang.Class aClass)

static groovy.lang.MetaClassRegistry getRegistry()

Retrieves the MetaClassRegistry instance.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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()
 

Method Detail

copyExpandoMetaClass

@SuppressWarnings({ "unchecked", "rawtypes" })
public static void copyExpandoMetaClass(java.lang.Class fromClass, java.lang.Class toClass, boolean removeSource)
Copies the ExpandoMetaClass dynamic methods and properties from one Class to another.
Parameters:
fromClass - The source class
toClass - The destination class
removeSource - Whether to remove the source class after completion. True if yes


getExpandoMetaClass

public static groovy.lang.ExpandoMetaClass getExpandoMetaClass(java.lang.Class aClass)


getRegistry

public static groovy.lang.MetaClassRegistry getRegistry()
Retrieves the MetaClassRegistry instance.
Returns:
The registry


 

Groovy Documentation