fillByDefault

inline fun <T : Any> fillByDefault(schema: YaclaSchema<T>): T

Creates a new config instance using only defaults.

  • If a field has a default in the given schema, that value is used.

  • Otherwise, the data class primary constructor's default parameter is used (if any).

No file I/O or parsing is performed.


fun <T : Any> fillByDefault(clazz: Class<T>, schema: YaclaSchema<T>): T

Java-friendly overload of fillByDefault.