@Test public void testOnlyPathParam() { Annotation[] annotations = new Annotation[]{pathAnnotation}; assertNotNull(converterProvider .getConverter(BigInteger.class, null, annotations)); }
@Override public <T> ParamConverter<T> getConverter(final Class<T> clazz, final Type type, final Annotation[] annotations) { if (!clazz.getName().equals(BigInteger.class.getName())) { return null; } for (Annotation a : Arrays.asList(annotations)) { if (a instanceof PathParam) { return new BigIntConverter<>(NotFoundException::new); } if (a instanceof QueryParam) { return new BigIntConverter<>(MalformedIdException::new); } if (a instanceof FormParam) { return new BigIntConverter<>(MalformedIdException::new); } } return null; }
Base16BigIntegerConverterProvider implements ParamConverterProvider { @Override public <T> ParamConverter<T> getConverter(final Class<T> clazz, final Type type, final Annotation[] annotations) { if (!clazz.getName().equals(BigInteger.class.getName())) { return null; } for (Annotation a : Arrays.asList(annotations)) { if (a instanceof PathParam) { return new BigIntConverter<>(NotFoundException::new); } if (a instanceof QueryParam) { return new BigIntConverter<>(MalformedIdException::new); } if (a instanceof FormParam) { return new BigIntConverter<>(MalformedIdException::new); } } return null; } }
Base16BigIntegerConverterProvider implements ParamConverterProvider { @Override public <T> ParamConverter<T> getConverter(final Class<T> clazz, final Type type, final Annotation[] annotations) { if (!clazz.getName().equals(BigInteger.class.getName())) { return null; } for (Annotation a : Arrays.asList(annotations)) { if (a instanceof PathParam) { return new BigIntConverter<>(NotFoundException::new); } if (a instanceof QueryParam) { return new BigIntConverter<>(MalformedIdException::new); } if (a instanceof FormParam) { return new BigIntConverter<>(MalformedIdException::new); } } return null; }  }
Base16BigIntegerConverterProvider implements ParamConverterProvider { @Override public <T> ParamConverter<T> getConverter(final Class<T> clazz, final Type type, final Annotation[] annotations) { if (!clazz.getName().equals(BigInteger.class.getName())) { return null; } for (Annotation a : Arrays.asList(annotations)) { if (a instanceof PathParam) { return new BigIntConverter<>(NotFoundException::new); } if (a instanceof QueryParam) { return new BigIntConverter<>(MalformedIdException::new); } if (a instanceof FormParam) { return new BigIntConverter<>(MalformedIdException::new); } } return null; }  @Override ParamConverter<T> getConverter(final Class<T> clazz,
                                              final Type type,
                                              final Annotation[] annotations); }
Base16BigIntegerConverterProvider implements ParamConverterProvider { @Override public <T> ParamConverter<T> getConverter(final Class<T> clazz, final Type type, final Annotation[] annotations) { if (!clazz.getName().equals(BigInteger.class.getName())) { return null; } for (Annotation a : Arrays.asList(annotations)) { if (a instanceof PathParam) { return new BigIntConverter<>(NotFoundException::new); } if (a instanceof QueryParam) { return new BigIntConverter<>(MalformedIdException::new); } if (a instanceof FormParam) { return new BigIntConverter<>(MalformedIdException::new); } } return null; }  @Override ParamConverter<T> getConverter(final Class<T> clazz,
                                              final Type type,
                                              final Annotation[] annotations);  }