Interface ContextualFactory<T>

  • Type Parameters:
    T - the type of objects handled by Converters built by this factory
    All Known Implementing Classes:
    DefaultConverters.DateContextualFactory, DefaultConverters.PropertyConverterFactory

    public interface ContextualFactory<T>
    Beta feature
    Create method signature and BeanProperty might change in the future. Allows to create a converter for some type T based on bean property available at compile time (ex: you can not use it with map keys because they exist only at runtime). This feature works only for POJO databinding, in could be improved implying some refactoring.
    Author:
    Eugen Cepoi
    • Method Detail

      • create

        Converter<T> create​(BeanProperty property,
                            Genson genson)
        Return an instance of a converter working with objects of type T based on property argument or null.