ensureClassHierarchyIsTransformed

fun ensureClassHierarchyIsTransformed(canonicalClassName: String)

Ensures that the specified class and all its superclasses are transformed.

This function is called before creating a new instance of the specified class or reading a static field of it. It ensures that the whole hierarchy of this class and the classes of all the static fields (this process is recursive) is transformed. Notably, some of these classes may not be loaded yet, and invoking the <cinit> during the analysis could cause non-deterministic behaviour (the class initialization is invoked only once, while Lincheck relies on the events reproducibility). To eliminate the issue, this function also loads the class before transformation, thus, initializing it here, in an ignored section of the analysis, re-transforming the class after that.

Parameters

canonicalClassName

The name of the class to be transformed.