org.codehaus.groovy.grails.commons.metaclass
Class AbstractDynamicMethodInvocation

java.lang.Object
  extended by org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethodInvocation
All Implemented Interfaces:
DynamicMethodInvocation
Direct Known Subclasses:
AbstractDynamicControllerMethod, AbstractDynamicPersistentMethod, BindDynamicMethod, ChainDynamicMethod, RedirectDynamicMethod, RenderDynamicMethod

public abstract class AbstractDynamicMethodInvocation
extends Object
implements DynamicMethodInvocation

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

Constructor Summary
AbstractDynamicMethodInvocation(Pattern pattern)
           
 
Method Summary
protected  Pattern getPattern()
           
abstract  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.
 void setPattern(Pattern pattern)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDynamicMethodInvocation

public AbstractDynamicMethodInvocation(Pattern pattern)
Method Detail

setPattern

public void setPattern(Pattern pattern)

getPattern

protected Pattern getPattern()

isMethodMatch

public boolean isMethodMatch(String methodName)
Description copied from interface: DynamicMethodInvocation

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

Specified by:
isMethodMatch in interface DynamicMethodInvocation
Parameters:
methodName - the static method name
Returns:
result of criteria match test

invoke

public abstract Object invoke(Object target,
                              String methodName,
                              Object[] arguments)
Description copied from interface: DynamicMethodInvocation

Invokes the actual method. The target object and arguments are supplied.

Specified by:
invoke in interface DynamicMethodInvocation
Parameters:
target - the target on which the method is invoked.
arguments - the arguments passed in the method call @return the return value of the dynamic method invocation.


Copyright (c) 2005-2006 The Grails project