当前位置: 首页>>代码示例>>Java>>正文


Java RemappingAnnotationAdapter类代码示例

本文整理汇总了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);
        }
    };
}
 
开发者ID:erkieh,项目名称:proxyhotswap,代码行数:20,代码来源:TestClassAdapter.java

示例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);
		}
	};
}
 
开发者ID:HotswapProjects,项目名称:HotswapAgent,代码行数:22,代码来源:TestClassAdapter.java

示例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);
}
 
开发者ID:SquidDev,项目名称:Patcher,代码行数:6,代码来源:ImprovedRemappingClassAdapter.java

示例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);
}
 
开发者ID:SquidDev,项目名称:Patcher,代码行数:7,代码来源:ImprovedRemappingClassAdapter.java

示例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);
}
 
开发者ID:SquidDev,项目名称:Patcher,代码行数:6,代码来源:ImprovedRemappingClassAdapter.java

示例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);
}
 
开发者ID:SquidDev,项目名称:Patcher,代码行数:6,代码来源:ImprovedRemappingClassAdapter.java

示例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);
}
 
开发者ID:SquidDev,项目名称:Patcher,代码行数:6,代码来源:ImprovedRemappingClassAdapter.java

示例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);
}
 
开发者ID:SquidDev,项目名称:Patcher,代码行数:6,代码来源:ImprovedRemappingClassAdapter.java

示例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);
}
 
开发者ID:SquidDev,项目名称:Patcher,代码行数:6,代码来源:ImprovedRemappingClassAdapter.java


注:本文中的org.objectweb.asm.commons.RemappingAnnotationAdapter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。