|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethodsInterceptor
public abstract class AbstractDynamicMethodsInterceptor
Implements an the Interceptor interface to add support for using ProxyMetaClass to define dynamic methods
Field Summary |
---|
Fields inherited from class org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods |
---|
clazz, dynamicConstructors, dynamicMethodInvocations, dynamicProperties, staticMethodInvocations |
Constructor Summary | |
---|---|
AbstractDynamicMethodsInterceptor()
|
|
AbstractDynamicMethodsInterceptor(Class theClass)
|
|
AbstractDynamicMethodsInterceptor(Class theClass,
boolean inRegistry)
|
Method Summary | |
---|---|
Object |
afterConstructor(Object[] args,
Object instantiatedInstance)
Executed after the constructor passing the args and the instantiated instance |
Object |
afterInvoke(Object object,
String methodName,
Object[] arguments,
Object result)
This code is executed after the method is optionally called. |
Object |
beforeConstructor(Object[] args,
InvocationCallback callback)
Executed before the real constructor. |
Object |
beforeGet(Object object,
String property,
InvocationCallback callback)
Intercepts a getXXX call and returns a result. |
Object |
beforeInvoke(Object target,
String methodName,
Object[] arguments,
InvocationCallback callback)
This code is executed before the method is optionally called. |
void |
beforeSet(Object object,
String property,
Object newValue,
InvocationCallback callback)
Intercepts a setXXX call |
Methods inherited from class org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods |
---|
addDynamicConstructor, addDynamicMethodInvocation, addDynamicProperty, addStaticMethodInvocation, getDynamicMethod, getDynamicProperty, getProperty, invokeConstructor, invokeMethod, invokeStaticMethod, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractDynamicMethodsInterceptor()
public AbstractDynamicMethodsInterceptor(Class theClass, boolean inRegistry) throws IntrospectionException
IntrospectionException
public AbstractDynamicMethodsInterceptor(Class theClass) throws IntrospectionException
IntrospectionException
Method Detail |
---|
public Object afterConstructor(Object[] args, Object instantiatedInstance)
ConstructorInterceptor
afterConstructor
in interface ConstructorInterceptor
args
- The argumentsinstantiatedInstance
- The instantiated instance
public Object beforeConstructor(Object[] args, InvocationCallback callback)
ConstructorInterceptor
beforeConstructor
in interface ConstructorInterceptor
args
- The constructor argscallback
- The callback object
public Object beforeInvoke(Object target, String methodName, Object[] arguments, InvocationCallback callback)
Interceptor
beforeInvoke
in interface Interceptor
target
- receiver object for the method callmethodName
- name of the method to callarguments
- arguments to the method callcallback
- The callback object
public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result)
Interceptor
afterInvoke
in interface Interceptor
object
- receiver object for the called methodmethodName
- name of the called methodarguments
- arguments to the called methodresult
- result of the executed method call or result of beforeInvoke if method was not called
public Object beforeGet(Object object, String property, InvocationCallback callback)
PropertyAccessInterceptor
beforeGet
in interface PropertyAccessInterceptor
object
- The target objectproperty
- The property to getcallback
- The callback object
public void beforeSet(Object object, String property, Object newValue, InvocationCallback callback)
PropertyAccessInterceptor
beforeSet
in interface PropertyAccessInterceptor
object
- The target objectproperty
- The property to setnewValue
- The new valuecallback
- The callback object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |