PartialTransformerInto

io.scalaland.chimney.dsl.PartialTransformerInto
final class PartialTransformerInto[From, To, Overrides <: TransformerOverrides, Flags <: TransformerFlags](val source: From, val td: PartialTransformerDefinition[From, To, Overrides, Flags]) extends WithRuntimeDataStore

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

Type parameters

Flags

type-level encoded flags

From

type of input value

Overrides

type-level encoded config

To

type of output value

Value parameters

source

object to transform

td

transformer definition

Attributes

Since

0.7.0

Graph
Supertypes
trait WithRuntimeDataStore
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def forAll[FromMatch, ToMatch]: PartialTransformerIntoForAll[From, To, Overrides, Flags, FromMatch, ToMatch]

Scope overrides to apply to all derivations matching [FromMatch, ToMatch].

Scope overrides to apply to all derivations matching [FromMatch, ToMatch].

Attributes

Since

1.10.0

inline def transform[ImplicitScopeFlags <: TransformerFlags](using tc: TransformerConfiguration[ImplicitScopeFlags]): Result[To]

Apply configured partial transformation in-place.

Apply configured partial transformation in-place.

It runs macro that tries to derive instance of PartialTransformer[From, To] and immediately apply it to captured source value. When transformation can't be derived, it results with compilation error.

Attributes

Returns

partial transformation result of type partial.Result[To]

Since

0.7.0

inline def transformFailFast[ImplicitScopeFlags <: TransformerFlags](using tc: TransformerConfiguration[ImplicitScopeFlags]): Result[To]

Apply configured partial transformation in-place in a short-circuit (fail fast) mode.

Apply configured partial transformation in-place in a short-circuit (fail fast) mode.

It runs macro that tries to derive instance of PartialTransformer[From, To] and immediately apply it to captured source value. When transformation can't be derived, it results with compilation error.

Attributes

Returns

partial transformation result of type partial.Result[To]

Since

0.7.0

