Package-level declarations

Types

Link copied to clipboard
data class ConverterDirective(val converterFqn: String?, val onFail: OnFailPolicy)

Per-field converter/policy override read from @ConvertWith / @ConvertTo / @ConvertFrom.

Link copied to clipboard
data class FieldInfo(val name: String, val type: KSType, val isNullable: Boolean, val hasDefault: Boolean, val isComputed: Boolean, val fieldMapTargets: Map<String, List<String>>, val isIgnored: Boolean, val convertWith: ConverterDirective? = null, val convertToDirective: ConverterDirective? = null, val convertFromDirective: ConverterDirective? = null, val validators: List<String> = emptyList(), val ignoreDefaultValue: Boolean = false)

Information about a field (constructor parameter or computed property) in a class.

Link copied to clipboard
sealed class MappingStrategy

Strategy for mapping a field from source to target.

Link copied to clipboard

Processor-side mirror of com.sahsenvar.kmapper.annotations.OnFail — typed so policy comparisons are exhaustive instead of stringly.

Link copied to clipboard
data class TypeInfo(val qualifiedName: String, val simpleName: String, val isNullable: Boolean, val isCollection: Boolean, val elementType: KSType?)

Information about a type involved in mapping.

Functions

Link copied to clipboard
fun effectiveDirective(sourceField: FieldInfo, targetField: FieldInfo, isReverse: Boolean): ConverterDirective?

The directive governing one (source, target) field pairing — owner-anchored: the class that declares the mapping is asked first. That is the source in the forward (@MapTo) direction and the TARGET in the reverse (@MapFrom) direction, whose source is typically a foreign class the user cannot annotate (issue #82). In the reverse direction the source field stays a fallback, so directives placed there keep working. A directive is taken whole (use + onFail together), never merged across the two sides.

Link copied to clipboard
fun effectiveOnFail(sourceField: FieldInfo, targetField: FieldInfo, isReverse: Boolean): OnFailPolicy

Effective onFail policy for the pairing; OnFailPolicy.Auto when no directive applies.