Package com.firefly.mvc.web.support

Examples of com.firefly.mvc.web.support.ControllerMetaInfo


 
  @Test
  public void testResource() throws NoSuchMethodException, SecurityException {
    IndexController controller = new IndexController();
    Resource resource = new Resource("utf-8");
    ControllerMetaInfo cm = new ControllerMetaInfo(controller,
        IndexController.class.getMethod("index4", HttpServletRequest.class, HttpServletResponse.class));
   
    resource.add("/user/id-?-?", cm);
    resource.add("/user/id-?-?/?", cm);
    resource.add("/user/add", cm);
View Full Code Here


        List<Method> list = beanDefinition.getReqMethods();
        if (list != null) {
          for (Method m : list) {
            m.setAccessible(true);
            final String uri = m.getAnnotation(RequestMapping.class).value();
            ControllerMetaInfo c = new ControllerMetaInfo(beanDefinition.getInjectedInstance(), m);
            resource.add(uri, c);
          }
        }
      } else if (beanDef instanceof InterceptorBeanDefinition) {
        InterceptorBeanDefinition beanDefinition = (InterceptorBeanDefinition) beanDef;
View Full Code Here

     * @param request
     * @param response
     * @return
     */
    private Object[] getParams(HttpServletRequest request, HttpServletResponse response) {
      ControllerMetaInfo info = this.getController();
      byte[] methodParam = info.getMethodParam();
      ParamMetaInfo[] paramMetaInfos = info.getParamMetaInfos();
      Object[] p = new Object[methodParam.length];

      for (int i = 0; i < p.length; i++) {
        switch (methodParam[i]) {
        case MethodParam.REQUEST:
View Full Code Here

TOP

Related Classes of com.firefly.mvc.web.support.ControllerMetaInfo

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.