-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
Milestone
Description
Prerequisites
Please check the FAQ, and search existing issues for similar questions before creating a new issue.YOU MAY DELETE THIS PREREQUISITES SECTION.
import java.util.concurrent.CompletableFuture;
public abstract class AbstractResult extends CompletableFuture<Result> implements Result
public class MyResult extends AbstractResult
transformTemplate.transform("com.tankilo.MyResult", new MyResultTransform());
// MyResult.java
InstrumentMethod complete = target.getDeclaredMethod("complete", "java.lang.Object");
When i debug the code, variable complete will be null, this is because getDeclaredMethod has the same behaviour as java.lang.Class.getDeclaredMethods() , so the inherited method java.util.concurrent.CompletableFuture#complete is excluded.
MyResult is a shared variable between two threads, the result of an async opertaion.
When MyResult#complete is called, i want to enhance this method with AsyncContextSpanEventSimpleAroundInterceptor and get the final result of the async opertaion.
So can i add interceptor to the method inherited from superclasses?