final class PartialTransformerInto[From, To, Overrides <: TransformerOverrides, Flags <: TransformerFlags] extends TransformerFlagsDsl[[Flags1]PartialTransformerInto[From, To, Overrides, Flags1], Flags] with WithRuntimeDataStore
Provides DSL for configuring io.scalaland.chimney.PartialTransformer's generation and using the result to transform value at the same time
- From
type of input value
- To
type of output value
- Overrides
type-level encoded config
- Flags
type-level encoded flags
- Since
0.7.0
- Alphabetic
- By Inheritance
- PartialTransformerInto
- WithRuntimeDataStore
- TransformerFlagsDsl
- TransformerTargetFlagsDsl
- TransformerSourceFlagsDsl
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new PartialTransformerInto(source: From, td: PartialTransformerDefinition[From, To, Overrides, Flags])
- source
object to transform
- td
transformer definition
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def castedSource: Any
- Attributes
- protected
- Definition Classes
- TransformerSourceFlagsDsl
- def castedTarget: Any
- Attributes
- protected
- Definition Classes
- TransformerTargetFlagsDsl
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def disableBeanGetters: PartialTransformerInto[From, To, Overrides, Disable[BeanGetters, Flags]]
Disable Java Beans naming convention (
.getName,.isName) onFrom.Disable Java Beans naming convention (
.getName,.isName) onFrom.- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.6.0
- See also
https://chimney.readthedocs.io/supported-transformations/#reading-from-bean-getters for more details
- def disableBeanSetters: PartialTransformerInto[From, To, Overrides, Disable[BeanSetters, Flags]]
Disable Java Beans naming convention (
.setName(value)) onTo.Disable Java Beans naming convention (
.setName(value)) onTo.- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.6.0
- See also
https://chimney.readthedocs.io/supported-transformations/#writing-to-bean-setters for more details
- def disableCollectionFallbackMerge: PartialTransformerInto[From, To, Overrides, Disable[CollectionFallbackMerge[_], Flags]]
Disable merging fallback collection values into the source collection value.
Disable merging fallback collection values into the source collection value.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#merging-collection-with-collection-into-collection for more details
- def disableCustomFieldNameComparison: PartialTransformerInto[From, To, Overrides, 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.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.0.0
- See also
https://chimney.readthedocs.io/supported-transformations/#customizing-field-name-matching for more details
- def disableCustomSubtypeNameComparison: PartialTransformerInto[From, To, Overrides, 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.
- Definition Classes
- TransformerSourceFlagsDsl
- Since
1.0.0
- See also
https://chimney.readthedocs.io/supported-transformations/#customizing-subtype-name-matching for more details
- def disableDefaultValueOfType[T]: PartialTransformerInto[From, To, Overrides, Disable[DefaultValueOfType[T], Flags]]
Fail derivation if
Fromtype is missing field even ifTohas default value type for fields ofTtype.Fail derivation if
Fromtype is missing field even ifTohas default value type for fields ofTtype.This flag can be set in parallel to globally enabling default values with disableDefaultValues.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.2.0
- See also
https://chimney.readthedocs.io/supported-transformations/#allowing-fallback-to-the-constructors-default-values for more details
- def disableDefaultValues: PartialTransformerInto[From, To, Overrides, Disable[DefaultValues, Flags]]
Fail derivation if
Fromtype is missing field even ifTohas default value for it.Fail derivation if
Fromtype is missing field even ifTohas default value for it.This flag can be set in parallel to enabling default values for specific field type with * disableDefaultValueOfType.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.1.9
- See also
https://chimney.readthedocs.io/supported-transformations/#allowing-fallback-to-the-constructors-default-values for more details
- def disableEitherFallbackMerge: PartialTransformerInto[From, To, Overrides, Disable[EitherFallbackMerge[_], Flags]]
Disable merging fallback
Eithervalues into the sourceEithervalue.Disable merging fallback
Eithervalues into the sourceEithervalue.- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#merging-either-with-either-into-either for more details
- def disableIgnoreUnmatchedBeanSetters: PartialTransformerInto[From, To, Overrides, Disable[BeanSettersIgnoreUnmatched, Flags]]
Disable not failing compilation on unresolved Java Beans naming convention (
.setName(value)) inTo.Disable not failing compilation on unresolved Java Beans naming convention (
.setName(value)) inTo.- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.8.3
- See also
https://chimney.readthedocs.io/supported-transformations/#ignoring-unmatched-bean-setters for more details
- def disableImplicitConflictResolution: PartialTransformerInto[From, To, Overrides, Disable[ImplicitConflictResolution[_], Flags]]
Disable any implicit conflict resolution preference that was set previously.
Disable any implicit conflict resolution preference that was set previously.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#resolving-priority-of-implicit-total-vs-partial-transformers for more details
- def disableImplicitConversions: PartialTransformerInto[From, To, Overrides, Disable[ImplicitConversions, Flags]]
Disable using implicit conversions to transform one
FromintoTo.Disable using implicit conversions to transform one
FromintoTo.- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#implicit-conversions for more details
- def disableInheritedAccessors: PartialTransformerInto[From, To, Overrides, Disable[InheritedAccessors, Flags]]
Disable inherited accessors lookup that was previously enabled by
enableInheritedAccessorsDisable inherited accessors lookup that was previously enabled by
enableInheritedAccessors- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.8.0
- See also
https://chimney.readthedocs.io/supported-transformations/#reading-from-inherited-valuesmethods for more details
- def disableMacrosLogging: PartialTransformerInto[From, To, Overrides, Disable[MacrosLogging, Flags]]
Disable printing the logs from the derivation process.
Disable printing the logs from the derivation process.
- Definition Classes
- TransformerFlagsDsl
- Since
0.8.0
- See also
https://chimney.readthedocs.io/troubleshooting/#debugging-macros for more details
- def disableMethodAccessors: PartialTransformerInto[From, To, Overrides, Disable[MethodAccessors, Flags]]
Disable method accessors lookup that was previously enabled by
enableMethodAccessorsDisable method accessors lookup that was previously enabled by
enableMethodAccessors- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.5.0
- See also
https://chimney.readthedocs.io/supported-transformations/#reading-from-methods for more details
- def disableNonAnyValWrappers: PartialTransformerInto[From, To, Overrides, 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.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.3.0
- See also
https://chimney.readthedocs.io/supported-transformations/#frominto-a-wrapper-type for more details
- def disableNonUnitBeanSetters: PartialTransformerInto[From, To, Overrides, Disable[NonUnitBeanSetters, Flags]]
Enable calling unary non-Unit methods with Java Beans naming convention (
.setName(value)) inTo.Enable calling unary non-Unit methods with Java Beans naming convention (
.setName(value)) inTo.- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.0.0
- See also
https://chimney.readthedocs.io/supported-transformations/#writing-to-non-unit-bean-setters for more details
- def disableOptionDefaultsToNone: PartialTransformerInto[From, To, Overrides, Disable[OptionDefaultsToNone, Flags]]
Disable
Nonefallback value for optional fields inTo.Disable
Nonefallback value for optional fields inTo.- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.6.0
- See also
https://chimney.readthedocs.io/supported-transformations/#allowing-fallback-to-none-as-the-constructors-argument for more details
- def disableOptionFallbackMerge: PartialTransformerInto[From, To, Overrides, Disable[OptionFallbackMerge[_], Flags]]
Disable merging fallback
Optionvalues into the sourceOptionvalue.Disable merging fallback
Optionvalues into the sourceOptionvalue.- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#merging-option-with-option-into-option for more details
- def disablePartialUnwrapsOption: PartialTransformerInto[From, To, Overrides, Disable[PartialUnwrapsOption, Flags]]
Disable safe
Optionunwrapping byPartialTransformer- eachOptionto non-Optionhas to be handled manually.Disable safe
Optionunwrapping byPartialTransformer- eachOptionto non-Optionhas to be handled manually.- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.0.0
- See also
https://chimney.readthedocs.io/supported-transformations/#controlling-automatic-option-unwrapping for more details
- def disableTypeConstraintEvidence: PartialTransformerInto[From, To, Overrides, Disable[TypeConstraintEvidence, Flags]]
Disable using scala.Predef.<:< or scala.Predef.=:= to prove that
Fromis a subtype ofTo.Disable using scala.Predef.<:< or scala.Predef.=:= to prove that
Fromis a subtype ofTo.- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#type-evidence-based-conversions for more details
- def disableUnmatchedSubtypePolicyCheck: PartialTransformerInto[From, To, Overrides, 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.
- Definition Classes
- TransformerSourceFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/cookbook/#checking-for-unused-source-fieldsunmatched-target-subtypes for more details
- def disableUnusedFieldPolicyCheck: PartialTransformerInto[From, To, Overrides, 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.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/cookbook/#checking-for-unused-source-fieldsunmatched-target-subtypes for more details
- def enableBeanGetters: PartialTransformerInto[From, To, Overrides, Enable[BeanGetters, Flags]]
Enable Java Beans naming convention (
.getName,.isName) onFrom.Enable Java Beans naming convention (
.getName,.isName) onFrom.By default, only Scala conversions (
.name) are allowed.- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.2.1
- See also
https://chimney.readthedocs.io/supported-transformations/#reading-from-bean-getters for more details
- def enableBeanSetters: PartialTransformerInto[From, To, Overrides, Enable[BeanSetters, Flags]]
Enable Java Beans naming convention (
.setName(value)) onTo.Enable Java Beans naming convention (
.setName(value)) onTo.By default, only Scala conversions (
.copy(name = value)) are allowed.- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.2.1
- See also
https://chimney.readthedocs.io/supported-transformations/#writing-to-bean-setters for more details
- def enableCollectionFallbackMerge[S <: CollectionFallbackMergeStrategy](strategy: S): PartialTransformerInto[From, To, Overrides, Enable[CollectionFallbackMerge[S], Flags]]
Enable merging fallback collection values into the source collection value.
Enable merging fallback collection values into the source collection value.
- strategy
parameter specifying which strategy should be used to merge fallbacks with source value
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#merging-collection-with-collection-into-collection for more details
- def enableCustomFieldNameComparison[C <: TransformedNamesComparison with Singleton](namesComparison: C): PartialTransformerInto[From, To, Overrides, 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.
- namesComparison
parameter specifying how names should be compared by macro
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.0.0
- See also
https://chimney.readthedocs.io/supported-transformations/#customizing-field-name-matching for more details
- def enableCustomSubtypeNameComparison[C <: TransformedNamesComparison with Singleton](namesComparison: C): PartialTransformerInto[From, To, Overrides, 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.
- namesComparison
parameter specifying how names should be compared by macro
- Definition Classes
- TransformerSourceFlagsDsl
- Since
1.0.0
- See also
https://chimney.readthedocs.io/supported-transformations/#customizing-subtype-name-matching for more details
- def enableDefaultValueOfType[T]: PartialTransformerInto[From, To, Overrides, Enable[DefaultValueOfType[T], Flags]]
Enable fallback to default case class values in
Totype for fields ofTtype.Enable fallback to default case class values in
Totype for fields ofTtype.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.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.2.0
- See also
https://chimney.readthedocs.io/supported-transformations/#allowing-fallback-to-the-constructors-default-values for more details
- def enableDefaultValues: PartialTransformerInto[From, To, Overrides, Enable[DefaultValues, Flags]]
Enable fallback to default case class values in
Totype.Enable fallback to default case class values in
Totype.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.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.6.0
- See also
https://chimney.readthedocs.io/supported-transformations/#allowing-fallback-to-the-constructors-default-values for more details
- def enableEitherFallbackMerge[S <: OptionFallbackMergeStrategy](strategy: S): PartialTransformerInto[From, To, Overrides, Enable[EitherFallbackMerge[S], Flags]]
Enable merging fallback
Eithervalues into the sourceEithervalue.Enable merging fallback
Eithervalues into the sourceEithervalue.- strategy
parameter specifying which strategy should be used to merge fallbacks with source value
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#merging-either-with-either-into-either for more details
- def enableIgnoreUnmatchedBeanSetters: PartialTransformerInto[From, To, Overrides, Enable[BeanSettersIgnoreUnmatched, Flags]]
Enable not failing compilation on unresolved Java Beans naming convention (
.setName(value)) inTo.Enable not failing compilation on unresolved Java Beans naming convention (
.setName(value)) inTo.By default, presence of setters (
.setName(value)) fails compilation unless setters are enabled and matched with a source field or provided valued.- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.8.3
- See also
https://chimney.readthedocs.io/supported-transformations/#ignoring-unmatched-bean-setters for more details
- def enableImplicitConflictResolution[P <: ImplicitTransformerPreference](preference: P): PartialTransformerInto[From, To, Overrides, Enable[ImplicitConflictResolution[P], Flags]]
Enable conflict resolution when both
TransformerandPartialTransformerare available in the implicit scope.Enable conflict resolution when both
TransformerandPartialTransformerare available in the implicit scope.- preference
parameter specifying which implicit transformer to pick in case of conflict
- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#resolving-priority-of-implicit-total-vs-partial-transformers for more details
- def enableImplicitConversions: PartialTransformerInto[From, To, Overrides, Enable[ImplicitConversions, Flags]]
Enable using implicit conversions to transform one
FromintoTo.Enable using implicit conversions to transform one
FromintoTo.By default, implicit conversions are ignored.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#implicit-conversions for more details
- def enableInheritedAccessors: PartialTransformerInto[From, To, Overrides, 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
- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.8.0
- See also
https://chimney.readthedocs.io/supported-transformations/#reading-from-inherited-valuesmethods for more details
- def enableMacrosLogging: PartialTransformerInto[From, To, Overrides, Enable[MacrosLogging, Flags]]
Enable printing the logs from the derivation process.
Enable printing the logs from the derivation process.
- Definition Classes
- TransformerFlagsDsl
- Since
0.8.0
- See also
https://chimney.readthedocs.io/troubleshooting/#debugging-macros for more details
- def enableMethodAccessors: PartialTransformerInto[From, To, Overrides, Enable[MethodAccessors, Flags]]
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
- TransformerTargetFlagsDsl
- Since
0.6.0
- See also
https://chimney.readthedocs.io/supported-transformations/#reading-from-methods for more details
- def enableNonAnyValWrappers: PartialTransformerInto[From, To, Overrides, 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.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.3.0
- See also
https://chimney.readthedocs.io/supported-transformations/#frominto-a-wrapper-type for more details
- def enableNonUnitBeanSetters: PartialTransformerInto[From, To, Overrides, Enable[NonUnitBeanSetters, Flags]]
Enable calling unary non-Unit methods with Java Beans naming convention (
.setName(value)) inTo.Enable calling unary non-Unit methods with Java Beans naming convention (
.setName(value)) inTo.By default, only methods returning
Unit(setName(value): Unit) could be considered setters.- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.0.0
- See also
https://chimney.readthedocs.io/supported-transformations/#writing-to-non-unit-bean-setters for more details
- def enableOptionDefaultsToNone: PartialTransformerInto[From, To, Overrides, 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.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
0.2.1
- See also
https://chimney.readthedocs.io/supported-transformations/#allowing-fallback-to-none-as-the-constructors-argument for more details
- def enableOptionFallbackMerge[S <: OptionFallbackMergeStrategy](strategy: S): PartialTransformerInto[From, To, Overrides, Enable[OptionFallbackMerge[S], Flags]]
Enable merging fallback
Optionvalues into the sourceOptionvalue.Enable merging fallback
Optionvalues into the sourceOptionvalue.- strategy
parameter specifying which strategy should be used to merge fallbacks with source value
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#merging-option-with-option-into-option for more details
- def enablePartialUnwrapsOption: PartialTransformerInto[From, To, Overrides, Enable[PartialUnwrapsOption, Flags]]
Enable safe Option unwrapping by
PartialTransformer-Optionis automatically unwrapped to non-Optionvalues,Noneis treated as empty value errors.Enable safe Option unwrapping by
PartialTransformer-Optionis automatically unwrapped to non-Optionvalues,Noneis treated as empty value errors.This is the default behavior.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.0.0
- See also
https://chimney.readthedocs.io/supported-transformations/#controlling-automatic-option-unwrapping for more details
- def enableTypeConstraintEvidence: PartialTransformerInto[From, To, Overrides, Enable[TypeConstraintEvidence, Flags]]
Enable using scala.Predef.<:< or scala.Predef.=:= to prove that
Fromis a subtype ofTo.Enable using scala.Predef.<:< or scala.Predef.=:= to prove that
Fromis a subtype ofTo.By default, such evidence is ignored.
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#type-evidence-based-conversions for more details
- def enableUnmatchedSubtypePolicyCheck[P <: UnmatchedSubtypePolicy with Singleton](unmatchedSubtypePolicy: P): PartialTransformerInto[From, To, Overrides, 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.
- unmatchedSubtypePolicy
parameter specifying how unmatched target subtypes should be treated
- Definition Classes
- TransformerSourceFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/cookbook/#checking-for-unused-source-fieldsunmatched-target-subtypes for more details
- def enableUnusedFieldPolicyCheck[P <: UnusedFieldPolicy with Singleton](unusedFieldPolicy: P): PartialTransformerInto[From, To, Overrides, 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.
- unusedFieldPolicy
parameter specifying how unused source fields should be treated
- Definition Classes
- TransformerTargetFlagsDsl
- Since
1.7.0
- See also
https://chimney.readthedocs.io/cookbook/#checking-for-unused-source-fieldsunmatched-target-subtypes for more details
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val source: From
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val td: PartialTransformerDefinition[From, To, Overrides, Flags]
- def toString(): String
- Definition Classes
- AnyRef → Any
- macro def transform[ImplicitScopeFlags <: TransformerFlags](implicit 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 capturedsourcevalue. When transformation can't be derived, it results with compilation error.- returns
partial transformation result of type
partial.Result[To]
- Since
0.7.0
- macro def transformFailFast[ImplicitScopeFlags <: TransformerFlags](implicit 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 capturedsourcevalue. When transformation can't be derived, it results with compilation error.- returns
partial transformation result of type
partial.Result[To]
- Since
0.7.0
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- macro def withConstructor[Ctor](f: Ctor)(implicit ev: Of[Ctor, To]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use
finstead of the primary constructor to construct theTovalue.Use
finstead of the primary constructor to construct theTovalue.Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with
Fromgetters.Values for each parameter can be provided the same way as if they were normal constructor's arguments.
- Ctor
type of the Eta-expanded method/lambda which should return
To- f
method name or lambda which constructs
To- returns
- Since
0.8.4
- See also
https://chimney.readthedocs.io/supported-transformations/#types-with-manually-provided-constructors for more details
- macro def withConstructorEither[Ctor](f: Ctor)(implicit ev: Of[Ctor, Either[String, To]]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use
finstead of the primary constructor to parse intoEither[String, To]value.Use
finstead of the primary constructor to parse intoEither[String, To]value.Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with
Fromgetters.Values for each parameter can be provided the same way as if they were normal constructor's arguments.
- Ctor
type of the Eta-expanded method/lambda which should return
Either[String, To]- f
method name or lambda which constructs
Either[String, To]- returns
- Since
1.0.0
- See also
https://chimney.readthedocs.io/supported-transformations/#types-with-manually-provided-constructors for more details
- macro def withConstructorEitherTo[T, Ctor](selector: (To) => T)(f: Ctor)(implicit ev: Of[Ctor, Either[String, T]]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use
finstead of the primary constructor to parse into theEithervalue extracted fromTousing theselector.Use
finstead of the primary constructor to parse into theEithervalue extracted fromTousing theselector.Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with
Fromgetters.Values for each parameter can be provided the same way as if they were normal constructor's arguments.
- T
type of the value which would be constructed with a custom constructor
- Ctor
type of the Eta-expanded method/lambda which should return
Either[String, T]- selector
target field in
To, defined like_.name- f
method name or lambda which constructs
Either[String, T]- returns
- Since
1.6.0
- See also
https://chimney.readthedocs.io/supported-transformations/#types-with-manually-provided-constructors for more details
- macro def withConstructorPartial[Ctor](f: Ctor)(implicit ev: Of[Ctor, Result[To]]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use
finstead of the primary constructor to parse intopartial.Result[To]value.Use
finstead of the primary constructor to parse intopartial.Result[To]value.Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with
Fromgetters.Values for each parameter can be provided the same way as if they were normal constructor's arguments.
- Ctor
type of the Eta-expanded method/lambda which should return
partial.Result[To]- f
method name or lambda which constructs
partial.Result[To]- returns
- Since
0.8.4
- See also
https://chimney.readthedocs.io/supported-transformations/#types-with-manually-provided-constructors for more details
- macro def withConstructorPartialTo[T, Ctor](selector: (To) => T)(f: Ctor)(implicit ev: Of[Ctor, Result[T]]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use
finstead of the primary constructor to parse into the value extracted fromTousing theselector.Use
finstead of the primary constructor to parse into the value extracted fromTousing theselector.Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with
Fromgetters.Values for each parameter can be provided the same way as if they were normal constructor's arguments.
- T
type of the value which would be constructed with a custom constructor
- Ctor
type of the Eta-expanded method/lambda which should return
partial.Result[T]- selector
target field in
To, defined like_.name- f
method name or lambda which constructs
partial.Result[T]- returns
- Since
1.6.0
- See also
https://chimney.readthedocs.io/supported-transformations/#types-with-manually-provided-constructors for more details
- macro def withConstructorTo[T, Ctor](selector: (To) => T)(f: Ctor)(implicit ev: Of[Ctor, T]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use
finstead of the primary constructor to construct the value extracted fromTousing theselector.Use
finstead of the primary constructor to construct the value extracted fromTousing theselector.Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with
Fromgetters.Values for each parameter can be provided the same way as if they were normal constructor's arguments.
- T
type of the value which would be constructed with a custom constructor
- Ctor
type of the Eta-expanded method/lambda which should return
T- selector
target field in
To, defined like_.name- f
method name or lambda which constructs
To- returns
- Since
1.6.0
- See also
https://chimney.readthedocs.io/supported-transformations/#types-with-manually-provided-constructors for more details
- macro def withEnumCaseHandled[Subtype](f: (Subtype) => To): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Alias to withSealedSubtypeHandled.
Alias to withSealedSubtypeHandled.
- Since
1.0.0
- macro def withEnumCaseHandledPartial[Subtype](f: (Subtype) => Result[To]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Alias to withSealedSubtypeHandledPartial.
Alias to withSealedSubtypeHandledPartial.
- Since
1.0.0
- macro def withEnumCaseRenamed[FromSubtype, ToSubtype]: PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Alias to withSealedSubtypeRenamed.
Alias to withSealedSubtypeRenamed.
- Since
1.2.0
- macro def withEnumCaseUnmatched[T](selectorTo: (To) => T): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Alias to withSealedSubtypeUnmatched.
Alias to withSealedSubtypeUnmatched.
- Since
1.7.0
- macro def withFallback[FromFallback](fallback: FromFallback): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
To use
fallbackwhen the source of typeFromis missing fields.To use
fallbackwhen the source of typeFromis missing fields.Fallbacks can be stacked - then they will be tried in the order in which they were added.
- FromFallback
type of the fallback value which would be checked for fields when the
Fromvalue would be missing- fallback
fallback value which would be checked for fields when the
Fromvalue would be missing- returns
io.scalaland.chimney.dsl.TransformerOverrides
- Since
1.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#merging-multiple-input-sources-into-a-single-target-value for more details
- macro def withFallbackFrom[T, FromFallback](selectorFrom: (From) => T)(fallback: FromFallback): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
To use
fallbackwhen the source of typeT, extracted withselectorFrom, is missing fields.To use
fallbackwhen the source of typeT, extracted withselectorFrom, is missing fields.Fallbacks can be stacked - then they will be tried in the order in which they were added.
- T
type of the source value that fallback is provided for
- FromFallback
type of the fallback value which would be checked for fields when the
Fromvalue would be missing- selectorFrom
path to the source value the fallback will be provided for
- fallback
fallback value which would be checked for fields when the
Fromvalue would be missing- returns
io.scalaland.chimney.dsl.TransformerOverrides
- Since
1.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#merging-multiple-input-sources-into-a-single-target-value for more details
- macro def withFieldComputed[T, U](selector: (To) => T, f: (From) => U)(implicit ev: <:<[U, T]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use the function
fto compute a value of the field picked using theselector.Use the function
fto compute a value of the field picked using theselector.By default, if
Fromis missing a field and it's not provided with someselector, the compilation fails.- T
type of target field
- U
type of computed value
- selector
target field in
To, defined like_.name- f
function used to compute value of the target field
- returns
- Since
0.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-computed-value for more details
- macro def withFieldComputedFrom[S, T, U](selectorFrom: (From) => S)(selectorTo: (To) => T, f: (S) => U)(implicit ev: <:<[U, T]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use the function
fto compute a value of the field picked using theselectorTofrom a value extracted withselectorFromas an input.Use the function
fto compute a value of the field picked using theselectorTofrom a value extracted withselectorFromas an input.By default, if
Fromis missing a field and it's not provided with someselectorTo, the compilation fails.- S
* type of source field
- T
type of target field
- U
type of computed value
- selectorFrom
source field in
From, defined like_.name- selectorTo
target field in
To, defined like_.name- f
function used to compute value of the target field
- returns
- Since
1.6.0
- See also
https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-computed-value for more details
- macro def withFieldComputedPartial[T, U](selector: (To) => T, f: (From) => Result[U])(implicit ev: <:<[U, T]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use the function
fto compute a partial result for the field picked using theselector.Use the function
fto compute a partial result for the field picked using theselector.By default, if
Fromis missing a field and it's not provided with someselector, the compilation fails.- T
type of target field
- U
type of computed value
- selector
target field in
To, defined like_.name- f
function used to compute value of the target field
- returns
- Since
0.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-computed-value for more details
- macro def withFieldComputedPartialFrom[S, T, U](selectorFrom: (From) => S)(selectorTo: (To) => T, f: (S) => Result[U])(implicit ev: <:<[U, T]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use the function
fto compute a partial result of the field picked using theselectorTofrom a value extracted withselectorFromas an input.Use the function
fto compute a partial result of the field picked using theselectorTofrom a value extracted withselectorFromas an input.By default, if
Fromis missing a field and it's not provided with someselector, the compilation fails.- S
* type of source field
- T
type of target field
- U
type of computed value
- selectorFrom
source field in
From, defined like_.name- selectorTo
target field in
To, defined like_.name- f
function used to compute value of the target field
- returns
- Since
1.6.0
- See also
https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-computed-value for more details
- macro def withFieldConst[T, U](selector: (To) => T, value: U)(implicit ev: <:<[U, T]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use provided
valuefor field picked usingselector.Use provided
valuefor field picked usingselector.By default, if
Fromis missing field picked byselector, compilation fails.- T
type of target field
- U
type of provided value
- selector
target field in
To, defined like_.name- value
constant value to use for the target field
- returns
- Since
0.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-a-provided-value for more details
- macro def withFieldConstPartial[T, U](selector: (To) => T, value: Result[U])(implicit ev: <:<[U, T]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use provided partial result
valuefor field picked usingselector.Use provided partial result
valuefor field picked usingselector.By default, if
Fromis missing field picked byselector, compilation fails.- T
type of target field
- U
type of provided value
- selector
target field in
To, defined like_.name- value
constant value to use for the target field
- returns
- Since
0.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-a-provided-value for more details
- macro def withFieldRenamed[T, U](selectorFrom: (From) => T, selectorTo: (To) => U): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use the
selectorFromfield inFromto obtain the value of theselectorTofield inTo.Use the
selectorFromfield inFromto obtain the value of theselectorTofield inTo.By default, if
Fromis missing a field and it's not provided with someselectorTo, the compilation fails.- T
type of source field
- U
type of target field
- selectorFrom
source field in
From, defined like_.originalName- selectorTo
target field in
To, defined like_.newName- returns
- Since
0.7.0
- See also
https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-its-source-field for more details
- macro def withFieldUnused[T](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.
- T
type of source field
- selectorFrom
source field in
From, defined like_.originalName- returns
- Since
1.7.0
- See also
https://chimney.readthedocs.io/cookbook/#checking-for-unused-source-fieldsunmatched-target-subtypes for more details
- macro def withSealedSubtypeHandled[Subtype](f: (Subtype) => To): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use
fto calculate the unmatched subtype when mapping one sealed/enum into another.Use
fto calculate the unmatched subtype when mapping one sealed/enum into another.By default, if mapping one coproduct in
Frominto another coproduct inToderivation expects that coproducts to have matching names of its components, and for every component inTofield's type there is matching component inFromtype. 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 => ...), sincewithSealedSubtypeHandledmatches on aFromsubtype, while.matching[Subtype]matches on aTovalue's piece.- Subtype
type of sealed/enum instance
- f
function to calculate values of components that cannot be mapped automatically
- returns
- Since
1.0.0
- See also
https://chimney.readthedocs.io/supported-transformations/#handling-a-specific-sealed-subtype-with-a-computed-value for more details
- macro def withSealedSubtypeHandledPartial[Subtype](f: (Subtype) => Result[To]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use
fto calculate the unmatched subtype's partial.Result when mapping one sealed/enum into another.Use
fto calculate the unmatched subtype's partial.Result when mapping one sealed/enum into another.By default, if mapping one coproduct in
Frominto another coproduct inToderivation expects that coproducts to have matching names of its components, and for every component inTofield's type there is matching component inFromtype. 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 => ...), sincewithSealedSubtypeHandledmatches on aFromsubtype, while.matching[Subtype]matches on aTovalue's piece.- Subtype
type of sealed/enum instance
- f
function to calculate values of components that cannot be mapped automatically
- returns
- Since
1.0.0
- See also
https://chimney.readthedocs.io/supported-transformations/#handling-a-specific-sealed-subtype-with-a-computed-value for more details
- macro def withSealedSubtypeRenamed[FromSubtype, ToSubtype]: PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Use the
FromSubtypeinFromas a source for theToSubtypeinTo.Use the
FromSubtypeinFromas a source for theToSubtypeinTo.- FromSubtype
type of sealed/enum instance
- ToSubtype
type of sealed/enum instance
- returns
- Since
1.2.0
- See also
https://chimney.readthedocs.io/supported-transformations/#handling-a-specific-sealed-subtype-by-a-specific-target-subtype for more details
- macro def withSealedSubtypeUnmatched[T](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.
- T
type of subtype
- selectorTo
target subtype in
To, defined like_.matching[Subtype]- returns
- Since
1.7.0
- See also
https://chimney.readthedocs.io/cookbook/#checking-for-unused-source-fieldsunmatched-target-subtypes for more details
- macro def withSourceFlag[T](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.- T
type of the source field
- selectorFrom
source field in
From, defined like_.name- returns
io.scalaland.chimney.dsl.TransformerSourceFlagsDsl.OfPartialTransformerInto
- Since
1.6.0
- See also
https://chimney.readthedocs.io/cookbook/#constraining-flags-to-a-specific-fieldsubtype for more details
- macro def withTargetFlag[T](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.- T
type of the target field
- selectorTo
target field in
To, defined like_.name- returns
io.scalaland.chimney.dsl.TransformerTargetFlagsDsl.OfPartialTransformerInto
- Since
1.6.0
- See also
https://chimney.readthedocs.io/cookbook/#constraining-flags-to-a-specific-fieldsubtype for more details
Deprecated Value Members
- macro def withCoproductInstance[Subtype](f: (Subtype) => To): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Renamed to withSealedSubtypeHandled.
Renamed to withSealedSubtypeHandled.
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0) Use .withSealedSubtypeHandled or .withEnumCaseHandled for more clarity
- Since
0.7.0
- macro def withCoproductInstancePartial[Subtype](f: (Subtype) => Result[To]): PartialTransformerInto[From, To, _ <: TransformerOverrides, Flags]
Renamed to withSealedSubtypeHandledPartial.
Renamed to withSealedSubtypeHandledPartial.
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0) Use .withSealedSubtypeHandledPartial or .withEnumCaseHandledPartial for more clarity
- Since
0.7.0