|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2009 the original author or authors. |
|
|
|
* Copyright 2002-2016 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
@ -27,18 +27,19 @@ public interface ConverterRegistry { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Add a plain converter to this registry. |
|
|
|
* Add a plain converter to this registry. |
|
|
|
* The convertible sourceType/targetType pair is derived from the Converter's parameterized types. |
|
|
|
* The convertible source/target type pair is derived from the Converter's parameterized types. |
|
|
|
* @throws IllegalArgumentException if the parameterized types could not be resolved |
|
|
|
* @throws IllegalArgumentException if the parameterized types could not be resolved |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void addConverter(Converter<?, ?> converter); |
|
|
|
void addConverter(Converter<?, ?> converter); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Add a plain converter to this registry. |
|
|
|
* Add a plain converter to this registry. |
|
|
|
* The convertible sourceType/targetType pair is specified explicitly. |
|
|
|
* The convertible source/target type pair is specified explicitly. |
|
|
|
* Allows for a Converter to be reused for multiple distinct pairs without having to create a Converter class for each pair. |
|
|
|
* <p>Allows for a Converter to be reused for multiple distinct pairs without |
|
|
|
|
|
|
|
* having to create a Converter class for each pair. |
|
|
|
* @since 3.1 |
|
|
|
* @since 3.1 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void addConverter(Class<?> sourceType, Class<?> targetType, Converter<?, ?> converter); |
|
|
|
<S, T> void addConverter(Class<S> sourceType, Class<T> targetType, Converter<? super S, ? extends T> converter); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Add a generic converter to this registry. |
|
|
|
* Add a generic converter to this registry. |
|
|
@ -47,7 +48,7 @@ public interface ConverterRegistry { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Add a ranged converter factory to this registry. |
|
|
|
* Add a ranged converter factory to this registry. |
|
|
|
* The convertible sourceType/rangeType pair is derived from the ConverterFactory's parameterized types. |
|
|
|
* The convertible source/target type pair is derived from the ConverterFactory's parameterized types. |
|
|
|
* @throws IllegalArgumentException if the parameterized types could not be resolved. |
|
|
|
* @throws IllegalArgumentException if the parameterized types could not be resolved. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void addConverterFactory(ConverterFactory<?, ?> converterFactory); |
|
|
|
void addConverterFactory(ConverterFactory<?, ?> converterFactory); |
|
|
|