transparent inline def withConstructor[Ctor](inline f: Ctor)(using Of[Ctor, To]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use f instead of the primary constructor to construct the To value.

Use f instead of the primary constructor to construct the To value.

Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

Values for each parameter can be provided the same way as if they were normal constructor's arguments.

Type parameters

Ctor

type of the Eta-expanded method/lambda which should return To

Value parameters

f

method name or lambda which constructs To

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

0.8.4

transparent inline def withConstructorEither[Ctor](inline f: Ctor)(using Of[Ctor, Either[String, To]]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use f instead of the primary constructor to parse into Either[String, To] value.

Use f instead of the primary constructor to parse into Either[String, To] value.

Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

Values for each parameter can be provided the same way as if they were normal constructor's arguments.

Type parameters

Ctor

type of the Eta-expanded method/lambda which should return Either[String, To]

Value parameters

f

method name or lambda which constructs Either[String, To]

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.0.0

transparent inline def withConstructorEitherTo[T, Ctor](inline selector: To => T)(inline f: Ctor)(using Of[Ctor, Either[String, T]]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use f instead of the primary constructor to parse into the Either value extracted from To using the selector.

Use f instead of the primary constructor to parse into the Either value extracted from To using the selector.

Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

Values for each parameter can be provided the same way as if they were normal constructor's arguments.

Type parameters

Ctor

type of the Eta-expanded method/lambda which should return Either[String, T]

T

type of the value which would be constructed with a custom constructor

Value parameters

f

method name or lambda which constructs Either[String, T]

selector

target field in To, defined like _.name

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.6.0

transparent inline def withConstructorPartial[Ctor](inline f: Ctor)(using Of[Ctor, Result[To]]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use f instead of the primary constructor to parse into partial.Result[To] value.

Use f instead of the primary constructor to parse into partial.Result[To] value.

Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

Values for each parameter can be provided the same way as if they were normal constructor's arguments.

Type parameters

Ctor

type of the Eta-expanded method/lambda which should return partial.Result[To]

Value parameters

f

method name or lambda which constructs partial.Result[To]

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

0.8.4

transparent inline def withConstructorPartialFailFast[Ctor](inline f: Ctor)(using Of[Ctor, Boolean => Result[To]]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use f instead of the primary constructor to parse into partial.Result[To] value.

Use f instead of the primary constructor to parse into partial.Result[To] value.

The resulting function receives a Boolean flag indicating whether the transformation is in fail-fast mode.

Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

Values for each parameter can be provided the same way as if they were normal constructor's arguments.

Type parameters

Ctor

type of the Eta-expanded method/lambda which should return Boolean => partial.Result[To]

Value parameters

f

method name or lambda which constructs Boolean => partial.Result[To]

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.10.0

transparent inline def withConstructorPartialTo[T, Ctor](inline selector: To => T)(inline f: Ctor)(using Of[Ctor, Result[T]]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use f instead of the primary constructor to parse into the value extracted from To using the selector.

Use f instead of the primary constructor to parse into the value extracted from To using the selector.

Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

Values for each parameter can be provided the same way as if they were normal constructor's arguments.

Type parameters

Ctor

type of the Eta-expanded method/lambda which should return partial.Result[T]

T

type of the value which would be constructed with a custom constructor

Value parameters

f

method name or lambda which constructs partial.Result[T]

selector

target field in To, defined like _.name

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.6.0

transparent inline def withConstructorPartialToFailFast[T, Ctor](inline selector: To => T)(inline f: Ctor)(using Of[Ctor, Boolean => Result[T]]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use f instead of the primary constructor to parse into the value extracted from To using the selector.

Use f instead of the primary constructor to parse into the value extracted from To using the selector.

The resulting function receives a Boolean flag indicating whether the transformation is in fail-fast mode.

Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

Values for each parameter can be provided the same way as if they were normal constructor's arguments.

Type parameters

Ctor

type of the Eta-expanded method/lambda which should return Boolean => partial.Result[T]

T

type of the value which would be constructed with a custom constructor

Value parameters

f

method name or lambda which constructs Boolean => partial.Result[T]

selector

target field in To, defined like _.name

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.10.0

transparent inline def withConstructorTo[T, Ctor](inline selector: To => T)(inline f: Ctor)(using Of[Ctor, T]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use f instead of the primary constructor to construct the value extracted from To using the selector.

Use f instead of the primary constructor to construct the value extracted from To using the selector.

Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

Values for each parameter can be provided the same way as if they were normal constructor's arguments.

Type parameters

Ctor

type of the Eta-expanded method/lambda which should return T

T

type of the value which would be constructed with a custom constructor

Value parameters

f

method name or lambda which constructs To

selector

target field in To, defined like _.name

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.6.0

transparent inline def withEnumCaseHandled[Subtype](inline f: Subtype => To): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Attributes

Since

1.0.0

transparent inline def withEnumCaseHandledPartial[Subtype](inline f: Subtype => Result[To]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Attributes

Since

1.0.0

transparent inline def withEnumCaseHandledPartialFailFast[Subtype](inline f: (Subtype, Boolean) => Result[To]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
transparent inline def withEnumCaseRenamed[FromSubtype, ToSubtype]: PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Attributes

Since

1.2.0

transparent inline def withEnumCaseUnmatched[T](inline selectorTo: To => T): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Attributes

Since

1.7.0

transparent inline def withFallback[FromFallback](inline fallback: FromFallback): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

To use fallback when the source of type From is missing fields.

To use fallback when the source of type From is missing fields.

Fallbacks can be stacked - then they will be tried in the order in which they were added.

Type parameters

FromFallback

type of the fallback value which would be checked for fields when the From value would be missing

Value parameters

fallback

fallback value which would be checked for fields when the From value would be missing

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.7.0

transparent inline def withFallbackFrom[T, FromFallback](inline selectorFrom: From => T)(inline fallback: FromFallback): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

To use fallback when the source of type T, extracted with selectorFrom, is missing fields.

To use fallback when the source of type T, extracted with selectorFrom, is missing fields.

Fallbacks can be stacked - then they will be tried in the order in which they were added.

Type parameters

FromFallback

type of the fallback value which would be checked for fields when the From value would be missing

T

type of the source value that fallback is provided for

Value parameters

fallback

fallback value which would be checked for fields when the From value would be missing

selectorFrom

path to the source value the fallback will be provided for

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.7.0

transparent inline def withFieldComputed[T, U](inline selector: To => T, inline f: From => U)(using U <:< T): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use the function f to compute a value of the field picked using the selector.

Use the function f to compute a value of the field picked using the selector.

By default, if From is missing a field and it's not provided with some selector, the compilation fails.

Type parameters

T

type of target field

U

type of computed value

Value parameters

f

function used to compute value of the target field

selector

target field in To, defined like _.name

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

0.7.0

transparent inline def withFieldComputedFrom[S, T, U](inline selectorFrom: From => S)(inline selectorTo: To => T, inline f: S => U)(using U <:< T): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use the function f to compute a value of the field picked using the selectorTo from a value extracted with selectorFrom as an input.

Use the function f to compute a value of the field picked using the selectorTo from a value extracted with selectorFrom as an input.

By default, if From is missing a field and it's not provided with some selectorTo, the compilation fails.

Type parameters

S
  • type of source field
T

type of target field

U

type of computed value

Value parameters

f

function used to compute value of the target field

selectorFrom

source field in From, defined like _.name

selectorTo

target field in To, defined like _.name

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.6.0

transparent inline def withFieldComputedPartial[T, U](inline selector: To => T, inline f: From => Result[U])(using U <:< T): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use the function f to compute a partial result for the field picked using the selector.

Use the function f to compute a partial result for the field picked using the selector.

By default, if From is missing a field and it's not provided with some selector, the compilation fails.

Type parameters

T

type of target field

U

type of computed value

Value parameters

f

function used to compute value of the target field

selector

target field in To, defined like _.name

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

0.7.0

transparent inline def withFieldComputedPartialFailFast[T, U](inline selector: To => T, inline f: (From, Boolean) => Result[U])(using U <:< T): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use the function f to compute a partial result for the field picked using the selector.

Use the function f to compute a partial result for the field picked using the selector.

The function receives a Boolean flag indicating whether the transformation is in fail-fast mode.

By default, if From is missing a field and it's not provided with some selector, the compilation fails.

Type parameters

T

type of target field

U

type of computed value

Value parameters

f

function used to compute value of the target field

selector

target field in To, defined like _.name

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.10.0

transparent inline def withFieldComputedPartialFrom[S, T, U](inline selectorFrom: From => S)(inline selectorTo: To => T, inline f: S => Result[U])(using U <:< T): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use the function f to compute a partial result of the field picked using the selectorTo from a value extracted with selectorFrom as an input.

Use the function f to compute a partial result of the field picked using the selectorTo from a value extracted with selectorFrom as an input.

By default, if From is missing a field and it's not provided with some selector, the compilation fails.

Type parameters

S
  • type of source field
T

type of target field

U

type of computed value

Value parameters

f

function used to compute value of the target field

selectorFrom

source field in From, defined like _.name

selectorTo

target field in To, defined like _.name

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.6.0

transparent inline def withFieldComputedPartialFromFailFast[S, T, U](inline selectorFrom: From => S)(inline selectorTo: To => T, inline f: (S, Boolean) => Result[U])(using U <:< T): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use the function f to compute a partial result of the field picked using the selectorTo from a value extracted with selectorFrom as an input.

Use the function f to compute a partial result of the field picked using the selectorTo from a value extracted with selectorFrom as an input.

The function receives a Boolean flag indicating whether the transformation is in fail-fast mode.

By default, if From is missing a field and it's not provided with some selector, the compilation fails.

Type parameters

S
  • type of source field
T

type of target field

U

type of computed value

Value parameters

f

function used to compute value of the target field

selectorFrom

source field in From, defined like _.name

selectorTo

target field in To, defined like _.name

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.10.0

transparent inline def withFieldConst[T, U](inline selector: To => T, inline value: U)(using U <:< T): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use provided value for field picked using selector.

Use provided value for field picked using selector.

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

Type parameters

T

type of target field

U

type of provided value

Value parameters

selector

target field in To, defined like _.name

value

constant value to use for the target field

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

0.7.0

transparent inline def withFieldConstPartial[T, U](inline selector: To => T, inline value: Result[U])(using U <:< T): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use provided partial result value for field picked using selector.

Use provided partial result value for field picked using selector.

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

Type parameters

T

type of target field

U

type of provided value

Value parameters

selector

target field in To, defined like _.name

value

constant value to use for the target field

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

0.7.0

transparent inline def withFieldRenamed[T, U](inline selectorFrom: From => T, inline selectorTo: To => U): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

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

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

By default, if From is missing a field and it's not provided with some selectorTo, the compilation fails.

Type parameters

T

type of source field

U

type of target field

Value parameters

selectorFrom

source field in From, defined like _.originalName

selectorTo

target field in To, defined like _.newName

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

0.7.0

transparent inline def withFieldUnused[T](inline selectorFrom: From => T): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Mark field as expected to be unused when it would fail UnusedFieldPolicy by default.

Mark field as expected to be unused when it would fail UnusedFieldPolicy by default.

Type parameters

T

type of source field

Value parameters

selectorFrom

source field in From, defined like _.originalName

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.7.0

transparent inline def withSealedSubtypeHandled[Subtype](inline f: Subtype => To): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use f to calculate the unmatched subtype when mapping one sealed/enum into another.

Use f to calculate the unmatched subtype when mapping one sealed/enum 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.

For convenience/readability withEnumCaseHandled alias can be used (e.g. for Scala 3 enums or Java enums).

It differs from withFieldComputed(_.matching[Subtype], src => ...), since withSealedSubtypeHandled matches on a From subtype, while .matching[Subtype] matches on a To value's piece.

Type parameters

Subtype

type of sealed/enum instance

Value parameters

f

function to calculate values of components that cannot be mapped automatically

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.0.0

transparent inline def withSealedSubtypeHandledPartial[Subtype](inline f: Subtype => Result[To]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use f to calculate the unmatched subtype's partial.Result when mapping one sealed/enum into another.

Use f to calculate the unmatched subtype's partial.Result when mapping one sealed/enum 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.

For convenience/readability withEnumCaseHandledPartial alias can be used (e.g. for Scala 3 enums or Java enums).

It differs from withFieldComputedPartial(_.matching[Subtype], src => ...), since withSealedSubtypeHandled matches on a From subtype, while .matching[Subtype] matches on a To value's piece.

Type parameters

Subtype

type of sealed/enum instance

Value parameters

f

function to calculate values of components that cannot be mapped automatically

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.0.0

transparent inline def withSealedSubtypeHandledPartialFailFast[Subtype](inline f: (Subtype, Boolean) => Result[To]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use f to calculate the unmatched subtype's partial.Result when mapping one sealed/enum into another.

Use f to calculate the unmatched subtype's partial.Result when mapping one sealed/enum into another.

The function receives a Boolean flag indicating whether the transformation is in fail-fast mode.

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.

For convenience/readability withEnumCaseHandledPartialFailFast alias can be used (e.g. for Scala 3 enums or Java enums).

It differs from withFieldComputedPartialFailFast(_.matching[Subtype], (src, failFast) => ...), since withSealedSubtypeHandledPartialFailFast matches on a From subtype, while .matching[Subtype] matches on a To value's piece.

Type parameters

Subtype

type of sealed/enum instance

Value parameters

f

function to calculate values of components that cannot be mapped automatically

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.10.0

transparent inline def withSealedSubtypeRenamed[FromSubtype, ToSubtype]: PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Use the FromSubtype in From as a source for the ToSubtype in To.

Use the FromSubtype in From as a source for the ToSubtype in To.

Type parameters

FromSubtype

type of sealed/enum instance

ToSubtype

type of sealed/enum instance

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerInto

See also
Since

1.2.0

transparent inline def withSealedSubtypeUnmatched[T](inline selectorTo: To => T): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Mark subtype as expected to be unmatched when it would fail UnmatchedSubtypePolicy by default.

Mark subtype as expected to be unmatched when it would fail UnmatchedSubtypePolicy by default.

Type parameters

T

type of subtype

Value parameters

selectorTo

target subtype in To, defined like _.matching[Subtype]

Attributes

Returns

io.scalaland.chimney.dsl.TransformerInto

See also
Since

1.7.0

transparent inline def withSourceFlag[T](inline selectorFrom: From => T): OfPartialTransformerInto[From, To, Overrides, Flags, _ <: Path]

Define a flag only on some source value using the selectorFrom, rather than globally.

Define a flag only on some source value using the selectorFrom, rather than globally.

Type parameters

T

type of the source field

Value parameters

selectorFrom

source field in From, defined like _.name

Attributes

Returns

io.scalaland.chimney.dsl.TransformerSourceFlagsDsl.OfPartialTransformerInto

See also
Since

1.6.0

transparent inline def withTargetFlag[T](inline selectorTo: To => T): OfPartialTransformerInto[From, To, Overrides, Flags, _ <: Path]

Define a flag only on some source value using the selectorTo, rather than globally.

Define a flag only on some source value using the selectorTo, rather than globally.

Type parameters

T

type of the target field

Value parameters

selectorTo

target field in To, defined like _.name

Attributes

Returns

io.scalaland.chimney.dsl.TransformerTargetFlagsDsl.OfPartialTransformerInto

See also
Since

1.6.0

Deprecated methods

transparent inline def withCoproductInstance[Subtype](inline f: Subtype => To): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Attributes

Since

0.1.2

Deprecated
[Since version 1.0.0] Use .withSealedSubtypeHandled or .withEnumCaseHandled for more clarity
transparent inline def withCoproductInstancePartial[Subtype](inline f: Subtype => Result[To]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]

Attributes

Since

0.7.0

Deprecated
[Since version 1.0.0] Use .withSealedSubtypeHandledPartial or .withEnumCaseHandledPartial for more clarity

Inherited methods

def disableBeanGetters: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[BeanGetters, Flags]]

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

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

Attributes

See also
Since

0.6.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableBeanSetters: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[BeanSetters, Flags]]

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

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

Attributes

See also
Since

0.6.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableCollectionFallbackMerge: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[CollectionFallbackMerge[_], Flags]]

Disable merging fallback collection values into the source collection value.

Disable merging fallback collection values into the source collection value.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableCustomFieldNameComparison: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[FieldNameComparison[_], Flags]]

Disable any custom way of comparing if source fields' names and target fields' names are matching.

Disable any custom way of comparing if source fields' names and target fields' names are matching.

Attributes

See also
Since

1.0.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableCustomSubtypeNameComparison: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[SubtypeNameComparison[_], Flags]]

Disable any custom way of comparing if source subtypes' names and target fields' names are matching.

Disable any custom way of comparing if source subtypes' names and target fields' names are matching.

Attributes

See also
Since

1.0.0

Inherited from:
TransformerSourceFlagsDsl (hidden)
def disableDefaultValueOfType[T]: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[DefaultValueOfType[T], Flags]]

Fail derivation if From type is missing field even if To has default value type for fields of T type.

Fail derivation if From type is missing field even if To has default value type for fields of T type.

This flag can be set in parallel to globally enabling default values with disableDefaultValues.

Attributes

See also
Since

1.2.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableDefaultValues: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[DefaultValues, Flags]]

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.

This flag can be set in parallel to enabling default values for specific field type with * disableDefaultValueOfType.

Attributes

See also
Since

0.1.9

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableEitherFallbackMerge: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[EitherFallbackMerge[_], Flags]]

Disable merging fallback Either values into the source Either value.

Disable merging fallback Either values into the source Either value.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableIgnoreUnmatchedBeanSetters: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[BeanSettersIgnoreUnmatched, Flags]]

Disable not failing compilation on unresolved Java Beans naming convention (.setName(value)) in To.

Disable not failing compilation on unresolved Java Beans naming convention (.setName(value)) in To.

Attributes

See also
Since

0.8.3

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableImplicitConflictResolution: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[ImplicitConflictResolution[_], Flags]]

Disable any implicit conflict resolution preference that was set previously.

Disable any implicit conflict resolution preference that was set previously.

Attributes

See also
Since

0.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableImplicitConversions: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[ImplicitConversions, Flags]]

Disable using implicit conversions to transform one From into To.

Disable using implicit conversions to transform one From into To.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableInheritedAccessors: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[InheritedAccessors, Flags]]

