package com.airlock.iam.common.application;

import jakarta.annotation.Nullable;
import jakarta.ws.rs.ext.ParamConverter;
import jakarta.ws.rs.ext.ParamConverterProvider;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;

abstract class AbstractUserParamConverterProvider implements ParamConverterProvider {
   @Nullable
   public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations) {
      return rawType.equals(UserParam.class) ? this.getUserParamConverter() : null;
   }

   protected abstract UserParamConverter getUserParamConverter();
}
