FieldInfo

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.

Constructors

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

Properties

Link copied to clipboard

Direction-scoped override from @ConvertFrom (reverse / @MapFrom direction); beats convertWith there.

Link copied to clipboard

Direction-scoped override from @ConvertTo (forward / @MapTo direction); beats convertWith there.

Link copied to clipboard

Bilateral per-field override from @ConvertWith (both directions).

Link copied to clipboard

Map of target class FQN to list of target field names (supports multiple @FieldMap per targetClass)

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

If true, this field will be ignored in automatic mapping (requires external parameter)

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val type: KSType
Link copied to clipboard

The only default flag mapping decisions may consult (omit/copy, external params).

Link copied to clipboard

FQNs of Validator objects from @Validate — fire whenever this field enters a mapping.

Functions

Link copied to clipboard

Effective directive for the requested direction (direction-scoped beats bilateral).

Link copied to clipboard
fun onFailFor(isReverse: Boolean): OnFailPolicy

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