Disable inherited accessors lookup that was previously enabled by enableInheritedAccessors

Disable inherited accessors lookup that was previously enabled by enableInheritedAccessors

Attributes

See also
Since

0.8.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableMacrosLogging: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[MacrosLogging, Flags]]

Disable printing the logs from the derivation process.

Disable printing the logs from the derivation process.

Attributes

See also
Since

0.8.0

Inherited from:
TransformerFlagsDsl (hidden)
def disableMethodAccessors: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[MethodAccessors, Flags]]

Disable method accessors lookup that was previously enabled by enableMethodAccessors

Disable method accessors lookup that was previously enabled by enableMethodAccessors

Attributes

See also
Since

0.5.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableNonAnyValWrappers: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[NonAnyValWrappers, Flags]]

Disable unpacking/wrapping with wrapper types (classes with have only 1 val, set in a constructor) even when they are not AnyVals.

Disable unpacking/wrapping with wrapper types (classes with have only 1 val, set in a constructor) even when they are not AnyVals.

Attributes

See also
Since

1.3.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableNonUnitBeanSetters: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[NonUnitBeanSetters, Flags]]

Enable calling unary non-Unit methods with Java Beans naming convention (.setName(value)) in To.

Enable calling unary non-Unit methods with Java Beans naming convention (.setName(value)) in To.

