Interface UriConverterRegistry
- All Known Implementing Classes:
UriConverterRegistryImpl
public interface UriConverterRegistry
A registry of all
UriConverters-
Method Summary
Modifier and TypeMethodDescriptionvoidaddConverter(Class<? extends NiceUri> sourceClass, Class<? extends NiceUri> targetClass, UriConverter uriConverter) <S extends NiceUri, T extends NiceUri>
UriConverter<S, T> findConverter(Class<S> sourceClass, Class<T> targetClass) Find anUriConverterfor two types ofNiceUri.voidremoveConverter(Class<? extends NiceUri> sourceClass, Class<? extends NiceUri> targetClass, UriConverter uriConverter)
-
Method Details
-
findConverter
<S extends NiceUri, T extends NiceUri> UriConverter<S,T> findConverter(Class<S> sourceClass, Class<T> targetClass) Find anUriConverterfor two types ofNiceUri.- Type Parameters:
S- The type of the source class.T- The type of the target class.- Parameters:
sourceClass- The source class of the converter.targetClass- The target class of the converter.- Returns:
- an
UriConverterfor the two types. - Throws:
IllegalArgumentException- if no converter was found for the URI classes.
-
addConverter
void addConverter(Class<? extends NiceUri> sourceClass, Class<? extends NiceUri> targetClass, UriConverter uriConverter) -
removeConverter
void removeConverter(Class<? extends NiceUri> sourceClass, Class<? extends NiceUri> targetClass, UriConverter uriConverter)
-