CTransformer - Lenni0451/ClassTransform GitHub Wiki
The CTransformer annotation is used to mark the target class of a CTransformer.
The target can be specified as a class or a string.
To specify the target as a class, use the value field of the annotation.
@CTransformer(TestClass.class)
public class Transformer {
To specify the target as a string, use the name field.
@CTransformer(name = "com.example.TestClass")
public class Transformer {
The value and name fields can be used together to target multiple classes.
@CTransformer(value = TestClass1.class, name = "com.example.TestClass2")
public class Transformer {
Targeting multiple classes
The value and name fields can be arrays to target multiple classes.
Make sure that the transformer methods are compatible with all targeted classes.
//Targeting multiple classes using the value field
@CTransformer(value = {TestClass1.class, TestClass2.class})
//Targeting multiple classes using the name field
@CTransformer(name = {"com.example.TestClass1", "com.example.TestClass2"})
public class Transformer {