Package com.apitrary.api.annotation

Examples of com.apitrary.api.annotation.Body


  public static <T> String getRequestPayload(Request<T> request) {
    Class<?> referenceClazz = request.getClass();
    List<Field> fields = ClassUtil.getAnnotatedFields(referenceClazz, Body.class);
    List<String> objects = new LinkedList<String>();
    for (Field field : fields) {
      Body body = field.getAnnotation(Body.class);

      String asString = ClassUtil.getValueOf(field, request, referenceClazz, String.class);
      return (asString != null ? asString : "");
      // what if there are more bodies?!
    }
View Full Code Here


  public static <T> String getRequestPayload(Request<T> request) {
    Class<?> referenceClazz = request.getClass();
    List<Field> fields = ClassUtil.getAnnotatedFields(referenceClazz, Body.class);
    List<String> objects = new LinkedList<String>();
    for (Field field : fields) {
      Body body = field.getAnnotation(Body.class);

      String asString = ClassUtil.getValueOf(field, request, referenceClazz, String.class);
      return (asString != null ? asString : "");
      // what if there are more bodies?!
    }
View Full Code Here

TOP

Related Classes of com.apitrary.api.annotation.Body

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.