Is there an easy way to intercept methods in java. I need to add an annotation to the required methods so that a piece of logic is called before passing through the method.
public void verifyActivity() {
}
@VerifyActivity
public void testLogin() {
}
@VerifyActivity
public void testSomethingElse() {
}
EDIT:
The recommended library for Android apps does not contain AOP. Is it possible to achieve this with reflection without adding any libraries?
source
share