public class BuiltInConverters extends Object implements Converters, Serializable
DefaultPicoContainer
. It
supports by default primitive types (and boxed equivalents) and for
File
and URL
types. Built-in converters can be changed by
extending the class and overriding the method addBuiltInConverters()
.Constructor and Description |
---|
BuiltInConverters() |
Modifier and Type | Method and Description |
---|---|
protected void |
addBuiltInConverters() |
protected void |
addConverter(Converter<?> converter,
Class<?> key) |
boolean |
canConvert(Type type)
Returns true if a converters is available to convert to the given object type
|
Object |
convert(String paramValue,
Type type)
Converts a particular string value into the target type
|
public BuiltInConverters()
protected void addBuiltInConverters()
protected void addConverter(Converter<?> converter, Class<?> key)
public boolean canConvert(Type type)
Converters
canConvert
in interface Converters
type
- the object Type to convert topublic Object convert(String paramValue, Type type)
Converters
convert
in interface Converters
paramValue
- the String value to converttype
- the object Type to convert toCopyright © 2003–2016 Codehaus. All rights reserved.