org.codehaus.groovy.grails.commons.metaclass
Interface StaticMethodInvocation

All Known Implementing Classes:
AbstractClausedStaticPersistentMethod, AbstractStaticMethodInvocation, AbstractStaticPersistentMethod, ClosureInvokingDynamicMethod, CountByPersistentMethod, CreateDynamicMethod, ExecuteQueryPersistentMethod, FindAllByPersistentMethod, FindAllPersistentMethod, FindByPersistentMethod, FindPersistentMethod, ListOrderByPersistentMethod, ListPersistentMethod

public interface StaticMethodInvocation

Static method invocation callback interface. Implementation classes can add static persistent functionality to Grails like finder methods.

Since:
Aug 7, 2005
Author:
Steven Devijver

Method Summary
 Object invoke(Class clazz, String methodName, Object[] arguments)
          Invokes the actual method.
 boolean isMethodMatch(String methodName)
          Checks if a method name matches the criteria of the implementation class.
 

Method Detail

isMethodMatch

boolean isMethodMatch(String methodName)

Checks if a method name matches the criteria of the implementation class.

Parameters:
methodName - the static method name
Returns:
result of criteria match test

invoke

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

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

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


Copyright (c) 2005-2009 The Grails project