Class

io.scalaland.chimney.dsl

TransformerInto

Related Doc: package dsl

Permalink

final class TransformerInto[From, To, C <: TransformerCfg] extends AnyRef

Provides DSL for configuring io.scalaland.chimney.Transformer's generation and using the result to transform value at the same time

From

type of input value

To

type of output value

C

type-level encoded config

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TransformerInto
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TransformerInto(source: From, td: TransformerDefinition[From, To, C])

    Permalink

    source

    object to transform

    td

    transformer definition

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. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. def disableDefaultValues: TransformerInto[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.

    returns

    io.scalaland.chimney.dsl.TransformerInto

    See also

    https://scalalandio.github.io/chimney/#Defaultoptionvalues for more details

  7. def enableBeanGetters: TransformerInto[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.

    returns

    io.scalaland.chimney.dsl.TransformerInto

    See also

    https://scalalandio.github.io/chimney/#ReadingfromJavabeans for more details

  8. def enableBeanSetters: TransformerInto[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.

    returns

    io.scalaland.chimney.dsl.TransformerInto

    See also

    https://scalalandio.github.io/chimney/#WritingtoJavabeans for more details

  9. def enableOptionDefaultsToNone: TransformerInto[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.

    returns

    io.scalaland.chimney.dsl.TransformerInto

    See also

    https://scalalandio.github.io/chimney/#Defaultoptionvalues for more details

  10. def enableUnsafeOption: TransformerInto[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.

    returns

    io.scalaland.chimney.dsl.TransformerInto

    See also

    https://scalalandio.github.io/chimney/#Unsafeoption for more details

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

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

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

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

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

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

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

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

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

    Permalink

    object to transform

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

    Permalink
    Definition Classes
    AnyRef
  21. val td: TransformerDefinition[From, To, C]

    Permalink

    transformer definition

  22. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  23. macro def transform: To

    Permalink

    Apply configured transformation in-place

    Apply configured transformation in-place

    returns

    transformed value

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

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

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

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

    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 will 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 will fail.

    f

    function to calculate values of components that cannot be mapped automatically

    returns

    io.scalaland.chimney.dsl.TransformerInto

    See also

    https://scalalandio.github.io/chimney/#Coproductssupport for more details

  28. macro def withFieldComputed[T, U](selector: (To) ⇒ T, map: (From) ⇒ U): TransformerInto[From, To, _]

    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 to use to compute value of the target field

    returns

    io.scalaland.chimney.dsl.TransformerInto

    See also

    https://scalalandio.github.io/chimney/#Providingmissingvalues for more details

  29. macro def withFieldConst[T, U](selector: (To) ⇒ T, value: U): TransformerInto[From, To, _]

    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.

    returns

    io.scalaland.chimney.dsl.TransformerInto

    See also

    https://scalalandio.github.io/chimney/#Providingmissingvalues for more details

  30. macro def withFieldRenamed[T, U](selectorFrom: (From) ⇒ T, selectorTo: (To) ⇒ U): TransformerInto[From, To, _]

    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.TransformerInto

    See also

    https://scalalandio.github.io/chimney/#Fieldre-labelling 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 AnyRef

Inherited from Any

Ungrouped