FieldDescriptor
class FieldDescriptor<T>(val propertyName: String, val typeName: String, val secret: Boolean, val default: T?, val hasDefault: Boolean, val customKey: String? = null, val convert: (String) -> T, val convertChildren: (Map<String, String>) -> T? = null, val validate: (T) -> String?? = null)(source)
Describes one config field for ConfigLoader.resolve. Built by generated code.
Constructors
Properties
Link copied to clipboard
Builds the value from ConfigSource.children when the key itself is absent (Map fields).
Link copied to clipboard
The value used when no source has the key, if hasDefault.
Link copied to clipboard
Whether the field is optional: it has a default or is nullable.
Link copied to clipboard
The property name in the spec, e.g. maxPoolSize.
Link copied to clipboard
The type shown in ConfigError.ConversionFailed.targetType.