![](/img/trans.png)
[英]Bytebuddy Java Agent: AgentBuilder affects control flow of a second, unrelated AgentBuilder
[英]Undefined Method for the type AgentBuilder.Default ByteBuddy
对于类型AgentBuilder.Default,未定义方法rebase((type)-> {})。
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);
}
您可能选择了过时的API。 该步骤称为类型。 您的IDE可能会在这里为您提供帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.