Groovy Documentation

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


public interface DynamicMethodInvocation

Dynamic method invocation callback interface. Implementation classes can add a persistence functionality to Grails like save and delete.

Authors:
Steven Devijver
Graeme Rocher


Method Summary
java.lang.Object invoke(java.lang.Object target, 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(java.lang.Object target, java.lang.String methodName, java.lang.Object[] arguments)
Invokes the actual method. The target object and arguments are supplied.
Parameters:
target - the target on which the method is invoked.
methodName
arguments - the arguments passed in the method call
Returns:
the return value of the dynamic 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