本文整理汇总了Java中org.objectweb.asm.commons.RemappingAnnotationAdapter类的典型用法代码示例。如果您正苦于以下问题:Java RemappingAnnotationAdapter类的具体用法?Java RemappingAnnotationAdapter怎么用?Java RemappingAnnotationAdapter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RemappingAnnotationAdapter类属于org.objectweb.asm.commons包,在下文中一共展示了RemappingAnnotationAdapter类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitAnnotation
import org.objectweb.asm.commons.RemappingAnnotationAdapter; //导入依赖的package包/类
@Override
public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
AnnotationVisitor av = super.visitAnnotation(remapper.mapDesc(desc), visible);
return av == null ? null : new RemappingAnnotationAdapter(av, remapper) {
@Override
public void visitEnum(String name, String enumDesc, String value) {
if (Type.getType(enumDesc).getClassName().equals(RedefinitionPolicy.class.getName())) {
RedefinitionPolicy valueAsEnum = RedefinitionPolicy.valueOf(value);
if (Type.getType(desc).getClassName().equals(FieldRedefinitionPolicy.class.getName())) {
cv.visitAttribute(new SingleByteAttribute(FieldRedefinitionPolicy.class.getSimpleName(), (byte) valueAsEnum.ordinal()));
}
if (Type.getType(desc).getClassName().equals(MethodRedefinitionPolicy.class.getName())) {
cv.visitAttribute(new SingleByteAttribute(MethodRedefinitionPolicy.class.getSimpleName(), (byte) valueAsEnum.ordinal()));
}
}
super.visitEnum(name, desc, value);
}
};
}
示例2: visitAnnotation
import org.objectweb.asm.commons.RemappingAnnotationAdapter; //导入依赖的package包/类
@Override
public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
AnnotationVisitor av = super.visitAnnotation(remapper.mapDesc(desc), visible);
return av == null ? null : new RemappingAnnotationAdapter(av, remapper) {
@Override
public void visitEnum(String name, String enumDesc, String value) {
if (Type.getType(enumDesc).getClassName().equals(RedefinitionPolicy.class.getName())) {
RedefinitionPolicy valueAsEnum = RedefinitionPolicy.valueOf(value);
if (Type.getType(desc).getClassName().equals(FieldRedefinitionPolicy.class.getName())) {
cv.visitAttribute(new SingleByteAttribute(FieldRedefinitionPolicy.class.getSimpleName(),
(byte) valueAsEnum.ordinal()));
}
if (Type.getType(desc).getClassName().equals(MethodRedefinitionPolicy.class.getName())) {
cv.visitAttribute(new SingleByteAttribute(MethodRedefinitionPolicy.class.getSimpleName(),
(byte) valueAsEnum.ordinal()));
}
}
super.visitEnum(name, desc, value);
}
};
}
示例3: visitAnnotationDefault
import org.objectweb.asm.commons.RemappingAnnotationAdapter; //导入依赖的package包/类
@Override
public AnnotationVisitor visitAnnotationDefault() {
AnnotationVisitor av = super.visitAnnotationDefault();
return av == null ? null : new RemappingAnnotationAdapter(av, remapper);
}
示例4: visitAnnotation
import org.objectweb.asm.commons.RemappingAnnotationAdapter; //导入依赖的package包/类
@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
AnnotationVisitor av = super.visitAnnotation(remapper.mapDesc(desc),
visible);
return av == null ? null : new RemappingAnnotationAdapter(av, remapper);
}
示例5: visitTypeAnnotation
import org.objectweb.asm.commons.RemappingAnnotationAdapter; //导入依赖的package包/类
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) {
AnnotationVisitor av = super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(desc), visible);
return av == null ? null : new RemappingAnnotationAdapter(av, remapper);
}
示例6: visitParameterAnnotation
import org.objectweb.asm.commons.RemappingAnnotationAdapter; //导入依赖的package包/类
@Override
public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) {
AnnotationVisitor av = super.visitParameterAnnotation(parameter, remapper.mapDesc(desc), visible);
return av == null ? null : new RemappingAnnotationAdapter(av, remapper);
}
示例7: visitInsnAnnotation
import org.objectweb.asm.commons.RemappingAnnotationAdapter; //导入依赖的package包/类
@Override
public AnnotationVisitor visitInsnAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) {
AnnotationVisitor av = super.visitInsnAnnotation(typeRef, typePath, remapper.mapDesc(desc), visible);
return av == null ? null : new RemappingAnnotationAdapter(av, remapper);
}
示例8: visitTryCatchAnnotation
import org.objectweb.asm.commons.RemappingAnnotationAdapter; //导入依赖的package包/类
@Override
public AnnotationVisitor visitTryCatchAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) {
AnnotationVisitor av = super.visitTryCatchAnnotation(typeRef, typePath, remapper.mapDesc(desc), visible);
return av == null ? null : new RemappingAnnotationAdapter(av, remapper);
}
示例9: visitLocalVariableAnnotation
import org.objectweb.asm.commons.RemappingAnnotationAdapter; //导入依赖的package包/类
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef, TypePath typePath, Label[] start, Label[] end, int[] index, String desc, boolean visible) {
AnnotationVisitor av = super.visitLocalVariableAnnotation(typeRef, typePath, start, end, index, remapper.mapDesc(desc), visible);
return av == null ? null : new RemappingAnnotationAdapter(av, remapper);
}