org.apache.cayenne.reflect

## Class Converter<T>

- java.lang.Object
- - org.apache.cayenne.reflect.Converter<T>

- Direct Known Subclasses:
    ToAnyConverter

      public abstract class Converter<T>
      extends Object

  A helper class to do property type conversions.
  Since:
    1.2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Converter()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract T` | `convert(Object value, Class<T> type)` Converts object to supported class without doing any type checking.

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

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

- - ### Constructor Detail

    - #### Converter

          public Converter()

  - ### Method Detail

    - #### convert

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

      Converts object to supported class without doing any type checking.
      Parameters:
        `value` - the object to convert; the source
        `type` - the Class to convert the value to; the destination type
      Returns:
        an object of type @code{type}. If the conversion fails an exception will be thrown. If value is null then the result will be null.

Copyright © 2001–2018 Apache Cayenne. All rights reserved.