繁体   English   中英

类型AgentBuilder.Default ByteBuddy的未定义方法

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM