Package net.paoding.rose.web.annotation

Examples of net.paoding.rose.web.annotation.IfParamExists


     *
     * @return
     */
    private ParamExistenceChecker[] compileParamExistenceChecker() {

        IfParamExists ifParamExists = method.getAnnotation(IfParamExists.class);
        //没标注IfParamExists或者标注了IfParamExists("")都认为不作检查
        if (ifParamExists == null || ifParamExists.value().trim().length() == 0) {
            return new ParamExistenceChecker[] {};
        }

        List<ParamExistenceChecker> checkers = new ArrayList<ParamExistenceChecker>(); //所有判断条件的列表
        String value = ifParamExists.value();

        //可以写多个判断条件,以这样的形式: type&subtype=value&anothername=value2
        String[] terms = StringUtils.split(value, "&");
        Assert.isTrue(terms.length >= 1); //这个应该永远成立

View Full Code Here

TOP

Related Classes of net.paoding.rose.web.annotation.IfParamExists

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.