Skip to content

Generalize ConvertService + Converter #109

Open
@hinerm

Description

@hinerm

The ancestors of these classes evolved to have API for handling Type and Class separately. This is unnecessary.. we should unify this API by focusing on Type and special-casing Class.

This will simplify things and reduce the number of signatures.

Furthermore the API of <T> convert(Object, Class<T>) is really a holdover from the old uber-conversion mindset. What we should have is:

  • A single high-priority (right after NullConverter) castingConverter that handles casting. This implies that low-level converters do not cast, but provide their specific output type.
  • Refactor API so converters just implement O convert(I)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions