|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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(java.lang.Class theClass)
|
|
AbstractDynamicMethodsInterceptor(java.lang.Class theClass,
boolean inRegistry)
|
Method Summary | |
---|---|
java.lang.Object |
afterConstructor(java.lang.Object[] args,
java.lang.Object instantiatedInstance)
Executed after the constructor passing the args and the instantiated instance |
java.lang.Object |
afterInvoke(java.lang.Object object,
java.lang.String methodName,
java.lang.Object[] arguments,
java.lang.Object result)
This code is executed after the method is optionally called. |
java.lang.Object |
beforeConstructor(java.lang.Object[] args,
InvocationCallback callback)
Executed before the real constructor. |
java.lang.Object |
beforeGet(java.lang.Object object,
java.lang.String property,
InvocationCallback callback)
Intercepts a getXXX call and returns a result. |
java.lang.Object |
beforeInvoke(java.lang.Object target,
java.lang.String methodName,
java.lang.Object[] arguments,
InvocationCallback callback)
This code is executed before the method is optionally called. |
void |
beforeSet(java.lang.Object object,
java.lang.String property,
java.lang.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(java.lang.Class theClass, boolean inRegistry) throws java.beans.IntrospectionException
java.beans.IntrospectionException
public AbstractDynamicMethodsInterceptor(java.lang.Class theClass) throws java.beans.IntrospectionException
java.beans.IntrospectionException
Method Detail |
---|
public java.lang.Object afterConstructor(java.lang.Object[] args, java.lang.Object instantiatedInstance)
ConstructorInterceptor
afterConstructor
in interface ConstructorInterceptor
args
- The argumentsinstantiatedInstance
- The instantiated instance
public java.lang.Object beforeConstructor(java.lang.Object[] args, InvocationCallback callback)
ConstructorInterceptor
beforeConstructor
in interface ConstructorInterceptor
args
- The constructor argscallback
- The callback object
public java.lang.Object beforeInvoke(java.lang.Object target, java.lang.String methodName, java.lang.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 java.lang.Object afterInvoke(java.lang.Object object, java.lang.String methodName, java.lang.Object[] arguments, java.lang.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 java.lang.Object beforeGet(java.lang.Object object, java.lang.String property, InvocationCallback callback)
PropertyAccessInterceptor
beforeGet
in interface PropertyAccessInterceptor
object
- The target objectproperty
- The property to getcallback
- The callback object
public void beforeSet(java.lang.Object object, java.lang.String property, java.lang.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 |