Newer
Older
CactusServer / src / main / java / cactusServer / utils / MyParamConverterProvider.java
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 javax.ws.rs.ext.Provider;

import cactusServer.entities.StageModel;

@Provider
public class MyParamConverterProvider implements ParamConverterProvider {
	@Override
	public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations) {
		if (rawType != null && !rawType.equals(String.class)) {
			return (ParamConverter<T>) new MyParamConverter(rawType);
		}
		return null;
	}
}