Attributes

See also
Since

1.0.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableOptionDefaultsToNone: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[OptionDefaultsToNone, Flags]]

Disable None fallback value for optional fields in To.

Disable None fallback value for optional fields in To.

Attributes

See also
Since

0.6.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableOptionFallbackMerge: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[OptionFallbackMerge[_], Flags]]

Disable merging fallback Option values into the source Option value.

Disable merging fallback Option values into the source Option value.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disablePartialUnwrapsOption: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[PartialUnwrapsOption, Flags]]

Disable safe Option unwrapping by PartialTransformer - each Option to non-Option` has to be handled manually.

Disable safe Option unwrapping by PartialTransformer - each Option to non-Option` has to be handled manually.

Attributes

See also
Since

1.0.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableTypeConstraintEvidence: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[TypeConstraintEvidence, Flags]]

Disable using scala.Predef.&lt;:&lt; or scala.Predef.=:= to prove that From is a subtype of To.

Disable using scala.Predef.&lt;:&lt; or scala.Predef.=:= to prove that From is a subtype of To.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableUnmatchedSubtypePolicyCheck: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[UnmatchedSubtypePolicyCheck[_], Flags]]

Disable policy check for target subtypes that would not be used anywhere during transformation.

Disable policy check for target subtypes that would not be used anywhere during transformation.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerSourceFlagsDsl (hidden)
def disableUnusedFieldPolicyCheck: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Disable[UnusedFieldPolicyCheck[_], Flags]]

