Interface Converter<T>

Type Parameters:
T - the target Java type this converter handles
All Superinterfaces:
ConverterFunction<T>
All Known Subinterfaces:
SqlConverter<T>
All Known Implementing Classes:
AbstractNumberConverter, AbstractStringParsingConverter, BigDecimalConverter, BigIntegerConverter, BooleanConverter, ByteArrayConverter, ByteConverter, CharacterConverter, DoubleConverter, FloatConverter, GenericConverter, GenericSqlConverter, IntegerConverter, LongConverter, ShortConverter, SqlDateConverter, SqlTimeConverter, SqlTimestampConverter, StringConverter

public interface Converter<T> extends ConverterFunction<T>
Represents a converter for a specific Java type.

A Converter is responsible for translating an arbitrary object to the target type T. It also provides information about the target type it handles.

  • Method Summary

    Modifier and Type
    Method
    Description
    default @Nullable Class<?>
    Returns the primitive counterpart of the target class, if applicable.
    Returns the target Java class this converter handles.

    Methods inherited from interface org.litebridgedb.convert.converter.ConverterFunction

    convert
  • Method Details

    • type

      Class<?> type()
      Returns the target Java class this converter handles.
      Returns:
      the target Java class
    • primitiveType

      default @Nullable Class<?> primitiveType()
      Returns the primitive counterpart of the target class, if applicable.
      Returns:
      the primitive type, or null if there is no primitive counterpart