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

All Known Implementing Classes:
AbstractDynamicControllerMethod, AbstractDynamicMethodInvocation, AbstractDynamicPersistentMethod, AbstractSavePersistentMethod, BindDynamicMethod, ChainDynamicMethod, ClosureInvokingDynamicMethod, DeletePersistentMethod, DiscardPersistentMethod, MergePersistentMethod, RedirectDynamicMethod, RefreshPersistentMethod, RenderDynamicMethod, SavePersistentMethod, ValidatePersistentMethod

public interface DynamicMethodInvocation

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

Since:
Aug 7, 2005
Author:
Steven Devijver, Graeme Rocher

Method Summary
 Object invoke(Object target, 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(Object target,
              String methodName,
              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 @return the return value of the dynamic method invocation.


Copyright (c) 2005-2006 The Grails project