org.apache.commons.beanutils

## Interface Converter

- All Known Subinterfaces:
    LocaleConverter
  All Known Implementing Classes:
    AbstractArrayConverter, AbstractConverter, ArrayConverter, BaseLocaleConverter, BigDecimalConverter, BigDecimalLocaleConverter, BigIntegerConverter, BigIntegerLocaleConverter, BooleanArrayConverter, BooleanConverter, ByteArrayConverter, ByteConverter, ByteLocaleConverter, CalendarConverter, CharacterArrayConverter, CharacterConverter, ClassConverter, ConverterFacade, DateConverter, DateLocaleConverter, DateTimeConverter, DecimalLocaleConverter, DoubleArrayConverter, DoubleConverter, DoubleLocaleConverter, FileConverter, FloatArrayConverter, FloatConverter, FloatLocaleConverter, IntegerArrayConverter, IntegerConverter, IntegerLocaleConverter, LongArrayConverter, LongConverter, LongLocaleConverter, NumberConverter, ShortArrayConverter, ShortConverter, ShortLocaleConverter, SqlDateConverter, SqlDateLocaleConverter, SqlTimeConverter, SqlTimeLocaleConverter, SqlTimestampConverter, SqlTimestampLocaleConverter, StringArrayConverter, StringConverter, StringLocaleConverter, URLConverter

      public interface Converter

  General purpose data type converter that can be registered and used within the BeanUtils package to manage the conversion of objects from one type to another.

  Converter subclasses bundled with the BeanUtils library are required to be thread-safe, as users of the library may call conversion methods from more than one thread simultaneously.

  Custom converter subclasses created by users of the library can be non-thread-safe if the application using them is single-threaded. However it is recommended that they be written in a thread-safe manner anyway.

  Since:
    1.3
  Version:
    $Id$

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `convert(Class<T> type, Object value)` Convert the specified input object into an output object of the specified type.

- - ### Method Detail

    - #### convert

          <T> T convert(Class<T> type,
                        Object value)

      Convert the specified input object into an output object of the specified type.
      Type Parameters:
        `T` - the desired result type
      Parameters:
        `type` - Data type to which this value should be converted
        `value` - The input value to be converted
      Returns:
        The converted value
      Throws:
        `ConversionException` - if conversion cannot be performed successfully

Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.