Package com.khs.sherpa.servlet

Examples of com.khs.sherpa.servlet.RequestMapper


     
    }
  }
 
  private Object[] getParams(Method method) {
    RequestMapper map = new RequestMapper();
    map.setApplicationContext(applicationContext);
    map.setRequest(request);
    map.setResponse(response);
    map.setRequestProcessor(requestProcessor);
    Class<?>[] types = method.getParameterTypes();
    Object[] params = null;
    // get parameters
    if(types.length > 0) {
      params = new Object[types.length];
    }
   
    Annotation[][] parameters = method.getParameterAnnotations();
    for(int i=0; i<parameters.length; i++) {
      Class<?> type = types[i];
      Annotation annotation = null;
      if(parameters[i].length > 0 ) {
        for(Annotation an: parameters[i]) {
          if(an.annotationType().isAssignableFrom(Param.class)) {
            annotation = an;
            break;
          }
        }
       
      }
      params[i] = map.map(method.getClass().getName(),method.getName(),type, annotation)
    }
    return params;
  }
View Full Code Here

TOP

Related Classes of com.khs.sherpa.servlet.RequestMapper

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.