In the classfile API introduced by Java 24, there are several versions of the transformClass
methods. In particular if the name of the
transformed class is unchanged compared to the original class, then it is recommended to use the simplest version of the method that takes only 2
arguments. This makes the code shorter, clearer, and reduces chances for mistakes.