-
-
Notifications
You must be signed in to change notification settings - Fork 841
Open
Labels
Description
Rafael,
First of all, many thanks for this great framework!
How to copy method2 from ClassB into ClassA (or invoke). For simplicity, it does not access any fields and methods in ClassB.
For Advice it needs to be a static method, which it's not.
For MethodCall or MethodDelegation it needs to be a compatible class to be invoked, which it's not.
There's an option with ByteCodeAppender, which I could not find a good a example for.
I spent nearly whole day trying to figure it out, if you could show a brief snippet, I appreciate it.
class ClassA {
void method1() {
}
}
class ClassB {
void method2() {
System.out.println("method2")
}
}