Class

io.scalaland.chimney.dsl

TransformerFInto

Related Doc: package dsl

Permalink

final class TransformerFInto[F[+_], From, To, C <: TransformerCfg] extends ConfigDsl[[C1]TransformerFInto[F, From, To, C1], C]

Linear Supertypes
ConfigDsl[[C1]TransformerFInto[F, From, To, C1], C], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TransformerFInto
  2. ConfigDsl
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TransformerFInto(source: From, td: TransformerFDefinition[F, From, To, C])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def __refineTransformerDefinition[C1 <: TransformerCfg](f: (TransformerFDefinition[F, From, To, C]) ⇒ TransformerFDefinition[F, From, To, C1]): TransformerFInto[F, From, To, C1]

    Permalink

    Used internally by macro.

    Used internally by macro. Please don't use in your code.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  7. def disableDefaultValues: TransformerFInto[F, From, To, DisableDefaultValues[C]]

    Permalink

    Fail derivation if From type is missing field even if To has default value for it.

    Fail derivation if From type is missing field even if To has default value for it.

    By default in such case derivation will fallback to default values.

    Definition Classes
    ConfigDsl
    See also

    https://scalalandio.github.io/chimney/transformers/default-values.html#disabling-default-values-in-generated-transformer for more details

  8. def enableBeanGetters: TransformerFInto[F, From, To, EnableBeanGetters[C]]

    Permalink

    Enable Java Beans naming convention (.getName, .isName) on From.

    Enable Java Beans naming convention (.getName, .isName) on From.

    By default only Scala conversions (.name) are allowed.

    Definition Classes
    ConfigDsl
    See also

    https://scalalandio.github.io/chimney/transformers/java-beans.html#reading-from-java-beans for more details

  9. def enableBeanSetters: TransformerFInto[F, From, To, EnableBeanSetters[C]]

    Permalink

    Enable Java Beans naming convention (.setName(value)) on To.

    Enable Java Beans naming convention (.setName(value)) on To.

    By default only Scala conversions (.copy(name = value)) are allowed.

    Definition Classes
    ConfigDsl
    See also

    https://scalalandio.github.io/chimney/transformers/java-beans.html#writing-to-java-beans for more details

  10. def enableMethodAccessors: TransformerFInto[F, From, To, EnableMethodAccessors[C]]

    Permalink

    Enable values to be supplied from method calls.

    Enable values to be supplied from method calls. Source method must be public and have no parameter list.

    By default this is disabled because method calls may perform side effects (e.g. mutations)

    Definition Classes
    ConfigDsl
    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#using-method-accessors for more details

  11. def enableOptionDefaultsToNone: TransformerFInto[F, From, To, EnableOptionDefaultsToNone[C]]

    Permalink

    Sets target value of optional field to None if field is missing from source type From.

    Sets target value of optional field to None if field is missing from source type From.

    By default in such case compilation fails.

    Definition Classes
    ConfigDsl
    See also

    https://scalalandio.github.io/chimney/transformers/default-values.html#default-values-for-option-fields for more details

  12. def enableUnsafeOption: TransformerFInto[F, From, To, EnableUnsafeOption[C]]

    Permalink

    Enable unsafe call to .get when source type From contains field of type Option[A], but target type To defines this fields as A.

    Enable unsafe call to .get when source type From contains field of type Option[A], but target type To defines this fields as A.

    It's unsafe as code generated this way may throw at runtime.

    By default in such case compilation fails.

    Definition Classes
    ConfigDsl
    See also

    https://scalalandio.github.io/chimney/transformers/unsafe-options.html for more details

  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  21. val source: From

    Permalink
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. val td: TransformerFDefinition[F, From, To, C]

    Permalink
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. macro def transform(implicit tfs: TransformerFSupport[F]): F[To]

    Permalink

    Apply configured wrapped transformation in-place.

    Apply configured wrapped transformation in-place.

    It runs macro that tries to derive instance of TransformerF[F, From, To] and immediately apply it to captured source value.

    It requires io.scalaland.chimney.TransformerFSupport instance for F to be available in implicit scope of invocation of this method.

    When transformation can't be derived, it results with compilation error.

    returns

    transformed value of type F[To]

  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. macro def withCoproductInstance[Inst](f: (Inst) ⇒ To): TransformerInto[From, To, _ <: TransformerCfg]

    Permalink

    Use f to calculate the (missing) coproduct instance when mapping one coproduct into another.

    Use f to calculate the (missing) coproduct instance when mapping one coproduct into another.

    By default if mapping one coproduct in From into another coproduct in To derivation expects that coproducts to have matching names of its components, and for every component in To field's type there is matching component in From type. If some component is missing it fails compilation unless provided replacement with this operation.

    f

    function to calculate values of components that cannot be mapped automatically

    returns

    io.scalaland.chimney.dsl.TransformerFInto

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#transforming-coproducts for more details

  30. macro def withCoproductInstanceF[Inst](f: (Inst) ⇒ F[To]): TransformerFInto[F, From, To, _ <: TransformerCfg]

    Permalink

    Use f to calculate the (missing) wrapped coproduct instance when mapping one coproduct into another

    Use f to calculate the (missing) wrapped coproduct instance when mapping one coproduct into another

    By default if mapping one coproduct in From into another coproduct in To derivation expects that coproducts to have matching names of its components, and for every component in To field's type there is matching component in From type. If some component is missing it fails compilation unless provided replacement with this operation.

    f

    function to calculate values of components that cannot be mapped automatically

    returns

    io.scalaland.chimney.dsl.TransformerFInto

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#transforming-coproducts for more details

  31. macro def withFieldComputed[T, U](selector: (To) ⇒ T, map: (From) ⇒ U): TransformerFInto[F, From, To, _ <: TransformerCfg]

    Permalink

    Use map provided here to compute value of field picked using selector.

    Use map provided here to compute value of field picked using selector.

    By default if From is missing field picked by selector compilation fails.

    selector

    target field in To, defined like _.name

    map

    function used to compute value of the target field

    returns

    io.scalaland.chimney.dsl.TransformerFInto

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#providing-missing-values for more details

  32. macro def withFieldComputedF[T, U](selector: (To) ⇒ T, map: (From) ⇒ F[U]): TransformerFInto[F, From, To, _ <: TransformerCfg]

    Permalink

    Use map provided here to compute wrapped value of field picked using selector.

    Use map provided here to compute wrapped value of field picked using selector.

    By default if From is missing field picked by selector compilation fails.

    selector

    target field in To, defined like _.name

    map

    function used to compute value of the target field

    returns

    io.scalaland.chimney.dsl.TransformerFInto

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#providing-missing-values for more details

  33. macro def withFieldConst[T, U](selector: (To) ⇒ T, value: U): TransformerFInto[F, From, To, _ <: TransformerCfg]

    Permalink

    Use value provided here for field picked using selector.

    Use value provided here for field picked using selector.

    By default if From is missing field picked by selector compilation fails.

    selector

    target field in To, defined like _.name

    value

    constant value to use for the target field

    returns

    io.scalaland.chimney.dsl.TransformerFInto

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#providing-missing-values for more details

  34. macro def withFieldConstF[T, U](selector: (To) ⇒ T, value: F[U]): TransformerFInto[F, From, To, _ <: TransformerCfg]

    Permalink

    Use wrapped value provided here for field picked using selector.

    Use wrapped value provided here for field picked using selector.

    By default if From is missing field picked by selector compilation fails.

    selector

    target field in To, defined like _.name

    value

    constant value to use for the target field

    returns

    io.scalaland.chimney.dsl.TransformerFInto

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#providing-missing-values for more details

  35. macro def withFieldRenamed[T, U](selectorFrom: (From) ⇒ T, selectorTo: (To) ⇒ U): TransformerFInto[F, From, To, _ <: TransformerCfg]

    Permalink

    Use selectorFrom field in From to obtain the value of selectorTo field in To

    Use selectorFrom field in From to obtain the value of selectorTo field in To

    By default if From is missing field picked by selectorTo compilation fails.

    selectorFrom

    source field in From, defined like _.originalName

    selectorTo

    target field in To, defined like _.newName

    returns

    io.scalaland.chimney.dsl.TransformerFInto

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#fields-renaming for more details

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from ConfigDsl[[C1]TransformerFInto[F, From, To, C1], C]

Inherited from AnyRef

Inherited from Any

Ungrouped