Groovy Documentation

## org.codehaus.groovy.grails.commons.metaclass
[Java] Class AbstractDynamicMethods

    java.lang.Object
      org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods

All Implemented Interfaces:
  DynamicMethods

    public abstract class AbstractDynamicMethods

Provides the base implementation responsible for performing dynamic method invocation such as the dynamic finders in GORM.

Authors:
  Steven Devijver
  Graeme Rocher

Since:
  0.1

Field Summary
`protected java.lang.Class` | `clazz`
`protected java.util.Collection` | `dynamicConstructors`
`protected java.util.Collection` | `dynamicMethodInvocations`
`protected java.util.Map` | `dynamicProperties`
`protected java.util.Collection` | `staticMethodInvocations`

Constructor Summary
`AbstractDynamicMethods(java.lang.Class theClass)` Creates and registers a DelegatingMetaClass instance in the registry that delegates to this class.
`AbstractDynamicMethods(java.lang.Class theClass, boolean inRegistry)` Creates and optionally registers a DelegatingMetaClass in the MetaClasRegistry that delegates to this class.
`AbstractDynamicMethods()` A non-registering constructor that simple creates an instance

Method Summary
`void` | `addDynamicConstructor(DynamicConstructor constructor)`
`void` | `addDynamicMethodInvocation(DynamicMethodInvocation methodInvocation)`
`void` | `addDynamicProperty(DynamicProperty property)`
`void` | `addStaticMethodInvocation(StaticMethodInvocation methodInvocation)`
`DynamicMethodInvocation` | `getDynamicMethod(java.lang.String methodSignature)`
`DynamicProperty` | `getDynamicProperty(java.lang.String propertyName)`
`java.lang.Object` | `getProperty(java.lang.Object object, java.lang.String propertyName, InvocationCallback callback)`
`java.lang.Object` | `invokeConstructor(Object[] arguments, InvocationCallback callBack)`
`java.lang.Object` | `invokeMethod(java.lang.Object object, java.lang.String methodName, Object[] arguments, InvocationCallback callback)`
`java.lang.Object` | `invokeStaticMethod(java.lang.Object object, java.lang.String methodName, Object[] arguments, InvocationCallback callBack)`
`void` | `setProperty(java.lang.Object object, java.lang.String propertyName, java.lang.Object newValue, InvocationCallback callback)`

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()

Field Detail

### clazz

    protected java.lang.Class clazz

### dynamicConstructors

    protected java.util.Collection dynamicConstructors

### dynamicMethodInvocations

    protected java.util.Collection dynamicMethodInvocations

### dynamicProperties

    protected java.util.Map dynamicProperties

### staticMethodInvocations

    protected java.util.Collection staticMethodInvocations

Constructor Detail

### AbstractDynamicMethods

    public AbstractDynamicMethods(java.lang.Class theClass)

  Creates and registers a DelegatingMetaClass instance in the registry that delegates to this class.
  Parameters:
    theClass

### AbstractDynamicMethods

    public AbstractDynamicMethods(java.lang.Class theClass, @SuppressWarnings("unused") boolean inRegistry)

  Creates and optionally registers a DelegatingMetaClass in the MetaClasRegistry that delegates to this class.
  Parameters:
    theClass
    inRegistry

### AbstractDynamicMethods

    public AbstractDynamicMethods()

  A non-registering constructor that simple creates an instance

Method Detail

### addDynamicConstructor

    public void addDynamicConstructor(DynamicConstructor constructor)

### addDynamicMethodInvocation

    public void addDynamicMethodInvocation(DynamicMethodInvocation methodInvocation)

### addDynamicProperty

    public void addDynamicProperty(DynamicProperty property)

### addStaticMethodInvocation

    public void addStaticMethodInvocation(StaticMethodInvocation methodInvocation)

### getDynamicMethod

    public DynamicMethodInvocation getDynamicMethod(java.lang.String methodSignature)

### getDynamicProperty

    public DynamicProperty getDynamicProperty(java.lang.String propertyName)

### getProperty

    public java.lang.Object getProperty(java.lang.Object object, java.lang.String propertyName, InvocationCallback callback)

### invokeConstructor

    public java.lang.Object invokeConstructor(Object[] arguments, InvocationCallback callBack)

### invokeMethod

    public java.lang.Object invokeMethod(java.lang.Object object, java.lang.String methodName, Object[] arguments, InvocationCallback callback)

### invokeStaticMethod

    public java.lang.Object invokeStaticMethod(java.lang.Object object, java.lang.String methodName, Object[] arguments, InvocationCallback callBack)

### setProperty

    public void setProperty(java.lang.Object object, java.lang.String propertyName, java.lang.Object newValue, InvocationCallback callback)

Groovy Documentation