Merge "Switch RmTypeDefs over to asm v5"
This commit is contained in:
@@ -25,10 +25,6 @@ LOCAL_IS_HOST_MODULE := true
|
|||||||
LOCAL_MODULE_CLASS := EXECUTABLES
|
LOCAL_MODULE_CLASS := EXECUTABLES
|
||||||
LOCAL_MODULE := rmtypedefs
|
LOCAL_MODULE := rmtypedefs
|
||||||
|
|
||||||
#LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
||||||
# asm-tools \
|
|
||||||
# guavalib
|
|
||||||
|
|
||||||
include $(BUILD_SYSTEM)/base_rules.mk
|
include $(BUILD_SYSTEM)/base_rules.mk
|
||||||
|
|
||||||
$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/rmtypedefs$(COMMON_JAVA_PACKAGE_SUFFIX)
|
$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/rmtypedefs$(COMMON_JAVA_PACKAGE_SUFFIX)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ include $(CLEAR_VARS)
|
|||||||
LOCAL_SRC_FILES := $(call all-subdir-java-files)
|
LOCAL_SRC_FILES := $(call all-subdir-java-files)
|
||||||
LOCAL_JAR_MANIFEST := ../etc/manifest.txt
|
LOCAL_JAR_MANIFEST := ../etc/manifest.txt
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
LOCAL_STATIC_JAVA_LIBRARIES := \
|
||||||
asm-tools \
|
asm-5.0 \
|
||||||
guava-tools
|
guava-tools
|
||||||
|
|
||||||
LOCAL_MODULE:= rmtypedefs
|
LOCAL_MODULE:= rmtypedefs
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import static org.objectweb.asm.Opcodes.ASM4;
|
import static org.objectweb.asm.Opcodes.ASM5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds and deletes typedef annotation classes (and also warns if their
|
* Finds and deletes typedef annotation classes (and also warns if their
|
||||||
@@ -207,8 +207,8 @@ public class RmTypeDefs {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
ClassWriter classWriter = new ClassWriter(ASM4);
|
ClassWriter classWriter = new ClassWriter(ASM5);
|
||||||
ClassVisitor classVisitor = new ClassVisitor(ASM4, classWriter) {
|
ClassVisitor classVisitor = new ClassVisitor(ASM5, classWriter) {
|
||||||
@Override
|
@Override
|
||||||
public void visitInnerClass(String name, String outerName, String innerName,
|
public void visitInnerClass(String name, String outerName, String innerName,
|
||||||
int access) {
|
int access) {
|
||||||
@@ -276,7 +276,7 @@ public class RmTypeDefs {
|
|||||||
private boolean mSourceRetention;
|
private boolean mSourceRetention;
|
||||||
|
|
||||||
public TypeDefVisitor(File file) {
|
public TypeDefVisitor(File file) {
|
||||||
super(ASM4);
|
super(ASM5);
|
||||||
mFile = file;
|
mFile = file;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,7 +299,7 @@ public class RmTypeDefs {
|
|||||||
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
|
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
|
||||||
mTypedef = desc.equals(INT_DEF_DESC) || desc.equals(STRING_DEF_DESC);
|
mTypedef = desc.equals(INT_DEF_DESC) || desc.equals(STRING_DEF_DESC);
|
||||||
if (desc.equals(RETENTION_DESC)) {
|
if (desc.equals(RETENTION_DESC)) {
|
||||||
return new AnnotationVisitor(ASM4) {
|
return new AnnotationVisitor(ASM5) {
|
||||||
public void visitEnum(String name, String desc, String value) {
|
public void visitEnum(String name, String desc, String value) {
|
||||||
if (desc.equals(RETENTION_POLICY_DESC)) {
|
if (desc.equals(RETENTION_POLICY_DESC)) {
|
||||||
mSourceRetention = SOURCE_RETENTION_VALUE.equals(value);
|
mSourceRetention = SOURCE_RETENTION_VALUE.equals(value);
|
||||||
|
|||||||
Reference in New Issue
Block a user