DEV Community

Query Filter
Query Filter

Posted on

bridge57

new AgentBuilder.Default()
    .disableClassFormatChanges()
    .with(AgentBuilder.RedefinitionStrategy.RETRANSFORMATION)
    .type(typeDescription -> targetClassSet.contains(typeDescription.getName()))
    .transform((b, td, cl, m) -> 
        b.method(ElementMatchers.any()
                .and(ElementMatchers.not(ElementMatchers.isAbstract()))
                .and(ElementMatchers.not(ElementMatchers.isNative())))
         .intercept(Advice.to(ProfilerAdvice.class).inline(false))
    )
    .installOn(inst);
Enter fullscreen mode Exit fullscreen mode

Top comments (0)