Disable policy check for source fields that would not be used anywhere during transformation.

Disable policy check for source fields that would not be used anywhere during transformation.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableBeanGetters: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[BeanGetters, Flags]]

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.

Attributes

See also
Since

0.2.1

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableBeanSetters: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[BeanSetters, Flags]]

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.

Attributes

See also
Since

0.2.1

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableCollectionFallbackMerge[S <: CollectionFallbackMergeStrategy](strategy: S): [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[CollectionFallbackMerge[S], Flags]]

Enable merging fallback collection values into the source collection value.

Enable merging fallback collection values into the source collection value.

Value parameters

strategy

parameter specifying which strategy should be used to merge fallbacks with source value

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableCustomFieldNameComparison[C <: TransformedNamesComparison & Singleton](namesComparison: C): [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[FieldNameComparison[C], Flags]]

Enable custom way of comparing if source fields' names and target fields' names are matching.

Enable custom way of comparing if source fields' names and target fields' names are matching.

Value parameters

namesComparison

parameter specifying how names should be compared by macro

Attributes

See also
Since

1.0.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableCustomSubtypeNameComparison[C <: TransformedNamesComparison & Singleton](namesComparison: C): [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[SubtypeNameComparison[C], Flags]]

Enable custom way of comparing if source subtypes' names and target fields' names are matching.

