You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Registers a Converter for a Class. If {@code converter} is null registration is cleared for {@code clazz}, and no converter will be used in processing.
251
-
*
252
-
* @param <T> The Class parameter type.
253
-
* @param clazz the Class to register the Converter for.
254
-
* @param converter The Converter to associate with Class. May be null.
255
-
* @since 1.7.0
241
+
* Map of Class to Converter.
242
+
* <p>
243
+
* The Class type parameter matches the Converter's first generic type.
* Unregisters a Converter for a Class. If {@code converter} is null registration is cleared for {@code clazz}, and no converter will be used in processing.
266
+
* Gets the registered converter for the the Class, or {@link Converter#DEFAULT} if absent.
277
267
*
278
-
* @param clazz the Class to unregister.
268
+
* @param <T> The Class parameter type.
269
+
* @param clazz The Class to get the Converter for.
270
+
* @return the registered converter if any, {@link Converter#DEFAULT} otherwise.
279
271
* @since 1.7.0
280
272
*/
281
-
publicstaticvoidunregister(finalClass<?> clazz) {
282
-
converterMap.remove(clazz);
273
+
@SuppressWarnings("unchecked") // returned value will have type T because it is fixed by clazz
274
+
public <T> Converter<T, ?> getConverter(finalClass<T> clazz) {
0 commit comments