org.apache.commons.beanutils

## Class ConvertUtilsBean2

- java.lang.Object
- - org.apache.commons.beanutils.ConvertUtilsBean
  - - org.apache.commons.beanutils.ConvertUtilsBean2

-     public class ConvertUtilsBean2
      extends ConvertUtilsBean

  `ConvertUtilsBean` implementation that delegates `convert()` methods to the new `ConvertUtilsBean.convert(Object, Class)` method.

  To configure this implementation for the current context ClassLoader invoke `BeanUtilsBean.setInstance(new BeanUtilsBean2());`

  Since:
    1.8.0
  Version:
    $Id$
  See Also:
    `BeanUtilsBean2`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConvertUtilsBean2()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `convert(Object value)` Delegates to the new `ConvertUtilsBean.convert(Object, Class)` method.
    `Object` | `convert(String[] value, Class<?> clazz)` Delegates to the new `ConvertUtilsBean.convert(Object, Class)` method.
    `Object` | `convert(String value, Class<?> clazz)` Delegates to the new `ConvertUtilsBean.convert(Object, Class)` method.

    - ### Methods inherited from class org.apache.commons.beanutils.ConvertUtilsBean

      `convert, deregister, deregister, getDefaultBoolean, getDefaultByte, getDefaultCharacter, getDefaultDouble, getDefaultFloat, getDefaultInteger, getDefaultLong, getDefaultShort, getInstance, lookup, lookup, register, register, setDefaultBoolean, setDefaultByte, setDefaultCharacter, setDefaultDouble, setDefaultFloat, setDefaultInteger, setDefaultLong, setDefaultShort`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConvertUtilsBean2

          public ConvertUtilsBean2()

  - ### Method Detail

    - #### convert

          public String convert(Object value)

      Delegates to the new `ConvertUtilsBean.convert(Object, Class)` method.
      Overrides:
        `convert` in class `ConvertUtilsBean`
      Parameters:
        `value` - Value to be converted (may be null)
      Returns:
        The converted String value or null if value is null
      See Also:
        `ConvertUtilsBean.convert(String[], Class)`

    - #### convert

          public Object convert(String value,
                                Class<?> clazz)

      Delegates to the new `ConvertUtilsBean.convert(Object, Class)` method.
      Overrides:
        `convert` in class `ConvertUtilsBean`
      Parameters:
        `value` - Value to be converted (may be null)
        `clazz` - Java class to be converted to (must not be null)
      Returns:
        The converted value or null if value is null
      See Also:
        `ConvertUtilsBean.convert(String[], Class)`

    - #### convert

          public Object convert(String[] value,
                                Class<?> clazz)

      Delegates to the new `ConvertUtilsBean.convert(Object, Class)` method.
      Overrides:
        `convert` in class `ConvertUtilsBean`
      Parameters:
        `value` - Array of values to be converted
        `clazz` - Java array or element class to be converted to (must not be null)
      Returns:
        The converted value
      See Also:
        `ConvertUtilsBean.convert(String[], Class)`

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