new AgentBuilder.Default()
// 1. CRITICAL: This allows ByteBuddy to modify classes already in the JVM memory
.with(AgentBuilder.RedefinitionStrategy.RETRANSFORMATION)
// 2. Optional: Helps troubleshoot why some classes might be skipped
.with(AgentBuilder.Listener.StreamWriting.toSystemOut())
.type(typeDescription -> targetClassSet.contains(typeDescription.getName()))
.transform((builder, typeDescription, classLoader, module) ->
builder.method(ElementMatchers.any()
.and(ElementMatchers.not(ElementMatchers.isAbstract()))
.and(ElementMatchers.not(ElementMatchers.isNative())))
.intercept(Advice.to(ProfilerAdvice.class))
)
.installOn(inst);
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)