Package one.nio.http.gen

Examples of one.nio.http.gen.RequestHandlerGenerator


        ArrayList<Class> supers = new ArrayList<Class>(4);
        for (Class cls = router.getClass(); cls != Object.class; cls = cls.getSuperclass()) {
            supers.add(cls);
        }

        RequestHandlerGenerator generator = new RequestHandlerGenerator();
        for (int i = supers.size(); --i >= 0; ) {
            for (Method m : supers.get(i).getMethods()) {
                Path annotation = m.getAnnotation(Path.class);
                if (annotation != null) {
                    RequestHandler requestHandler = generator.generateFor(m, router);
                    for (String path : annotation.value()) {
                        requestHandlers.put(path, requestHandler);
                    }
                }
            }
View Full Code Here

TOP

Related Classes of one.nio.http.gen.RequestHandlerGenerator

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.