create

fun <T : Any> create(clazz: KClass<T>, section: ConfigurationSection): T

Creates an instance of type T from the section.

This method uses the primary constructor of the class and resolves each parameter using FieldResolver. It also performs validation using ValidatorEngine and writes the final state back to the section using write.

Return

a new instance of type T

Parameters

clazz

the KClass of type T

section

the ConfigurationSection to read data from

Type Parameters

T

the type of the class to instantiate