Enable custom way of comparing if source subtypes' names and target fields' names are matching.

Value parameters

namesComparison

parameter specifying how names should be compared by macro

Attributes

See also
Since

1.0.0

Inherited from:
TransformerSourceFlagsDsl (hidden)
def enableDefaultValueOfType[T]: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[DefaultValueOfType[T], Flags]]

Enable fallback to default case class values in To type for fields of T type.

Enable fallback to default case class values in To type for fields of T type.

By default, in such case derivation will fail. By enabling this flag, derivation will fallback to default value.

This flag can be set in parallel to globally enabling default values with enableDefaultValues.

Attributes

See also
Since

1.2.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableDefaultValues: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[DefaultValues, Flags]]

Enable fallback to default case class values in To type.

Enable fallback to default case class values in To type.

By default, in such case derivation will fail. By enabling this flag, derivation will fallback to default value.

This flag can be set in parallel to enabling default values for specific field type with enableDefaultValueOfType.

Attributes

See also
Since

0.6.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableEitherFallbackMerge[S <: OptionFallbackMergeStrategy](strategy: S): [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[EitherFallbackMerge[S], Flags]]

Enable merging fallback Either values into the source Either value.

Enable merging fallback Either values into the source Either value.

Value parameters

strategy

parameter specifying which strategy should be used to merge fallbacks with source value

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableIgnoreUnmatchedBeanSetters: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[BeanSettersIgnoreUnmatched, Flags]]

