![](/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.