Interface MappersConfig

All Superinterfaces:
Prototype.Api, Prototype.Factory<Mappers>
All Known Implementing Classes:
MappersConfig.BuilderBase.MappersConfigImpl

public interface MappersConfig extends Prototype.Api
Mappers configuration.

All mappers registered within this type (through its builder) are ordered by their weight, regardless of order of configuration on builder.

See Also:
  • Method Details

    • builder

      static MappersConfig.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static MappersConfig.Builder builder(MappersConfig instance)
      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static MappersConfig create()
      Create a new instance with default values.
      Returns:
      a new instance
    • mapperProviders

      List<MapperProvider> mapperProviders()
      Mapper providers allow for introduction of new mappers into the system. A mapper provider can be exposed either as a ServiceRegistry service, or a ServiceLoader, but never both.

      Mapper providers are ordered by their Weight.

      Returns:
      a list of configured mapper providers
    • mappers

      List<Mapper<?,?>> mappers()
      Mappers discovered through ServiceRegistry, or explicitly created that implement both Mapper.sourceType() and Mapper.targetType() methods.

      Mappers are ordered by Weight together with MappersConfigBlueprint.mapperProviders() to create a single list.

      Returns:
      list of mappers
    • useBuiltInMappers

      boolean useBuiltInMappers()
      Whether to use built-in mappers. Defaults to true.
      Returns:
      whether to use built in mappers (such as String to Integer)