Package mfinder.annotation

Examples of mfinder.annotation.Interceptor


     * @param obj 方法所在的对象。
     *
     * @return Interceptor代理对象。
     */
    private InterceptorProxy createInterceptorProxy(Method method, Object obj) {
        Interceptor interceptor = method.getAnnotation(Interceptor.class);
        Class[] params = method.getParameterTypes();

        //check interceptor invoke args
        boolean requireAction = false;
        //interceptor代理的方法无参数或参数仅为ActionInvocation或其子类
        if (params.length == 0) {
            requireAction = false;
        } //未指定actionInvocationClass参数类型时允许ActionInvocation任意子类;否则为actionInvocationClass的父类
        else if (isProxyMethod(params)) {
            requireAction = true;
        } else {
            throw new IllegalArgumentException("Illegal arguments in Interceptor : " + method);
        }
        return new InterceptorProxy(interceptor.name().trim(), method, obj, requireAction);
    }
View Full Code Here

TOP

Related Classes of mfinder.annotation.Interceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.