new AgentBuilder.Default()
.ignore(ElementMatchers.none())
.with(AgentBuilder.RedefinitionStrategy.RETRANSFORMATION)
.with(AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.INSTANCE)
.with(AgentBuilder.TypeStrategy.Default.REDEFINE)
.with(AgentBuilder.InitializationStrategy.NoOp.INSTANCE)
.with(AgentBuilder.Listener.StreamWriting.toSystemOut())
.type(ElementMatchers.nameStartsWith("your.package"))
.transform((builder, td, cl, module) ->
builder.visit(Advice.to(ProfilerAdvice.class)
.on(ElementMatchers.isMethod()
.and(ElementMatchers.not(ElementMatchers.isAbstract()))
.and(ElementMatchers.not(ElementMatchers.isNative()))))
)
.installOn(inst);
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)