Enable not failing compilation on unresolved Java Beans naming convention (.setName(value)) in To.

Enable not failing compilation on unresolved Java Beans naming convention (.setName(value)) in To.

By default, presence of setters (.setName(value)) fails compilation unless setters are enabled and matched with a source field or provided valued.

Attributes

See also
Since

0.8.3

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableImplicitConflictResolution[P <: ImplicitTransformerPreference](preference: P): [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[ImplicitConflictResolution[P], Flags]]

Enable conflict resolution when both Transformer and PartialTransformer are available in the implicit scope.

Enable conflict resolution when both Transformer and PartialTransformer are available in the implicit scope.

Value parameters

preference

parameter specifying which implicit transformer to pick in case of conflict

Attributes

See also
Since

0.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableImplicitConversions: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[ImplicitConversions, Flags]]

Enable using implicit conversions to transform one From into To.

Enable using implicit conversions to transform one From into To.

By default, implicit conversions are ignored.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableInheritedAccessors: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[InheritedAccessors, Flags]]

Enable lookup in definitions inherited from supertype.

Enable lookup in definitions inherited from supertype.

By default, only values defined directly in the type are considered. With this flag supertype methods would not be filtered out

Attributes

See also
Since

0.8.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableMacrosLogging: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[MacrosLogging, Flags]]

