Groovy Documentation

org.codehaus.groovy.grails.commons.metaclass
[Java] Interface StaticMethodInvocation


public interface StaticMethodInvocation

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

Authors:
Steven Devijver


Method Summary
java.lang.Object invoke(java.lang.Class clazz, java.lang.String methodName, java.lang.Object[] arguments)

Invokes the actual method.

boolean isMethodMatch(java.lang.String methodName)

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

 

Method Detail

invoke

public java.lang.Object invoke(@SuppressWarnings("rawtypes") java.lang.Class clazz, java.lang.String methodName, java.lang.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


isMethodMatch

public boolean isMethodMatch(java.lang.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


 

Groovy Documentation