|
|
9695710 |
From e62e47e891b9f14c612b0176d735b2a66b0217dc Mon Sep 17 00:00:00 2001
|
|
|
695e146 |
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
|
|
695e146 |
Date: Fri, 21 Nov 2014 09:39:00 +0100
|
|
|
695e146 |
Subject: [PATCH 1/4] Unshade ASM
|
|
|
695e146 |
|
|
|
695e146 |
---
|
|
|
695e146 |
pom.xml | 23 ------------
|
|
|
695e146 |
xbean-finder/pom.xml | 5 ---
|
|
|
9695710 |
.../org/apache/xbean/finder/AbstractFinder.java | 31 ++++++++--------
|
|
|
695e146 |
.../org/apache/xbean/finder/AnnotationFinder.java | 43 +++++++++++-----------
|
|
|
695e146 |
xbean-reflect/pom.xml | 13 -------
|
|
|
695e146 |
.../xbean/recipe/AsmParameterNameLoader.java | 6 ++-
|
|
|
695e146 |
.../org/apache/xbean/recipe/ReflectionUtil.java | 8 +---
|
|
|
695e146 |
.../xbean/recipe/XbeanAsmParameterNameLoader.java | 18 +++++----
|
|
|
9695710 |
8 files changed, 53 insertions(+), 94 deletions(-)
|
|
|
695e146 |
|
|
|
695e146 |
diff --git a/pom.xml b/pom.xml
|
|
|
695e146 |
index dd4d7ee..0c17645 100644
|
|
|
695e146 |
--- a/pom.xml
|
|
|
695e146 |
+++ b/pom.xml
|
|
|
695e146 |
@@ -217,26 +217,6 @@
|
|
|
695e146 |
<artifactId>xbean-telnet</artifactId>
|
|
|
695e146 |
<version>${project.version}</version>
|
|
|
695e146 |
</dependency>
|
|
|
695e146 |
- <dependency>
|
|
|
695e146 |
- <groupId>org.apache.xbean</groupId>
|
|
|
695e146 |
- <artifactId>xbean-asm-shaded</artifactId>
|
|
|
695e146 |
- <version>${project.version}</version>
|
|
|
695e146 |
- </dependency>
|
|
|
695e146 |
- <dependency>
|
|
|
695e146 |
- <groupId>org.apache.xbean</groupId>
|
|
|
695e146 |
- <artifactId>xbean-asm5-shaded</artifactId>
|
|
|
695e146 |
- <version>${project.version}</version>
|
|
|
695e146 |
- </dependency>
|
|
|
695e146 |
- <dependency>
|
|
|
695e146 |
- <groupId>org.apache.xbean</groupId>
|
|
|
695e146 |
- <artifactId>xbean-asm-util</artifactId>
|
|
|
695e146 |
- <version>${project.version}</version>
|
|
|
695e146 |
- </dependency>
|
|
|
695e146 |
- <dependency>
|
|
|
695e146 |
- <groupId>org.apache.xbean</groupId>
|
|
|
695e146 |
- <artifactId>xbean-finder-shaded</artifactId>
|
|
|
695e146 |
- <version>${project.version}</version>
|
|
|
695e146 |
- </dependency>
|
|
|
695e146 |
|
|
|
695e146 |
|
|
|
695e146 |
|
|
|
695e146 |
@@ -412,7 +392,6 @@
|
|
|
695e146 |
<module>xbean-classloader</module>
|
|
|
695e146 |
<module>xbean-classpath</module>
|
|
|
695e146 |
<module>xbean-bundleutils</module>
|
|
|
695e146 |
- <module>xbean-asm-util</module>
|
|
|
695e146 |
<module>xbean-finder</module>
|
|
|
695e146 |
<module>xbean-naming</module>
|
|
|
695e146 |
<module>xbean-reflect</module>
|
|
|
695e146 |
@@ -420,8 +399,6 @@
|
|
|
695e146 |
<module>xbean-spring</module>
|
|
|
695e146 |
<module>xbean-telnet</module>
|
|
|
695e146 |
<module>maven-xbean-plugin</module>
|
|
|
695e146 |
- <module>xbean-asm5-shaded</module>
|
|
|
695e146 |
- <module>xbean-finder-shaded</module>
|
|
|
695e146 |
</modules>
|
|
|
695e146 |
|
|
|
695e146 |
<reporting>
|
|
|
695e146 |
diff --git a/xbean-finder/pom.xml b/xbean-finder/pom.xml
|
|
|
695e146 |
index 6048ac3..4f20b5f 100644
|
|
|
695e146 |
--- a/xbean-finder/pom.xml
|
|
|
695e146 |
+++ b/xbean-finder/pom.xml
|
|
|
695e146 |
@@ -58,11 +58,6 @@
|
|
|
695e146 |
<version>4.3.1</version>
|
|
|
695e146 |
<scope>provided</scope>
|
|
|
695e146 |
</dependency>
|
|
|
695e146 |
- <dependency>
|
|
|
695e146 |
- <groupId>org.apache.xbean</groupId>
|
|
|
695e146 |
- <artifactId>xbean-asm-util</artifactId>
|
|
|
695e146 |
- <version>${project.version}</version>
|
|
|
695e146 |
- </dependency>
|
|
|
695e146 |
</dependencies>
|
|
|
695e146 |
<build>
|
|
|
695e146 |
<plugins>
|
|
|
695e146 |
diff --git a/xbean-finder/src/main/java/org/apache/xbean/finder/AbstractFinder.java b/xbean-finder/src/main/java/org/apache/xbean/finder/AbstractFinder.java
|
|
|
9695710 |
index 8beb72b..3639bee 100644
|
|
|
695e146 |
--- a/xbean-finder/src/main/java/org/apache/xbean/finder/AbstractFinder.java
|
|
|
695e146 |
+++ b/xbean-finder/src/main/java/org/apache/xbean/finder/AbstractFinder.java
|
|
|
695e146 |
@@ -34,10 +34,10 @@ import java.util.HashMap;
|
|
|
695e146 |
import java.util.List;
|
|
|
695e146 |
import java.util.Map;
|
|
|
695e146 |
|
|
|
695e146 |
-import org.apache.xbean.asm5.original.commons.EmptyVisitor;
|
|
|
695e146 |
import org.apache.xbean.finder.util.SingleLinkedList;
|
|
|
695e146 |
import org.objectweb.asm.AnnotationVisitor;
|
|
|
695e146 |
import org.objectweb.asm.ClassReader;
|
|
|
695e146 |
+import org.objectweb.asm.ClassVisitor;
|
|
|
695e146 |
import org.objectweb.asm.FieldVisitor;
|
|
|
695e146 |
import org.objectweb.asm.MethodVisitor;
|
|
|
695e146 |
import org.objectweb.asm.Opcodes;
|
|
|
695e146 |
@@ -908,15 +908,17 @@ public abstract class AbstractFinder implements IAnnotationFinder {
|
|
|
695e146 |
}
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
- public class InfoBuildingVisitor extends EmptyVisitor {
|
|
|
695e146 |
+ public class InfoBuildingVisitor extends ClassVisitor {
|
|
|
695e146 |
private Info info;
|
|
|
695e146 |
private String path;
|
|
|
695e146 |
|
|
|
695e146 |
public InfoBuildingVisitor(String path) {
|
|
|
695e146 |
+ super(Opcodes.ASM5);
|
|
|
695e146 |
this.path = path;
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
public InfoBuildingVisitor(Info info) {
|
|
|
695e146 |
+ super(Opcodes.ASM5);
|
|
|
695e146 |
this.info = info;
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
@@ -949,7 +951,7 @@ public abstract class AbstractFinder implements IAnnotationFinder {
|
|
|
695e146 |
AnnotationInfo annotationInfo = new AnnotationInfo(desc);
|
|
|
695e146 |
info.getAnnotations().add(annotationInfo);
|
|
|
695e146 |
getAnnotationInfos(annotationInfo.getName()).add(info);
|
|
|
695e146 |
- return new InfoBuildingVisitor(annotationInfo).annotationVisitor();
|
|
|
695e146 |
+ return null;
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
@Override
|
|
|
9695710 |
@@ -957,24 +959,23 @@ public abstract class AbstractFinder implements IAnnotationFinder {
|
|
|
695e146 |
ClassInfo classInfo = ((ClassInfo) info);
|
|
|
695e146 |
FieldInfo fieldInfo = new FieldInfo(classInfo, name, desc);
|
|
|
695e146 |
classInfo.getFields().add(fieldInfo);
|
|
|
695e146 |
- return new InfoBuildingVisitor(fieldInfo).fieldVisitor();
|
|
|
695e146 |
+ return null;
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
@Override
|
|
|
9695710 |
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
|
|
695e146 |
ClassInfo classInfo = ((ClassInfo) info);
|
|
|
9695710 |
- MethodInfo methodInfo = new MethodInfo(classInfo, name, desc);
|
|
|
9695710 |
+ final MethodInfo methodInfo = new MethodInfo(classInfo, name, desc);
|
|
|
695e146 |
classInfo.getMethods().add(methodInfo);
|
|
|
695e146 |
- return new InfoBuildingVisitor(methodInfo).methodVisitor();
|
|
|
695e146 |
- }
|
|
|
695e146 |
-
|
|
|
695e146 |
- @Override
|
|
|
695e146 |
- public AnnotationVisitor visitMethodParameterAnnotation(int param, String desc, boolean visible) {
|
|
|
695e146 |
- MethodInfo methodInfo = ((MethodInfo) info);
|
|
|
695e146 |
- List<AnnotationInfo> annotationInfos = methodInfo.getParameterAnnotations(param);
|
|
|
695e146 |
- AnnotationInfo annotationInfo = new AnnotationInfo(desc);
|
|
|
695e146 |
- annotationInfos.add(annotationInfo);
|
|
|
695e146 |
- return new InfoBuildingVisitor(annotationInfo).annotationVisitor();
|
|
|
695e146 |
+ return new MethodVisitor(Opcodes.ASM5) {
|
|
|
695e146 |
+ @Override
|
|
|
695e146 |
+ public AnnotationVisitor visitParameterAnnotation(int param, String desc, boolean visible) {
|
|
|
695e146 |
+ List<AnnotationInfo> annotationInfos = methodInfo.getParameterAnnotations(param);
|
|
|
695e146 |
+ AnnotationInfo annotationInfo = new AnnotationInfo(desc);
|
|
|
695e146 |
+ annotationInfos.add(annotationInfo);
|
|
|
695e146 |
+ return null;
|
|
|
695e146 |
+ }
|
|
|
695e146 |
+ };
|
|
|
695e146 |
}
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
diff --git a/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java b/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
|
|
|
695e146 |
index ea96d78..48b2262 100644
|
|
|
695e146 |
--- a/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
|
|
|
695e146 |
+++ b/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
|
|
|
695e146 |
@@ -20,13 +20,13 @@
|
|
|
695e146 |
|
|
|
695e146 |
package org.apache.xbean.finder;
|
|
|
695e146 |
|
|
|
695e146 |
-import org.apache.xbean.asm5.original.commons.EmptyVisitor;
|
|
|
695e146 |
import org.apache.xbean.finder.archive.Archive;
|
|
|
695e146 |
import org.apache.xbean.finder.util.Classes;
|
|
|
695e146 |
import org.apache.xbean.finder.util.SingleLinkedList;
|
|
|
695e146 |
import org.objectweb.asm.AnnotationVisitor;
|
|
|
695e146 |
import org.objectweb.asm.Attribute;
|
|
|
695e146 |
import org.objectweb.asm.ClassReader;
|
|
|
695e146 |
+import org.objectweb.asm.ClassVisitor;
|
|
|
695e146 |
import org.objectweb.asm.FieldVisitor;
|
|
|
695e146 |
import org.objectweb.asm.MethodVisitor;
|
|
|
695e146 |
import org.objectweb.asm.Opcodes;
|
|
|
695e146 |
@@ -1755,13 +1755,15 @@ public class AnnotationFinder implements IAnnotationFinder {
|
|
|
695e146 |
initAnnotationInfos(annotationInfo.getName()).add(info);
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
- public class InfoBuildingVisitor extends EmptyVisitor {
|
|
|
695e146 |
+ public class InfoBuildingVisitor extends ClassVisitor {
|
|
|
695e146 |
private Info info;
|
|
|
695e146 |
|
|
|
695e146 |
public InfoBuildingVisitor() {
|
|
|
695e146 |
+ super(Opcodes.ASM5);
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
public InfoBuildingVisitor(Info info) {
|
|
|
695e146 |
+ super(Opcodes.ASM5);
|
|
|
695e146 |
this.info = info;
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
@@ -1809,7 +1811,7 @@ public class AnnotationFinder implements IAnnotationFinder {
|
|
|
695e146 |
AnnotationInfo annotationInfo = new AnnotationInfo(desc);
|
|
|
695e146 |
info.getAnnotations().add(annotationInfo);
|
|
|
695e146 |
index(annotationInfo, info);
|
|
|
695e146 |
- return new InfoBuildingVisitor(annotationInfo).annotationVisitor();
|
|
|
695e146 |
+ return null;
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
@Override
|
|
|
695e146 |
@@ -1817,32 +1819,31 @@ public class AnnotationFinder implements IAnnotationFinder {
|
|
|
695e146 |
ClassInfo classInfo = ((ClassInfo) info);
|
|
|
695e146 |
FieldInfo fieldInfo = new FieldInfo(classInfo, name, desc);
|
|
|
695e146 |
classInfo.getFields().add(fieldInfo);
|
|
|
695e146 |
- return new InfoBuildingVisitor(fieldInfo).fieldVisitor();
|
|
|
695e146 |
+ return null;
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
@Override
|
|
|
695e146 |
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
|
|
695e146 |
ClassInfo classInfo = ((ClassInfo) info);
|
|
|
695e146 |
- MethodInfo methodInfo = new MethodInfo(classInfo, name, desc);
|
|
|
695e146 |
+ final MethodInfo methodInfo = new MethodInfo(classInfo, name, desc);
|
|
|
695e146 |
|
|
|
695e146 |
classInfo.getMethods().add(methodInfo);
|
|
|
695e146 |
- return new InfoBuildingVisitor(methodInfo).methodVisitor();
|
|
|
695e146 |
+ return new MethodVisitor(Opcodes.ASM5) {
|
|
|
695e146 |
+ @Override
|
|
|
695e146 |
+ public AnnotationVisitor visitParameterAnnotation(int param, String desc, boolean visible) {
|
|
|
695e146 |
+ List<AnnotationInfo> annotationInfos = methodInfo.getParameterAnnotations(param);
|
|
|
695e146 |
+ AnnotationInfo annotationInfo = new AnnotationInfo(desc);
|
|
|
695e146 |
+ annotationInfos.add(annotationInfo);
|
|
|
695e146 |
+
|
|
|
695e146 |
+ ParameterInfo parameterInfo = new ParameterInfo(methodInfo, param);
|
|
|
695e146 |
+ methodInfo.getParameters().add(parameterInfo);
|
|
|
695e146 |
+ index(annotationInfo, parameterInfo);
|
|
|
695e146 |
+
|
|
|
695e146 |
+ return null;
|
|
|
695e146 |
+ }
|
|
|
695e146 |
+ };
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
-
|
|
|
695e146 |
- @Override
|
|
|
695e146 |
- public AnnotationVisitor visitMethodParameterAnnotation(int param, String desc, boolean visible) {
|
|
|
695e146 |
- MethodInfo methodInfo = ((MethodInfo) info);
|
|
|
695e146 |
- List<AnnotationInfo> annotationInfos = methodInfo.getParameterAnnotations(param);
|
|
|
695e146 |
- AnnotationInfo annotationInfo = new AnnotationInfo(desc);
|
|
|
695e146 |
- annotationInfos.add(annotationInfo);
|
|
|
695e146 |
-
|
|
|
695e146 |
- ParameterInfo parameterInfo = new ParameterInfo(methodInfo, param);
|
|
|
695e146 |
- methodInfo.getParameters().add(parameterInfo);
|
|
|
695e146 |
- index(annotationInfo, parameterInfo);
|
|
|
695e146 |
-
|
|
|
695e146 |
- return new InfoBuildingVisitor(annotationInfo).annotationVisitor();
|
|
|
695e146 |
- }
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
public static class GenericAwareInfoBuildingVisitor extends SignatureVisitor {
|
|
|
695e146 |
@@ -2007,4 +2008,4 @@ public class AnnotationFinder implements IAnnotationFinder {
|
|
|
695e146 |
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
-}
|
|
|
695e146 |
\ No newline at end of file
|
|
|
695e146 |
+}
|
|
|
695e146 |
diff --git a/xbean-reflect/pom.xml b/xbean-reflect/pom.xml
|
|
|
695e146 |
index e9e51c7..0b80389 100644
|
|
|
695e146 |
--- a/xbean-reflect/pom.xml
|
|
|
695e146 |
+++ b/xbean-reflect/pom.xml
|
|
|
695e146 |
@@ -47,19 +47,6 @@
|
|
|
695e146 |
<optional>true</optional>
|
|
|
695e146 |
</dependency>
|
|
|
695e146 |
<dependency>
|
|
|
695e146 |
- <groupId>org.apache.xbean</groupId>
|
|
|
695e146 |
- <artifactId>xbean-asm-util</artifactId>
|
|
|
695e146 |
- <scope>provided</scope>
|
|
|
695e146 |
- <optional>true</optional>
|
|
|
695e146 |
- </dependency>
|
|
|
695e146 |
- <dependency>
|
|
|
695e146 |
- <groupId>org.apache.xbean</groupId>
|
|
|
695e146 |
- <artifactId>xbean-asm5-shaded</artifactId>
|
|
|
695e146 |
- <version>${project.version}</version>
|
|
|
695e146 |
- <scope>provided</scope>
|
|
|
695e146 |
- <optional>true</optional>
|
|
|
695e146 |
- </dependency>
|
|
|
695e146 |
- <dependency>
|
|
|
695e146 |
<groupId>log4j</groupId>
|
|
|
695e146 |
<artifactId>log4j</artifactId>
|
|
|
695e146 |
<version>1.2.12</version>
|
|
|
695e146 |
diff --git a/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java b/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java
|
|
|
695e146 |
index 6859cad..f513b77 100644
|
|
|
695e146 |
--- a/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java
|
|
|
695e146 |
+++ b/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java
|
|
|
695e146 |
@@ -17,8 +17,8 @@
|
|
|
695e146 |
*/
|
|
|
695e146 |
package org.apache.xbean.recipe;
|
|
|
695e146 |
|
|
|
695e146 |
-import org.apache.xbean.asm5.original.commons.EmptyVisitor;
|
|
|
695e146 |
import org.objectweb.asm.ClassReader;
|
|
|
695e146 |
+import org.objectweb.asm.ClassVisitor;
|
|
|
695e146 |
import org.objectweb.asm.Label;
|
|
|
695e146 |
import org.objectweb.asm.MethodVisitor;
|
|
|
695e146 |
import org.objectweb.asm.Opcodes;
|
|
|
695e146 |
@@ -211,7 +211,7 @@ public class AsmParameterNameLoader implements ParameterNameLoader {
|
|
|
695e146 |
}
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
- private static class AllParameterNamesDiscoveringVisitor extends EmptyVisitor {
|
|
|
695e146 |
+ private static class AllParameterNamesDiscoveringVisitor extends ClassVisitor {
|
|
|
695e146 |
private final Map<Constructor,List<String>> constructorParameters = new HashMap<Constructor,List<String>>();
|
|
|
695e146 |
private final Map<Method,List<String>> methodParameters = new HashMap<Method,List<String>>();
|
|
|
695e146 |
private final Map<String,Exception> exceptions = new HashMap<String,Exception>();
|
|
|
695e146 |
@@ -220,6 +220,7 @@ public class AsmParameterNameLoader implements ParameterNameLoader {
|
|
|
695e146 |
private final Map<String,Constructor> constructorMap = new HashMap<String,Constructor>();
|
|
|
695e146 |
|
|
|
695e146 |
public AllParameterNamesDiscoveringVisitor(Class type, String methodName) {
|
|
|
695e146 |
+ super(Opcodes.ASM5);
|
|
|
695e146 |
this.methodName = methodName;
|
|
|
695e146 |
|
|
|
695e146 |
List<Method> methods = new ArrayList<Method>(Arrays.asList(type.getMethods()));
|
|
|
695e146 |
@@ -232,6 +233,7 @@ public class AsmParameterNameLoader implements ParameterNameLoader {
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
public AllParameterNamesDiscoveringVisitor(Class type) {
|
|
|
695e146 |
+ super(Opcodes.ASM5);
|
|
|
695e146 |
this.methodName = "<init>";
|
|
|
695e146 |
|
|
|
695e146 |
List<Constructor> constructors = new ArrayList<Constructor>(Arrays.asList(type.getConstructors()));
|
|
|
695e146 |
diff --git a/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java b/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java
|
|
|
695e146 |
index 84ded16..39dfd58 100644
|
|
|
695e146 |
--- a/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java
|
|
|
695e146 |
+++ b/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java
|
|
|
695e146 |
@@ -41,13 +41,7 @@ public final class ReflectionUtil {
|
|
|
695e146 |
private static ParameterNameLoader parameterNamesLoader;
|
|
|
695e146 |
|
|
|
695e146 |
static {
|
|
|
695e146 |
- if (isClassAvailable("org.apache.xbean.asm5.ClassReader")) {
|
|
|
695e146 |
- parameterNamesLoader = new XbeanAsmParameterNameLoader();
|
|
|
695e146 |
- } else if (isClassAvailable("org.objectweb.asm.ClassReader")) {
|
|
|
695e146 |
- parameterNamesLoader = new AsmParameterNameLoader();
|
|
|
695e146 |
- } else if (isClassAvailable("org.apache.xbean.asm.ClassReader") || isClassAvailable("org.apache.xbean.asm4.ClassReader")) {
|
|
|
695e146 |
- throw new RuntimeException("Your xbean-asm-shade is too old, please upgrade to xbean-asm5-shade");
|
|
|
695e146 |
- }
|
|
|
695e146 |
+ parameterNamesLoader = new XbeanAsmParameterNameLoader();
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
private ReflectionUtil() {
|
|
|
695e146 |
diff --git a/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java b/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
|
|
|
695e146 |
index 4a89c44..6242dd3 100644
|
|
|
695e146 |
--- a/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
|
|
|
695e146 |
+++ b/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
|
|
|
695e146 |
@@ -17,12 +17,12 @@
|
|
|
695e146 |
*/
|
|
|
695e146 |
package org.apache.xbean.recipe;
|
|
|
695e146 |
|
|
|
695e146 |
-import org.apache.xbean.asm5.shade.commons.EmptyVisitor;
|
|
|
695e146 |
-import org.apache.xbean.asm5.ClassReader;
|
|
|
695e146 |
-import org.apache.xbean.asm5.Label;
|
|
|
695e146 |
-import org.apache.xbean.asm5.MethodVisitor;
|
|
|
695e146 |
-import org.apache.xbean.asm5.Opcodes;
|
|
|
695e146 |
-import org.apache.xbean.asm5.Type;
|
|
|
695e146 |
+import org.objectweb.asm.ClassReader;
|
|
|
695e146 |
+import org.objectweb.asm.ClassVisitor;
|
|
|
695e146 |
+import org.objectweb.asm.Label;
|
|
|
695e146 |
+import org.objectweb.asm.MethodVisitor;
|
|
|
695e146 |
+import org.objectweb.asm.Opcodes;
|
|
|
695e146 |
+import org.objectweb.asm.Type;
|
|
|
695e146 |
|
|
|
695e146 |
import java.io.IOException;
|
|
|
695e146 |
import java.io.InputStream;
|
|
|
695e146 |
@@ -211,7 +211,7 @@ public class XbeanAsmParameterNameLoader implements ParameterNameLoader {
|
|
|
695e146 |
}
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
- private static class AllParameterNamesDiscoveringVisitor extends EmptyVisitor {
|
|
|
695e146 |
+ private static class AllParameterNamesDiscoveringVisitor extends ClassVisitor {
|
|
|
695e146 |
private final Map<Constructor,List<String>> constructorParameters = new HashMap<Constructor,List<String>>();
|
|
|
695e146 |
private final Map<Method,List<String>> methodParameters = new HashMap<Method,List<String>>();
|
|
|
695e146 |
private final Map<String,Exception> exceptions = new HashMap<String,Exception>();
|
|
|
695e146 |
@@ -220,6 +220,7 @@ public class XbeanAsmParameterNameLoader implements ParameterNameLoader {
|
|
|
695e146 |
private final Map<String,Constructor> constructorMap = new HashMap<String,Constructor>();
|
|
|
695e146 |
|
|
|
695e146 |
public AllParameterNamesDiscoveringVisitor(Class type, String methodName) {
|
|
|
695e146 |
+ super(Opcodes.ASM5);
|
|
|
695e146 |
this.methodName = methodName;
|
|
|
695e146 |
|
|
|
695e146 |
List<Method> methods = new ArrayList<Method>(Arrays.asList(type.getMethods()));
|
|
|
695e146 |
@@ -232,6 +233,7 @@ public class XbeanAsmParameterNameLoader implements ParameterNameLoader {
|
|
|
695e146 |
}
|
|
|
695e146 |
|
|
|
695e146 |
public AllParameterNamesDiscoveringVisitor(Class type) {
|
|
|
695e146 |
+ super(Opcodes.ASM5);
|
|
|
695e146 |
this.methodName = "<init>";
|
|
|
695e146 |
|
|
|
695e146 |
List<Constructor> constructors = new ArrayList<Constructor>(Arrays.asList(type.getConstructors()));
|
|
|
695e146 |
@@ -312,4 +314,4 @@ public class XbeanAsmParameterNameLoader implements ParameterNameLoader {
|
|
|
695e146 |
return null;
|
|
|
695e146 |
}
|
|
|
695e146 |
}
|
|
|
695e146 |
-}
|
|
|
695e146 |
\ No newline at end of file
|
|
|
695e146 |
+}
|
|
|
695e146 |
--
|
|
|
9695710 |
2.1.0
|
|
|
695e146 |
|