Esempio n. 1
0
 @Override
 public Converter<?> get(Type type) {
   if (type == ResponseBody.class || type == RequestBody.class) {
     return null;
   } else {
     return factory.get(type);
   }
 }
  @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);
  }
 @Override
 public Converter<?, RequestBody> toRequestBody(Type type, Annotation[] annotations) {
   super.toRequestBody(type, annotations);
   return new JacksonJrRequestBodyConverter<T>(_jr);
 }