// Path: src+/部分aopalliance分析/MethodInterceptor.java
// public interface MethodInterceptor extends Interceptor { 
//       
//     /** 
//      * Implement this method to perform extra treatments before and 
//      * after the invocation. Polite implementations would certainly 
//      * like to invoke {@link Joinpoint#proceed()}. 
//      * 
//      * @param invocation the method invocation joinpoint 
//      * @return the result of the call to {@link 
//      * Joinpoint#proceed()}, might be intercepted by the 
//      * interceptor. 
//      * 
//      * @throws Throwable if the interceptors or the 
//      * target-object throws an exception.  */
//     Object invoke(MethodInvocation invocation) throws Throwable; 
// } 


import org.aopalliance.intercept.MethodInterceptor;
package com.ysj.tinySpring.aop;


/**
 * AdvisedSupport封装了TargetSource, MethodInterceptor和MethodMatcher
 *
 */
public class AdvisedSupport {

	// 要拦截的对象
	private TargetSource targetSource;
		
	/**
	 * 方法拦截器
     * Spring的AOP只支持方法级别的调用，所以其实在AopProxy里，我们只需要将MethodInterceptor放入对象的方法调用
	 */
    private MethodInterceptor methodInterceptor;
    
    // 方法匹配器，判断是否是需要拦截的方法
    private MethodMatcher methodMatcher;
    
    
    
    public TargetSource getTargetSource() {
        return targetSource;
    }

    public void setTargetSource(TargetSource targetSource) {
        this.targetSource = targetSource;
    }

    public MethodInterceptor getMethodInterceptor() {
        return methodInterceptor;
    }

// Path: src+/部分aopalliance分析/MethodInterceptor.java
// public interface MethodInterceptor extends Interceptor { 
//       
//     /** 
//      * Implement this method to perform extra treatments before and 
//      * after the invocation. Polite implementations would certainly 
//      * like to invoke {@link Joinpoint#proceed()}. 
//      * 
//      * @param invocation the method invocation joinpoint 
//      * @return the result of the call to {@link 
//      * Joinpoint#proceed()}, might be intercepted by the 
//      * interceptor. 
//      * 
//      * @throws Throwable if the interceptors or the 
//      * target-object throws an exception.  */
//     Object invoke(MethodInvocation invocation) throws Throwable; 
// } 


// Path: src+/main/java/com/ysj/tinySpring/aop/AdvisedSupport.java
import org.aopalliance.intercept.MethodInterceptor;

package com.ysj.tinySpring.aop;


/**
 * AdvisedSupport封装了TargetSource, MethodInterceptor和MethodMatcher
 *
 */
public class AdvisedSupport {

	// 要拦截的对象
	private TargetSource targetSource;
		
	/**
	 * 方法拦截器
     * Spring的AOP只支持方法级别的调用，所以其实在AopProxy里，我们只需要将MethodInterceptor放入对象的方法调用
	 */
    private MethodInterceptor methodInterceptor;
    
    // 方法匹配器，判断是否是需要拦截的方法
    private MethodMatcher methodMatcher;
    
    
    
    public TargetSource getTargetSource() {
        return targetSource;
    }

    public void setTargetSource(TargetSource targetSource) {
        this.targetSource = targetSource;
    }

    public MethodInterceptor getMethodInterceptor() {
        return methodInterceptor;
    }

    public void setMethodInterceptor(MethodInterceptor methodInterceptor) {