Package com.jetdrone.vertx.yoke.annotations

Examples of com.jetdrone.vertx.yoke.annotations.RegExParam


        if (Modifier.isStatic(field.getModifiers())) {
            staticField = true;
        }

        RegExParam regExParam = Processor.getAnnotation(field, RegExParam.class);

        if (Processor.isCompatible(field, RegExParam.class, Pattern.class)) {
            try {
                router.param(regExParam.value(), (Pattern) field.get(staticField ? null : instance));
            } catch (IllegalAccessException e) {
                throw new RuntimeException(e);
            }
        }

        if (Processor.isCompatible(field, RegExParam.class, String.class)) {
            try {
                router.param(regExParam.value(), Pattern.compile((String) field.get(staticField ? null : instance)));
            } catch (IllegalAccessException e) {
                throw new RuntimeException(e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.jetdrone.vertx.yoke.annotations.RegExParam

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.