Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.commons.metaclass
Class CreateDynamicMethod

    java.lang.Object
      org.codehaus.groovy.grails.commons.metaclass.AbstractStaticMethodInvocation
          org.codehaus.groovy.grails.commons.metaclass.CreateDynamicMethod

All Implemented Interfaces:
  StaticMethodInvocation

    public class CreateDynamicMethod

extends AbstractStaticMethodInvocation

A dynamic static method that is a factory method for creating new instances eg. Account.create()

Since:
  Oct 24, 2005
Author:
  Graeme Rocher

Field Summary
`static String` | `METHOD_NAME`

Constructor Summary
`CreateDynamicMethod()`

Method Summary
`Object` | `invoke(Class clazz, String methodName, Object[] arguments)` Invokes the actual method.

Methods inherited from class org.codehaus.groovy.grails.commons.metaclass.AbstractStaticMethodInvocation
`getPattern, isMethodMatch, setPattern, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### METHOD_NAME

    public static final String METHOD_NAME

See Also:
  Constant Field Values

Constructor Detail

### CreateDynamicMethod

    public CreateDynamicMethod()

Method Detail

### invoke

    public Object invoke(Class clazz,
                         String methodName,
                         Object[] arguments)

  Description copied from interface: `StaticMethodInvocation`

  Invokes the actual method. The class, method name and arguments are provided. If no arguments are passed the argument array is empty.

  Specified by:
    `invoke` in interface `StaticMethodInvocation`
  Specified by:
    `invoke` in class `AbstractStaticMethodInvocation`
  Parameters:
    `clazz` - the class the static method is called on
    `methodName` - the static method name
    `arguments` - the arguments supplied
  Returns:
    the return value of the static method invocation

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2005-2006 The Grails project