Enable printing the logs from the derivation process.

Enable printing the logs from the derivation process.

Attributes

See also
Since

0.8.0

Inherited from:
TransformerFlagsDsl (hidden)
def enableMethodAccessors: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[MethodAccessors, Flags]]

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

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)

Attributes

See also
Since

0.6.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableNonAnyValWrappers: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[NonAnyValWrappers, Flags]]

Enable unpacking/wrapping with wrapper types (classes with have only 1 val, set in a constructor) even when they are not AnyVals.

Enable unpacking/wrapping with wrapper types (classes with have only 1 val, set in a constructor) even when they are not AnyVals.

By default, in such case compilation fails.

Attributes

See also
Since

1.3.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableNonUnitBeanSetters: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[NonUnitBeanSetters, Flags]]

Enable calling unary non-Unit methods with Java Beans naming convention (.setName(value)) in To.

Enable calling unary non-Unit methods with Java Beans naming convention (.setName(value)) in To.

By default, only methods returning Unit (setName(value): Unit) could be considered setters.

Attributes

See also
Since

1.0.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableOptionDefaultsToNone: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[OptionDefaultsToNone, Flags]]

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.

Attributes

See also
Since

0.2.1

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableOptionFallbackMerge[S <: OptionFallbackMergeStrategy](strategy: S): [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[OptionFallbackMerge[S], Flags]]

Enable merging fallback Option values into the source Option value.

Enable merging fallback Option values into the source Option value.

Value parameters

strategy

parameter specifying which strategy should be used to merge fallbacks with source value

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enablePartialUnwrapsOption: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[PartialUnwrapsOption, Flags]]

Enable safe Option unwrapping by PartialTransformer - Option is automatically unwrapped to non-Option values, None is treated as empty value errors.

Enable safe Option unwrapping by PartialTransformer - Option is automatically unwrapped to non-Option values, None is treated as empty value errors.

This is the default behavior.

Attributes

See also
Since

1.0.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableTypeConstraintEvidence: [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[TypeConstraintEvidence, Flags]]

Enable using scala.Predef.&lt;:&lt; or scala.Predef.=:= to prove that From is a subtype of To.

Enable using scala.Predef.&lt;:&lt; or scala.Predef.=:= to prove that From is a subtype of To.

By default, such evidence is ignored.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableUnmatchedSubtypePolicyCheck[P <: UnmatchedSubtypePolicy & Singleton](unmatchedSubtypePolicy: P): [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[UnmatchedSubtypePolicyCheck[P], Flags]]

Enable policy check for target subtypes that would not be used anywhere during transformation.

Enable policy check for target subtypes that would not be used anywhere during transformation.

Value parameters

unmatchedSubtypePolicy

parameter specifying how unmatched target subtypes should be treated

Attributes

See also
Since

1.7.0

Inherited from:
TransformerSourceFlagsDsl (hidden)
def enableUnusedFieldPolicyCheck[P <: UnusedFieldPolicy & Singleton](unusedFieldPolicy: P): [Flags1 <: TransformerFlags] =>> PartialTransformerInto[From, To, Overrides, Flags1][Enable[UnusedFieldPolicyCheck[P], Flags]]

Enable policy check for source fields that would not be used anywhere during transformation.

Enable policy check for source fields that would not be used anywhere during transformation.

Value parameters

unusedFieldPolicy

parameter specifying how unused source fields should be treated

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)

Concrete fields

val source: From
val td: PartialTransformerDefinition[From, To, Overrides, Flags]