Package juzu.impl.plugin.controller.descriptor

Examples of juzu.impl.plugin.controller.descriptor.ControllersDescriptor


    Class<?> appClass = compiler.assertClass("plugin.controller.resolver.default_controller.Application");
    Class<?> aClass = compiler.assertClass("plugin.controller.resolver.default_controller.A");

    //
    ApplicationDescriptor desc = ApplicationDescriptor.create(appClass);
    ControllersDescriptor controllerDesc = new ControllersDescriptor(desc);
    ControllerResolver<ControllerHandler> resolver = controllerDesc.getResolver();
    ControllerHandler handler = resolver.resolve(Phase.VIEW, Collections.<String>emptySet());
    assertEquals("index", handler.getName());
    assertSame(aClass, handler.getMethod().getDeclaringClass());
  }
View Full Code Here


    CompilerAssert<?, ?> compiler = compiler("plugin.controller.resolver.overload");
    compiler.assertCompile();
    Class<?> appClass = compiler.assertClass("plugin.controller.resolver.overload.Application");
    Class<?> aClass = compiler.assertClass("plugin.controller.resolver.overload.A");
    ApplicationDescriptor desc = ApplicationDescriptor.create(appClass);
    ControllersDescriptor controllerDesc = new ControllersDescriptor(desc);
    ControllerResolver<ControllerHandler> resolver = controllerDesc.getResolver();

    //
    ControllerHandler handler = resolver.resolveMethod(Phase.VIEW, "A.m", Tools.<String>set());
    assertEquals("m", handler.getName());
    assertEquals(Tools.<String>set(), handler.getParameterNames());
View Full Code Here

    //
    Class<?> aClass = compiler.assertClass("plugin.controller.resolver.method.A");
    Class<?> clazz = compiler.assertClass("plugin.controller.resolver.method.Application");
    ApplicationDescriptor desc = ApplicationDescriptor.create(clazz);
    ControllersDescriptor controllerDesc = new ControllersDescriptor(desc);
    ControllerResolver<ControllerHandler> resolver = controllerDesc.getResolver();
    ControllerHandler cm1_ = controllerDesc.getHandler(aClass, "noArg");
    ControllerHandler cm2_ = controllerDesc.getHandler(aClass, "fooArg", String.class);

    //
    ControllerHandler cm1 = resolver.resolveMethod(Phase.VIEW, cm1_.getId(), cm1_.getParameterNames());
    assertNotNull(cm1);
    assertEquals("noArg", cm1.getName());
View Full Code Here

    compiler.assertCompile();
    Class<?> appClass = compiler.assertClass("plugin.controller.resolver.default_controller.Application");
    Class<?> aClass = compiler.assertClass("plugin.controller.resolver.default_controller.A");
    Class<?> bClass = compiler.assertClass("plugin.controller.resolver.default_controller.B");
    ApplicationDescriptor desc = ApplicationDescriptor.create(appClass);
    ControllersDescriptor controllerDesc = new ControllersDescriptor(desc);
    ControllerResolver<ControllerHandler> resolver = controllerDesc.getResolver();

    //
    ControllerHandler handler = resolver.resolve((String)null, "index", Collections.<String>emptySet());
    assertEquals("index", handler.getName());
    assertSame(handler.getType(), aClass);
View Full Code Here

    CompilerAssert<?, ?> compiler = compiler("plugin.controller.resolver.method");
    compiler.assertCompile();
    Class<?> appClass = compiler.assertClass("plugin.controller.resolver.method.Application");
    Class<?> aClass = compiler.assertClass("plugin.controller.resolver.method.A");
    ApplicationDescriptor desc = ApplicationDescriptor.create(appClass);
    ControllersDescriptor controllerDesc = new ControllersDescriptor(desc);
    ControllerResolver<ControllerHandler> resolver = controllerDesc.getResolver();

    //
    ControllerHandler handler = resolver.resolve((String)null, "noArg", Collections.<String>emptySet());
    assertEquals("noArg", handler.getName());
    assertSame(handler.getType(), aClass);
View Full Code Here

TOP

Related Classes of juzu.impl.plugin.controller.descriptor.ControllersDescriptor

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.