本文整理汇总了Java中net.bytebuddy.asm.Advice.WithCustomMapping方法的典型用法代码示例。如果您正苦于以下问题:Java Advice.WithCustomMapping方法的具体用法?Java Advice.WithCustomMapping怎么用?Java Advice.WithCustomMapping使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.bytebuddy.asm.Advice
的用法示例。
在下文中一共展示了Advice.WithCustomMapping方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ForAdvice
import net.bytebuddy.asm.Advice; //导入方法依赖的package包/类
/**
* Creates a new advice transformer.
*
* @param advice The configured advice to use.
* @param exceptionHandler The exception handler to use.
* @param assigner The assigner to use.
* @param classFileLocator The class file locator to use.
* @param poolStrategy The pool strategy to use for looking up an advice.
* @param locationStrategy The location strategy to use for class loaders when resolving advice classes.
* @param entries The advice entries to apply.
*/
protected ForAdvice(Advice.WithCustomMapping advice,
StackManipulation exceptionHandler,
Assigner assigner,
ClassFileLocator classFileLocator,
PoolStrategy poolStrategy,
LocationStrategy locationStrategy,
List<Entry> entries) {
this.advice = advice;
this.exceptionHandler = exceptionHandler;
this.assigner = assigner;
this.classFileLocator = classFileLocator;
this.poolStrategy = poolStrategy;
this.locationStrategy = locationStrategy;
this.entries = entries;
}
示例2: registerDynamicValues
import net.bytebuddy.asm.Advice; //导入方法依赖的package包/类
private Advice.WithCustomMapping registerDynamicValues() {
List<Advice.OffsetMapping.Factory<? extends Annotation>> offsetMappingFactories = getOffsetMappingFactories();
Advice.WithCustomMapping withCustomMapping = Advice.withCustomMapping();
for (Advice.OffsetMapping.Factory<? extends Annotation> offsetMappingFactory : offsetMappingFactories) {
withCustomMapping = withCustomMapping.bind((Advice.OffsetMapping.Factory<? super Annotation>) offsetMappingFactory);
}
return withCustomMapping;
}
示例3: resolve
import net.bytebuddy.asm.Advice; //导入方法依赖的package包/类
@Override
protected Advice resolve(Advice.WithCustomMapping advice, TypePool typePool, ClassFileLocator classFileLocator) {
return advice.to(typePool.describe(name).resolve(), classFileLocator);
}