byte-buddy icon indicating copy to clipboard operation
byte-buddy copied to clipboard

None of [] allows for delegation from static org.spiderflow.aop.HttpConnection$Response org.spiderflow.aop.HttpConnection$Response.execute(org.jsoup.Connection$Request) throws java.io.IOException

Open 365code365 opened this issue 2 years ago • 1 comments

the method like this, method without public、private、protected image

public void init() { TypePool typePool = TypePool.Default.ofSystemLoader();

    new ByteBuddy()
            .redefine(typePool.describe("org.jsoup.helper.HttpConnection$Response").resolve(),
                    ClassFileLocator.ForClassLoader.ofSystemLoader())
            .method(ElementMatchers.isStatic()
                    .and(ElementMatchers.named("execute")))
            .intercept(MethodDelegation.to(new Interceptor()))
            .make()
            .load(ClassLoader.getSystemClassLoader(), ClassLoadingStrategy.Default.INJECTION)
            .getLoaded();

}

365code365 avatar Aug 29 '23 15:08 365code365

How does your interceptor look like?

raphw avatar Aug 30 '23 07:08 raphw