Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active January 20, 2016 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/c40bb3691592e7bf8183 to your computer and use it in GitHub Desktop.
Save abhirockzz/c40bb3691592e7bf8183 to your computer and use it in GitHub Desktop.
A JAX-RS ParamConverterProvider [ source of ParamConverter(s) ]
@Provider
public class MyParamConverterProvider implements ParamConverterProvider{
@Override
public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations) {
if(rawType.equals(MyObject.class)){
return (ParamConverter<T>) new MyParamConverter();
}
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment