-
-
Notifications
You must be signed in to change notification settings - Fork 826
Open
Labels
Description
Rafael,
I tried to find an answer to this question for a long time but so far only found MemberSubstitution, which replaces access but not the definition. If you could please point me into the right direction?
Replace
class ClassA {
static final ClassB field=new ClassB(1)
}
with
class ClassA {
static final ClassB field=new ClassB(2)
}
One use case is to replace field in interface so reflection and setting in construction would not apply there.
I'm saving bytecode to file rather that injecting if that lifts any restrictions. If that's only possible with ASM, is there an approximate example?
Many thanks