public class ConverterLocator extends Object implements IConverterLocator
IConverterLocator
interface, which locates converters for a given type.
It serves as a registry for IConverter
instances stored by type, and is the default
locator for Wicket.IConverterLocator
,
Serialized FormConstructor and Description |
---|
ConverterLocator()
Constructor
|
Modifier and Type | Method and Description |
---|---|
<C> IConverter<C> |
get(Class<C> c)
Gets the type converter that is registered for class c.
|
<C> IConverter<C> |
getConverter(Class<C> type)
Converts the given value to class c.
|
IConverter<?> |
remove(Class<?> c)
Removes the type converter currently registered for class c.
|
IConverter<?> |
set(Class<?> c,
IConverter<?> converter)
Registers a converter for use with class c.
|
public final <C> IConverter<C> get(Class<C> c)
C
- The object to convert from and to Stringc
- The class to get the type converter forpublic final <C> IConverter<C> getConverter(Class<C> type)
getConverter
in interface IConverterLocator
C
- The object to convert from and to Stringtype
- Class to get the converter for.IConverter.convertToObject(String, java.util.Locale)
public final IConverter<?> remove(Class<?> c)
c
- The class for which the converter registration should be removedpublic final IConverter<?> set(Class<?> c, IConverter<?> converter)
converter
- The converter to addc
- The class for which the converter should be usedCopyright © 2006–2014 Apache Software Foundation. All rights reserved.