initialize

fun initialize(vararg classes: KClass<*>)(source)
fun initialize(classes: List<KClass<*>>)(source)

Ensures that the given classes are initialized, as described in JLS Section 12.4.2.

WARNING: Normally it's a smell if a class needs to be explicitly initialized, because static state hurts system maintainability and testability. In cases when you have no choice while interoperating with a legacy framework, this method helps to keep the code less ugly.

See also

Throws

if an exception is thrown during initialization of a class