Package org.picocontainer.converters
Class BuiltInConverters
java.lang.Object
org.picocontainer.converters.BuiltInConverters
- All Implemented Interfaces:
Serializable,Converters
Provides some built-in converters used by
. It
supports by default primitive types (and boxed equivalents) and for
invalid reference
DefaultPicoContainer
File and URL types. Built-in converters can be changed by
extending the class and overriding the method addBuiltInConverters().- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidaddConverter(Converter<?> converter, Class<?> key) booleancanConvert(Type type) Returns true if a converters is available to convert to the given object typeConverts a particular string value into the target type
-
Constructor Details
-
BuiltInConverters
public BuiltInConverters()
-
-
Method Details
-
addBuiltInConverters
protected void addBuiltInConverters() -
addConverter
-
canConvert
Description copied from interface:ConvertersReturns true if a converters is available to convert to the given object type- Specified by:
canConvertin interfaceConverters- Parameters:
type- the object Type to convert to- Returns:
- true if the type can be converted to
-
convert
Description copied from interface:ConvertersConverts a particular string value into the target type- Specified by:
convertin interfaceConverters- Parameters:
paramValue- the String value to converttype- the object Type to convert to- Returns:
- The converted Object instance
-