package cactusServer.utils; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import javax.ws.rs.ext.ParamConverter; import javax.ws.rs.ext.ParamConverterProvider; import cactusServer.entities.StageModel; public class MyParamConverterProvider implements ParamConverterProvider { @Override public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations) { // return (ParamConverter<T>) new MyParamConverter(rawType); if (rawType.equals(StageModel.class)) { return (ParamConverter<T>) new MyParamConverter(); } return null; } }