Код: Выделить всё
new AgentBuilder.Default()
.type(TypeMatchers.create(Configuration.getInstance()))
.transform((builder, typeDescription, classLoader, module, protectionDomain) -> {
try {
AnnotationDescription digmaMarkerAnnotationDescription = getDigmaMarkerAnnotationDescription();
return builder
.visit(new MemberAttributeExtension.ForMethod()
.annotateMethod(digmaMarkerAnnotationDescription)
.on(MethodMatchers.create(typeDescription, Configuration.getInstance())));
} catch (Throwable e) {
Log.error("got exception in bytebuddy transformer", e);
return builder;
}
}).installOn(inst);
есть идеи?
Подробнее здесь: https://stackoverflow.com/questions/786 ... ransformer
Мобильная версия