DefaultConversionService (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.core.convert.support

## Class DefaultConversionService

- java.lang.Object
- - org.springframework.core.convert.support.GenericConversionService
  - - org.springframework.core.convert.support.DefaultConversionService

- All Implemented Interfaces:
    ConversionService, ConverterRegistry, ConfigurableConversionService

      public class DefaultConversionService
      extends GenericConversionService

  A specialization of `GenericConversionService` configured by default with converters appropriate for most environments.

  Designed for direct instantiation but also exposes the static `addDefaultConverters(ConverterRegistry)` utility method for ad hoc use against any `ConverterRegistry` instance.

  Since:
    3.1
  Author:
    Chris Beams

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultConversionService()` Create a new `DefaultConversionService` with the set of default converters.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addDefaultConverters(ConverterRegistry converterRegistry)` Add converters appropriate for most environments.

    - ### Methods inherited from class org.springframework.core.convert.support.GenericConversionService

      `addConverter, addConverter, addConverter, addConverterFactory, canBypassConvert, canConvert, canConvert, convert, convert, convert, convertNullSource, getConverter, getDefaultConverter, removeConvertible, toString`

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

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

- - ### Constructor Detail

    - #### DefaultConversionService

          public DefaultConversionService()

      Create a new `DefaultConversionService` with the set of default converters.

  - ### Method Detail

    - #### addDefaultConverters

          public static void addDefaultConverters(ConverterRegistry converterRegistry)

      Add converters appropriate for most environments.
      Parameters:
        `converterRegistry` - the registry of converters to add to (must also be castable to ConversionService)
      Throws:
        `ClassCastException` - if the converterRegistry could not be cast to a ConversionService