예제 #1
0
파일: ApiProvider.java 프로젝트: avgx/Pr0
 @Override
 public Converter<?> get(Type type) {
   if (type == ResponseBody.class || type == RequestBody.class) {
     return null;
   } else {
     return factory.get(type);
   }
 }
예제 #2
0
  @Override
  public Converter<ResponseBody, ?> fromResponseBody(Type type, Annotation[] annotations) {
    super.fromResponseBody(type, annotations);

    // if same as class type return as class, otherwise, return as list
    if (_type == type) {
      return new JacksonJrResponseConverter<T>(_jr, _type);
    }
    return new JacksonJrResponseArrayConverter<T>(_jr, _type);
  }
예제 #3
0
 @Override
 public Converter<?, RequestBody> toRequestBody(Type type, Annotation[] annotations) {
   super.toRequestBody(type, annotations);
   return new JacksonJrRequestBodyConverter<T>(_jr);
 }