Package com.norconex.commons.lang.bean

# Class BeanMapper.BeanMapperBuilder

java.lang.Object
com.norconex.commons.lang.bean.BeanMapper.BeanMapperBuilder

Enclosing class:
  `BeanMapper`

public static class BeanMapper.BeanMapperBuilder extends Object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BeanMapper`
  `build()`
  `BeanMapper.BeanMapperBuilder`
  `canonicalNameSupportDisabled(boolean canonicalNameSupportDisabled)`
  Whether to disable resolving of fully qualified class names in source when reading.
  `BeanMapper.BeanMapperBuilder`
  `classLoader(ClassLoader classLoader)`
  The class loader to use to load classes.
  `BeanMapper.BeanMapperBuilder`
  `clearDefaultPolymorphicTypes()`
  `BeanMapper.BeanMapperBuilder`
  `clearIgnoredProperties()`
  `BeanMapper.BeanMapperBuilder`
  `clearPolymorphicTypeImpls()`
  `BeanMapper.BeanMapperBuilder`
  `clearPolymorphicTypes()`
  `BeanMapper.BeanMapperBuilder`
  `clearUnboundPropertyMappings()`
  `BeanMapper.BeanMapperBuilder`
  `configurableDetectionDisabled(boolean configurableDetectionDisabled)`
  Whether to disable detecting `Configurable` classes, which when `false` (i.e., enabled), will automatically mark the configuration class as `@valid` and ignore the configurable class properties when writing/reading.
  `BeanMapper.BeanMapperBuilder`
  `defaultPolymorphicType(Class<?> defaultPolymorphicTypeKey, Class<?> defaultPolymorphicTypeValue)`
  `BeanMapper.BeanMapperBuilder`
  `defaultPolymorphicTypes(Map<? extends Class<?>,? extends Class<?>> defaultPolymorphicTypes)`
  `BeanMapper.BeanMapperBuilder`
  `flowMapperConfig(@NonNull FlowMapperConfig flowMapperConfig)`
  Optionally setup support for using flow/conditions in your your source.
  `BeanMapper.BeanMapperBuilder`
  `ignoredProperties(Collection<? extends String> ignoredProperties)`
  `BeanMapper.BeanMapperBuilder`
  `ignoredProperty(String ignoredProperty)`
  `BeanMapper.BeanMapperBuilder`
  `ignoreUnknownProperties(boolean ignoreUnknownProperties)`
  Whether to silently ignored unknown mapped properties when reading.
  `BeanMapper.BeanMapperBuilder`
  `indent(boolean indent)`
  Whether to indent elements when writing.
  `BeanMapper.BeanMapperBuilder`
  `mapperBuilderCustomizer(Consumer<com.fasterxml.jackson.databind.cfg.MapperBuilder<?,?>> mapperBuilderCustomizer)`
  Consumes the internal Jackson `MapperBuilder` for custom initialization.
  `BeanMapper.BeanMapperBuilder`
  `polymorphicServiceLoaderDisabled(boolean polymorphicServiceLoaderDisabled)`
  Whether to disable detecting polymorphic types and their subtypes using Java Service Loader (SPI) mechanism.
  `BeanMapper.BeanMapperBuilder`
  `polymorphicType(Class<?> polymorphicTypeKey, Predicate<String> polymorphicTypeValue)`
  `BeanMapper.BeanMapperBuilder`
  `polymorphicTypeImpl(Class<?> polymorphicTypeImplKey, List<Class<?>> polymorphicTypeImplValue)`
  `BeanMapper.BeanMapperBuilder`
  `polymorphicTypeImpls(Map<? extends Class<?>,? extends List<Class<?>>> polymorphicTypeImpls)`
  `BeanMapper.BeanMapperBuilder`
  `polymorphicTypes(Map<? extends Class<?>,? extends Predicate<String>> polymorphicTypes)`
  `BeanMapper.BeanMapperBuilder`
  `skipValidation(boolean skipValidation)`
  Whether to skip validation when reading.
  `String`
  `toString()`
  `BeanMapper.BeanMapperBuilder`
  `treatEmptyAsNull(boolean treatEmptyAsNull)`
  Whether to treat empty strings as `null` when reading.
  `BeanMapper.BeanMapperBuilder`
  `unboundPropertyMapping(String unboundPropertyMappingKey, Class<?> unboundPropertyMappingValue)`
  `BeanMapper.BeanMapperBuilder`
  `unboundPropertyMappings(Map<? extends String,? extends Class<?>> unboundPropertyMappings)`

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

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

- ## Method Details

  - ### ignoreUnknownProperties

    public BeanMapper.BeanMapperBuilder ignoreUnknownProperties(boolean ignoreUnknownProperties)
    Whether to silently ignored unknown mapped properties when reading.
    Returns:
      `this`.

  - ### treatEmptyAsNull

    public BeanMapper.BeanMapperBuilder treatEmptyAsNull(boolean treatEmptyAsNull)
    Whether to treat empty strings as `null` when reading.
    Returns:
      `this`.

  - ### canonicalNameSupportDisabled

    public BeanMapper.BeanMapperBuilder canonicalNameSupportDisabled(boolean canonicalNameSupportDisabled)
    Whether to disable resolving of fully qualified class names in source when reading.
    Returns:
      `this`.

  - ### configurableDetectionDisabled

    public BeanMapper.BeanMapperBuilder configurableDetectionDisabled(boolean configurableDetectionDisabled)
    Whether to disable detecting `Configurable` classes, which when `false` (i.e., enabled), will automatically mark the configuration class as `@valid` and ignore the configurable class properties when writing/reading.
    Returns:
      `this`.

  - ### polymorphicServiceLoaderDisabled

    public BeanMapper.BeanMapperBuilder polymorphicServiceLoaderDisabled(boolean polymorphicServiceLoaderDisabled)
    Whether to disable detecting polymorphic types and their subtypes using Java Service Loader (SPI) mechanism.
    Returns:
      `this`.
    See Also:
      - `PolymorphicTypeProvider`

  - ### skipValidation

    public BeanMapper.BeanMapperBuilder skipValidation(boolean skipValidation)
    Whether to skip validation when reading.
    Returns:
      `this`.

  - ### indent

    public BeanMapper.BeanMapperBuilder indent(boolean indent)
    Whether to indent elements when writing.
    Returns:
      `this`.

  - ### classLoader

    public BeanMapper.BeanMapperBuilder classLoader(ClassLoader classLoader)
    The class loader to use to load classes. Defaults to this class class loader.
    Returns:
      `this`.

  - ### mapperBuilderCustomizer

    public BeanMapper.BeanMapperBuilder mapperBuilderCustomizer(Consumer<com.fasterxml.jackson.databind.cfg.MapperBuilder<?,?>> mapperBuilderCustomizer)
    Consumes the internal Jackson `MapperBuilder` for custom initialization.
    Returns:
      `this`.

  - ### polymorphicType

    public BeanMapper.BeanMapperBuilder polymorphicType(Class<?> polymorphicTypeKey, Predicate<String> polymorphicTypeValue)

  - ### polymorphicTypes

    public BeanMapper.BeanMapperBuilder polymorphicTypes(Map<? extends Class<?>,? extends Predicate<String>> polymorphicTypes)

  - ### clearPolymorphicTypes

    public BeanMapper.BeanMapperBuilder clearPolymorphicTypes()

  - ### unboundPropertyMapping

    public BeanMapper.BeanMapperBuilder unboundPropertyMapping(String unboundPropertyMappingKey, Class<?> unboundPropertyMappingValue)

  - ### unboundPropertyMappings

    public BeanMapper.BeanMapperBuilder unboundPropertyMappings(Map<? extends String,? extends Class<?>> unboundPropertyMappings)

  - ### clearUnboundPropertyMappings

    public BeanMapper.BeanMapperBuilder clearUnboundPropertyMappings()

  - ### defaultPolymorphicType

    public BeanMapper.BeanMapperBuilder defaultPolymorphicType(Class<?> defaultPolymorphicTypeKey, Class<?> defaultPolymorphicTypeValue)

  - ### defaultPolymorphicTypes

    public BeanMapper.BeanMapperBuilder defaultPolymorphicTypes(Map<? extends Class<?>,? extends Class<?>> defaultPolymorphicTypes)

  - ### clearDefaultPolymorphicTypes

    public BeanMapper.BeanMapperBuilder clearDefaultPolymorphicTypes()

  - ### polymorphicTypeImpl

    public BeanMapper.BeanMapperBuilder polymorphicTypeImpl(Class<?> polymorphicTypeImplKey, List<Class<?>> polymorphicTypeImplValue)

  - ### polymorphicTypeImpls

    public BeanMapper.BeanMapperBuilder polymorphicTypeImpls(Map<? extends Class<?>,? extends List<Class<?>>> polymorphicTypeImpls)

  - ### clearPolymorphicTypeImpls

    public BeanMapper.BeanMapperBuilder clearPolymorphicTypeImpls()

  - ### flowMapperConfig

    public BeanMapper.BeanMapperBuilder flowMapperConfig(@NonNull @NonNull FlowMapperConfig flowMapperConfig)
    Optionally setup support for using flow/conditions in your your source.
    Returns:
      `this`.

  - ### ignoredProperty

    public BeanMapper.BeanMapperBuilder ignoredProperty(String ignoredProperty)

  - ### ignoredProperties

    public BeanMapper.BeanMapperBuilder ignoredProperties(Collection<? extends String> ignoredProperties)

  - ### clearIgnoredProperties

    public BeanMapper.BeanMapperBuilder clearIgnoredProperties()

  - ### build

    public BeanMapper build()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`