码迷,mamicode.com
首页 > 其他好文 > 详细

JdkDynamicAopProxy-笔记

时间:2018-01-08 01:03:18      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:gate   objects   config   rom   dynamic   ace   app   auth   for   

这个接口的继承体系图:

技术分享图片

 

InvocationHandler就不说了,看看AopProxy的源码。

/**
 * Delegate interface for a configured AOP proxy, allowing for the creation
 * of actual proxy objects.
 *
 * <p>Out-of-the-box implementations are available for JDK dynamic proxies
 * and for CGLIB proxies, as applied by {@link DefaultAopProxyFactory}.
 *
 * @author Rod Johnson
 * @author Juergen Hoeller
 * @see DefaultAopProxyFactory
 */
public interface AopProxy {

    /**创建一个代理对象。(为目标对象创建一个代理对象。)
     * Create a new proxy object.
     * <p>Uses the AopProxy‘s default class loader (if necessary for proxy creation):
     * usually, the thread context class loader.
     * @return the new proxy object (never {@code null})
     * @see Thread#getContextClassLoader()
     */
    Object getProxy();

    /**重载方法。上面的无参方法会调用这个重载方法。
     * Create a new proxy object.
     * <p>Uses the given class loader (if necessary for proxy creation).
     * {@code null} will simply be passed down and thus lead to the low-level
     * proxy facility‘s default, which is usually different from the default chosen
     * by the AopProxy implementation‘s {@link #getProxy()} method.
     * @param classLoader the class loader to create the proxy with
     * (or {@code null} for the low-level proxy facility‘s default)
     * @return the new proxy object (never {@code null})
     */
    Object getProxy(ClassLoader classLoader);

}

 

JdkDynamicAopProxy-笔记

标签:gate   objects   config   rom   dynamic   ace   app   auth   for   

原文地址:https://www.cnblogs.com/GooPolaris/p/8232814.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!