0

The method rebase(( type) -> {}) is undefined for the type AgentBuilder.Default

public static void premain(String arg, Instrumentation inst){
    new AgentBuilder.Default()
                    .rebase(type -> type.getSimpleName().equals("Calculator"))
                    .transform((builder, typeDescription) -> builder
                            .method(method -> method.getDeclaredAnnotations()
                            .isAnnotationPresent(Log.class))
                            .intercept(MethodDelegation.to(LogAspect.class)))
                    .installOn(inst);
}
codejava
  • 13
  • 6

1 Answers1

0

You probably picked up an outdated API. The step is called type. Your IDE can probably help you here.

Rafael Winterhalter
  • 42,759
  • 13
  • 108
  • 192