net.sf.doolin.bus.cglib
Class BeanMethodInterceptor<T>

java.lang.Object
  extended by net.sf.doolin.bus.cglib.BeanMethodInterceptor<T>
All Implemented Interfaces:
net.sf.cglib.proxy.Callback, net.sf.cglib.proxy.MethodInterceptor

public final class BeanMethodInterceptor<T>
extends Object
implements net.sf.cglib.proxy.MethodInterceptor


Constructor Summary
BeanMethodInterceptor(T instance)
           
 
Method Summary
protected  Object call(Object instance, Method method, Object[] args)
           
static String getNameFromMethod(String methodName, String prefix)
           
static String getPropertyGetter(Method method, Object[] args)
           
static String getPropertyName(Property propertyAnnotation, Method method, String... prefixes)
           
static String getPropertySetter(Method method, Object[] args)
           
 AtomicReference<BeanNotificationSupport> getSupport()
           
 Object intercept(Object obj, Method method, Object[] args, net.sf.cglib.proxy.MethodProxy proxy)
           
protected  Object notify(String propertyName, Method method, Object[] args)
           
protected  Object proxy(Object parentProxy, String propertyName, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanMethodInterceptor

public BeanMethodInterceptor(T instance)
Method Detail

getNameFromMethod

public static String getNameFromMethod(String methodName,
                                       String prefix)

getPropertyGetter

public static String getPropertyGetter(Method method,
                                       Object[] args)

getPropertyName

public static String getPropertyName(Property propertyAnnotation,
                                     Method method,
                                     String... prefixes)

getPropertySetter

public static String getPropertySetter(Method method,
                                       Object[] args)

call

protected Object call(Object instance,
                      Method method,
                      Object[] args)
               throws Throwable
Throws:
Throwable

getSupport

public AtomicReference<BeanNotificationSupport> getSupport()

intercept

public Object intercept(Object obj,
                        Method method,
                        Object[] args,
                        net.sf.cglib.proxy.MethodProxy proxy)
                 throws Throwable
Specified by:
intercept in interface net.sf.cglib.proxy.MethodInterceptor
Throws:
Throwable

notify

protected Object notify(String propertyName,
                        Method method,
                        Object[] args)
                 throws IllegalArgumentException,
                        IllegalAccessException,
                        InvocationTargetException
Throws:
IllegalArgumentException
IllegalAccessException
InvocationTargetException

proxy

protected Object proxy(Object parentProxy,
                       String propertyName,
                       Method method,
                       Object[] args)
                throws IllegalArgumentException,
                       IllegalAccessException,
                       InvocationTargetException
Throws:
IllegalArgumentException
IllegalAccessException
InvocationTargetException


Copyright © 2011. All Rights Reserved.