tigase.kernel

## Class DefaultTypesConverter

- java.lang.Object
- - tigase.kernel.DefaultTypesConverter

- All Implemented Interfaces:
    TypesConverter

      @Bean(name="defaultTypesConverter",
            active=true)
      public class DefaultTypesConverter
      extends Object
      implements TypesConverter

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface tigase.kernel.TypesConverter

      `TypesConverter.Parcelable`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultTypesConverter()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `convert(Object value, Class<T> expectedType)` Converts value to expected type.
    `<T> T` | `convert(Object value, Class<T> expectedType, Type genericType)`
    `<T> T` | `convert(Object value, Type type)`
    `protected <T> T` | `customConversion(Object value, Class<T> expectedType, Type genericType)`
    `static String` | `escape(String input)`
    `String` | `toString(Object value)` Converts object to String.
    `static String` | `unescape(String input)`

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

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

- - ### Constructor Detail

    - #### DefaultTypesConverter

          public DefaultTypesConverter()

  - ### Method Detail

    - #### escape

          public static String escape(String input)

    - #### unescape

          public static String unescape(String input)

    - #### convert

          public <T> T convert(Object value,
                               Class<T> expectedType)

      Converts value to expected type.
      Specified by:
        `convert` in interface `TypesConverter`
      Type Parameters:
        `T` - expected type.
      Parameters:
        `value` - value to be converted.
        `expectedType` - class of expected type.
      Returns:
        converted value.

    - #### convert

          public <T> T convert(Object value,
                               Type type)

    - #### convert

          public <T> T convert(Object value,
                               Class<T> expectedType,
                               Type genericType)

      Specified by:
        `convert` in interface `TypesConverter`

    - #### customConversion

          protected <T> T customConversion(Object value,
                                           Class<T> expectedType,
                                           Type genericType)

    - #### toString

          public String toString(Object value)

      Converts object to String.
      Specified by:
        `toString` in interface `TypesConverter`
      Parameters:
        `value` - object to convert.
      Returns:
        text representation of value.

Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.