asNew

fun asNew(): T

Reflectively creates a new instance of T and mutates it with the DSLMutator.

Return

A new instance of T with the DSLMutator applied.

Throws

If the class does not have a no-args constructor or if the class cannot be found via reflection.