Interface UriConverterRegistry
- All Known Implementing Classes:
UriConverterRegistryImpl
public interface UriConverterRegistry
A registry of all
UriConverters
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addConverter
(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 anUriConverter
for two types ofNiceUri
.void
removeConverter
(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 anUriConverter
for 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
UriConverter
for 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)
-