Package ru.yandex.strictweb.ajaxtools.annotation

Examples of ru.yandex.strictweb.ajaxtools.annotation.Arguments


    return p;
  }
 
 
  Object[] getParams(JsonRePresentation rep, Method method, HttpServletRequest request) throws Exception {
    Arguments arguments = method.getAnnotation(Arguments.class);
    if(arguments==null) throw new MethodNotArgumentized(method);
   
    Class<?>[] parameterTypes = method.getParameterTypes();
   
    int nParams = parameterTypes.length;
View Full Code Here


            break;
        }
       
        if(method == null) throw new RuntimeException("Unknown method " + methodName);
       
        Arguments arguments = method.getAnnotation(Arguments.class);
       
        if(null == arguments) throw new RuntimeException("Method is not visible for ajax call");
       
        if(false && arguments.checkReferer()) {
            String ref = request.getHeader("Referer");
            if(ref == null) throw new RuntimeException("Invalid referer");
           
            ref = ref.replaceFirst("http://", "").replaceFirst("[\\:/].*$", "");
           
View Full Code Here

  }
 
  @Test
  public void doTest() throws Exception {
    for(Method method: this.getClass().getDeclaredMethods()) {
      Arguments nc = method.getAnnotation(Arguments.class);
      if(nc != null) {
        JsonRePresentation rep = new JsonRePresentation(entityFinder).reset(new StringReader(nc.description()));
       
        Class<?>[] parameterTypes = method.getParameterTypes();
        Type[] genericParameterTypes = method.getGenericParameterTypes();

        Object[] params = new Object[parameterTypes.length];
View Full Code Here

TOP

Related Classes of ru.yandex.strictweb.ajaxtools.annotation.Arguments

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.