geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1486553 - in /geronimo/xbean/trunk: ./ xbean-asm-util/ xbean-asm-util/src/ xbean-asm-util/src/main/ xbean-asm-util/src/main/java/ xbean-asm-util/src/main/java/org/ xbean-asm-util/src/main/java/org/apache/ xbean-asm-util/src/main/java/org/a...
Date Mon, 27 May 2013 09:50:30 GMT
Author: rmannibucau
Date: Mon May 27 09:50:29 2013
New Revision: 1486553

URL: http://svn.apache.org/r1486553
Log:
XBEAN-249 updating xbean to asm4 xbean-finder too

Added:
    geronimo/xbean/trunk/xbean-asm-util/
    geronimo/xbean/trunk/xbean-asm-util/pom.xml
    geronimo/xbean/trunk/xbean-asm-util/src/
    geronimo/xbean/trunk/xbean-asm-util/src/main/
    geronimo/xbean/trunk/xbean-asm-util/src/main/java/
    geronimo/xbean/trunk/xbean-asm-util/src/main/java/org/
    geronimo/xbean/trunk/xbean-asm-util/src/main/java/org/apache/
    geronimo/xbean/trunk/xbean-asm-util/src/main/java/org/apache/xbean/
    geronimo/xbean/trunk/xbean-asm-util/src/main/java/org/apache/xbean/asm4/
    geronimo/xbean/trunk/xbean-asm-util/src/main/java/org/apache/xbean/asm4/original/
    geronimo/xbean/trunk/xbean-asm-util/src/main/java/org/apache/xbean/asm4/original/commons/
    geronimo/xbean/trunk/xbean-asm-util/src/main/java/org/apache/xbean/asm4/original/commons/EmptyVisitor.java
Removed:
    geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/asm4/
Modified:
    geronimo/xbean/trunk/pom.xml
    geronimo/xbean/trunk/xbean-asm4-shaded/pom.xml
    geronimo/xbean/trunk/xbean-finder-shaded/pom.xml
    geronimo/xbean/trunk/xbean-finder/pom.xml
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AbstractFinder.java
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
    geronimo/xbean/trunk/xbean-reflect/pom.xml
    geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java
    geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java

Modified: geronimo/xbean/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/pom.xml?rev=1486553&r1=1486552&r2=1486553&view=diff
==============================================================================
--- geronimo/xbean/trunk/pom.xml (original)
+++ geronimo/xbean/trunk/pom.xml Mon May 27 09:50:29 2013
@@ -220,11 +220,16 @@
                 <artifactId>xbean-asm-shaded</artifactId>
                 <version>${project.version}</version>
             </dependency>
-          <dependency>
-            <groupId>org.apache.xbean</groupId>
-            <artifactId>xbean-asm4-shaded</artifactId>
-            <version>${project.version}</version>
-          </dependency>
+            <dependency>
+                <groupId>org.apache.xbean</groupId>
+                <artifactId>xbean-asm4-shaded</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.xbean</groupId>
+                <artifactId>xbean-asm-util</artifactId>
+                <version>${project.version}</version>
+            </dependency>
             <dependency>
                 <groupId>org.apache.xbean</groupId>
                 <artifactId>xbean-finder-shaded</artifactId>
@@ -379,6 +384,7 @@
         <module>xbean-classloader</module>
         <module>xbean-classpath</module>
         <module>xbean-bundleutils</module>
+        <module>xbean-asm-util</module>
         <module>xbean-finder</module>
         <module>xbean-naming</module>
         <module>xbean-reflect</module>

Added: geronimo/xbean/trunk/xbean-asm-util/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-asm-util/pom.xml?rev=1486553&view=auto
==============================================================================
--- geronimo/xbean/trunk/xbean-asm-util/pom.xml (added)
+++ geronimo/xbean/trunk/xbean-asm-util/pom.xml Mon May 27 09:50:29 2013
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>xbean</artifactId>
+    <groupId>org.apache.xbean</groupId>
+    <version>3.14-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>xbean-asm-util</artifactId>
+  <name>Apache XBean :: ASM 4 Util</name>
+
+
+  <dependencies>
+    <dependency>
+      <groupId>org.ow2.asm</groupId>
+      <artifactId>asm</artifactId>
+      <version>4.1</version>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>org.ow2.asm</groupId>
+      <artifactId>asm-commons</artifactId>
+      <version>4.1</version>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
+</project>

Added: geronimo/xbean/trunk/xbean-asm-util/src/main/java/org/apache/xbean/asm4/original/commons/EmptyVisitor.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-asm-util/src/main/java/org/apache/xbean/asm4/original/commons/EmptyVisitor.java?rev=1486553&view=auto
==============================================================================
--- geronimo/xbean/trunk/xbean-asm-util/src/main/java/org/apache/xbean/asm4/original/commons/EmptyVisitor.java
(added)
+++ geronimo/xbean/trunk/xbean-asm-util/src/main/java/org/apache/xbean/asm4/original/commons/EmptyVisitor.java
Mon May 27 09:50:29 2013
@@ -0,0 +1,383 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.xbean.asm4.original.commons;
+
+import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.Attribute;
+import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.FieldVisitor;
+import org.objectweb.asm.Handle;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
+
+public class EmptyVisitor extends ClassVisitor {
+    protected final AnnotationVisitor av = new AnnotationVisitor(Opcodes.ASM4) {
+        @Override
+        public void visit(String name, Object value) {
+            EmptyVisitor.this.visit(name, value);
+        }
+
+        @Override
+        public void visitEnum(String name, String desc, String value) {
+            EmptyVisitor.this.visitEnum(name, desc, value);
+        }
+
+        @Override
+        public AnnotationVisitor visitAnnotation(String name, String desc) {
+            return EmptyVisitor.this.visitAnnotation(name, desc);
+        }
+
+        @Override
+        public AnnotationVisitor visitArray(String name) {
+            return EmptyVisitor.this.visitArray(name);
+        }
+
+        @Override
+        public void visitEnd() {
+            EmptyVisitor.this.visitEnd();
+        }
+    };
+
+    protected final FieldVisitor fv = new FieldVisitor(Opcodes.ASM4) {
+        @Override
+        public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
+            return EmptyVisitor.this.visitAnnotation(desc, visible);
+        }
+
+        @Override
+        public void visitAttribute(Attribute attribute) {
+            EmptyVisitor.this.visitAttribute(attribute);
+        }
+
+        @Override
+        public void visitEnd() {
+            EmptyVisitor.this.visitEnd();
+        }
+    };
+    protected final MethodVisitor mv = new MethodVisitor(Opcodes.ASM4) {
+        @Override
+        public AnnotationVisitor visitAnnotationDefault() {
+            return EmptyVisitor.this.visitAnnotationDefault();
+        }
+
+        @Override
+        public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
+            return EmptyVisitor.this.visitAnnotation(desc, visible);
+        }
+
+        @Override
+        public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean
visible) {
+            return EmptyVisitor.this.visitMethodParameterAnnotation(parameter, desc, visible);
+        }
+
+        @Override
+        public void visitAttribute(Attribute attribute) {
+            EmptyVisitor.this.visitAttribute(attribute);
+        }
+
+        @Override
+        public void visitCode() {
+            EmptyVisitor.this.visitCode();
+        }
+
+        @Override
+        public void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[]
stack) {
+            EmptyVisitor.this.visitFrame(type, nLocal, local, nStack, stack);
+        }
+
+        @Override
+        public void visitInsn(int opcode) {
+            EmptyVisitor.this.visitInsn(opcode);
+        }
+
+        @Override
+        public void visitJumpInsn(int i, Label label) {
+            EmptyVisitor.this.visitJumpInsn(i, label);
+        }
+
+        @Override
+        public void visitLabel(Label label) {
+            EmptyVisitor.this.visitLabel(label);
+        }
+
+        @Override
+        public void visitLdcInsn(Object cst) {
+            EmptyVisitor.this.visitLdcInsn(cst);
+        }
+
+        @Override
+        public void visitIincInsn(int var, int increment) {
+            EmptyVisitor.this.visitIincInsn(var, increment);
+        }
+
+        @Override
+        public void visitTableSwitchInsn(int i, int i2, Label label, Label... labels) {
+            EmptyVisitor.this.visitTableSwitchInsn(i, i2, label, labels);
+        }
+
+        @Override
+        public void visitLookupSwitchInsn(Label label, int[] ints, Label[] labels) {
+            EmptyVisitor.this.visitLookupSwitchInsn(label, ints, labels);
+        }
+
+        @Override
+        public void visitMultiANewArrayInsn(String desc, int dims) {
+            EmptyVisitor.this.visitMultiANewArrayInsn(desc, dims);
+        }
+
+        @Override
+        public void visitTryCatchBlock(Label label, Label label2, Label label3, String s)
{
+            EmptyVisitor.this.visitTryCatchBlock(label, label2, label3, s);
+        }
+
+        @Override
+        public void visitLocalVariable(String s, String s2, String s3, Label label, Label
label2, int i) {
+            EmptyVisitor.this.visitLocalVariable(s, s2, s3, label, label2, i);
+        }
+
+        @Override
+        public void visitLineNumber(int i, Label label) {
+            EmptyVisitor.this.visitLineNumber(i, label);
+        }
+
+        @Override
+        public void visitMaxs(int maxStack, int maxLocals) {
+            EmptyVisitor.this.visitMaxs(maxStack, maxLocals);
+        }
+
+        @Override
+        public void visitEnd() {
+            EmptyVisitor.this.visitEnd();
+        }
+
+        @Override
+        public void visitIntInsn(int opcode, int operand) {
+            EmptyVisitor.this.visitIntInsn(opcode, operand);
+        }
+
+        @Override
+        public void visitVarInsn(int opcode, int var) {
+            EmptyVisitor.this.visitVarInsn(opcode, var);
+        }
+
+        @Override
+        public void visitTypeInsn(int opcode, String type) {
+            EmptyVisitor.this.visitTypeInsn(opcode, type);
+        }
+
+        @Override
+        public void visitFieldInsn(int opcode, String owner, String name, String desc) {
+            EmptyVisitor.this.visitFieldInsn(opcode, owner, name, desc);
+        }
+
+        @Override
+        public void visitMethodInsn(int opcode, String owner, String name, String desc) {
+            EmptyVisitor.this.visitMethodInsn(opcode, owner, name, desc);
+        }
+
+        @Override
+        public void visitInvokeDynamicInsn(String s, String s2, Handle handle, Object...
objects) {
+            EmptyVisitor.this.visitInvokeDynamicInsn(s, s2, handle, objects);
+        }
+    };
+
+    public EmptyVisitor() {
+        super(Opcodes.ASM4);
+    }
+
+    protected AnnotationVisitor visitAnnotationDefault() {
+        return av;
+    }
+
+    protected AnnotationVisitor visitArray(String name) {
+        return av;
+    }
+
+    protected AnnotationVisitor visitAnnotation(String name, String desc) {
+        return av;
+    }
+
+    protected void visitEnum(String name, String desc, String value) {
+        // no-op
+    }
+
+    protected void visit(String name, Object value) {
+        // no-op
+    }
+
+    protected void visitVarInsn(int opcode, int var) {
+        // no-op
+    }
+
+    protected void visitTypeInsn(int opcode, String type) {
+        // no-op
+    }
+
+    protected void visitFieldInsn(int opcode, String owner, String name, String desc) {
+        // no-op
+    }
+
+    protected void visitMethodInsn(int opcode, String owner, String name, String desc) {
+        // no-op
+    }
+
+    protected void visitInvokeDynamicInsn(String s, String s2, Handle handle, Object[] objects)
{
+        // no-op
+    }
+
+    protected void visitIntInsn(int opcode, int operand) {
+        // no-op
+    }
+
+    protected void visitJumpInsn(int i, Label label) {
+        // no-op
+    }
+
+    protected void visitLabel(Label label) {
+        // no-op
+    }
+
+    protected void visitLdcInsn(Object cst) {
+        // no-op
+    }
+
+    protected void visitIincInsn(int var, int increment) {
+        // no-op
+    }
+
+    protected void visitTableSwitchInsn(int i, int i2, Label label, Label[] labels) {
+        // no-op
+    }
+
+    protected void visitLookupSwitchInsn(Label label, int[] ints, Label[] labels) {
+        // no-op
+    }
+
+    protected void visitMultiANewArrayInsn(String desc, int dims) {
+        // no-op
+    }
+
+    protected void visitTryCatchBlock(Label label, Label label2, Label label3, String s)
{
+        // no-op
+    }
+
+    protected void visitLocalVariable(String s, String s2, String s3, Label label, Label
label2, int i) {
+        // no-op
+    }
+
+    protected void visitLineNumber(int i, Label label) {
+        // no-op
+    }
+
+    protected void visitMaxs(int maxStack, int maxLocals) {
+        // no-op
+    }
+
+    protected void visitInsn(int opcode) {
+        // no-op
+    }
+
+    protected void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[]
stack) {
+        // no-op
+    }
+
+    protected void visitCode() {
+        // no-op
+    }
+
+    protected AnnotationVisitor visitMethodParameterAnnotation(int parameter, String desc,
boolean visible) {
+        return av;
+    }
+
+    protected AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean
visible) {
+        return av;
+    }
+
+    @Override
+    public void visit(int version, int access, String name, String signature,
+                      String superName, String[] interfaces) {
+        if (cv != null) {
+            cv.visit(version, access, name, signature, superName, interfaces);
+        }
+    }
+
+    @Override
+    public void visitSource(String source, String debug) {
+        if (cv != null) {
+            cv.visitSource(source, debug);
+        }
+    }
+
+    @Override
+    public void visitOuterClass(String owner, String name, String desc) {
+        if (cv != null) {
+            cv.visitOuterClass(owner, name, desc);
+        }
+    }
+
+    @Override
+    public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
+        return av;
+    }
+
+    @Override
+    public void visitAttribute(Attribute attr) {
+        if (cv != null) {
+            cv.visitAttribute(attr);
+        }
+    }
+
+    @Override
+    public void visitInnerClass(String name, String outerName,
+                                String innerName, int access) {
+        if (cv != null) {
+            cv.visitInnerClass(name, outerName, innerName, access);
+        }
+    }
+
+    @Override
+    public FieldVisitor visitField(int access, String name, String desc,
+                                   String signature, Object value) {
+        return fv;
+    }
+
+    @Override
+    public MethodVisitor visitMethod(int access, String name, String desc,
+                                     String signature, String[] exceptions) {
+        return mv;
+    }
+
+    @Override
+    public void visitEnd() {
+        if (cv != null) {
+            cv.visitEnd();
+        }
+    }
+
+    public AnnotationVisitor annotationVisitor() {
+        return av;
+    }
+
+    public FieldVisitor fieldVisitor() {
+        return fv;
+    }
+
+    public MethodVisitor methodVisitor() {
+        return mv;
+    }
+}

Modified: geronimo/xbean/trunk/xbean-asm4-shaded/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-asm4-shaded/pom.xml?rev=1486553&r1=1486552&r2=1486553&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-asm4-shaded/pom.xml (original)
+++ geronimo/xbean/trunk/xbean-asm4-shaded/pom.xml Mon May 27 09:50:29 2013
@@ -60,6 +60,10 @@
                         <configuration>
                             <createSourcesJar>true</createSourcesJar>
                             <relocations>
+                                <relocation> <!-- we need a different package because
we build against both -->
+                                    <pattern>org.apache.xbean.asm4.original.commons</pattern>
+                                    <shadedPattern>org.apache.xbean.asm4.shade.commons</shadedPattern>
+                                </relocation>
                                 <relocation>
                                     <pattern>org.objectweb.asm</pattern>
                                     <shadedPattern>org.apache.xbean.asm4</shadedPattern>
@@ -92,5 +96,9 @@
             <artifactId>asm-commons</artifactId>
             <version>${asm.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.xbean</groupId>
+            <artifactId>xbean-asm-util</artifactId>
+        </dependency>
     </dependencies>
 </project>

Modified: geronimo/xbean/trunk/xbean-finder-shaded/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder-shaded/pom.xml?rev=1486553&r1=1486552&r2=1486553&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder-shaded/pom.xml (original)
+++ geronimo/xbean/trunk/xbean-finder-shaded/pom.xml Mon May 27 09:50:29 2013
@@ -33,7 +33,7 @@
 
     <properties>
         <xbean.osgi.export>org.apache.xbean.finder;version=${project.version}</xbean.osgi.export>
-        <xbean.osgi.import>org.apache.xbean.finder;version=${project.version},org.apache.xbean.asm;version=3.1,org.apache.xbean.asm.commons;version=3.1</xbean.osgi.import>
+        <xbean.osgi.import>org.apache.xbean.finder;version=${project.version},org.apache.xbean.asm4;version=4,org.apache.xbean.asm4.shade.commons;version=4</xbean.osgi.import>
     </properties>
 
     <build>
@@ -51,8 +51,12 @@
                             <createSourcesJar>true</createSourcesJar>
                             <relocations>
                                 <relocation>
+                                    <pattern>org.apache.xbean.asm4.original.commons.EmptyVisitor</pattern>
+                                    <shadedPattern>org.apache.xbean.asm4.shade.commons.EmptyVisitor</shadedPattern>
+                                </relocation>
+                                <relocation>
                                     <pattern>org.objectweb.asm</pattern>
-                                    <shadedPattern>org.apache.xbean.asm</shadedPattern>
+                                    <shadedPattern>org.apache.xbean.asm4</shadedPattern>
                                 </relocation>
                             </relocations>
                             <artifactSet>
@@ -61,7 +65,8 @@
                                 </includes>
                                 <excludes>
                                     <exclude>*:*:sources</exclude>
-                                    <exclude>org.apache.xbean:xbean-asm-shaded</exclude>
+                                    <exclude>org.apache.xbean:xbean-asm4-shaded</exclude>
+                                    <exclude>org.apache.xbean:xbean-asm-util</exclude>
                                     <exclude>junit:junit</exclude>
                                 </excludes>
                             </artifactSet>
@@ -93,7 +98,7 @@
                 <configuration>
                     <excludeDependencies>true</excludeDependencies>
                     <instructions>
-                        <Import-Package>!org.objectweb.asm.*,!org.apache.xbean.finder.*,org.apache.xbean.asm,*;resolution:=optional</Import-Package>
+                        <Import-Package>!org.objectweb.asm.*,!org.apache.xbean.finder.*,org.apache.xbean.asm4,*;resolution:=optional</Import-Package>
                         <Private-Package />
                         <_nouses>true</_nouses>
                     </instructions>

Modified: geronimo/xbean/trunk/xbean-finder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/pom.xml?rev=1486553&r1=1486552&r2=1486553&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/pom.xml (original)
+++ geronimo/xbean/trunk/xbean-finder/pom.xml Mon May 27 09:50:29 2013
@@ -41,15 +41,15 @@
             <artifactId>slf4j-api</artifactId>
         </dependency>
         <dependency>
-            <groupId>asm</groupId>
+            <groupId>org.ow2.asm</groupId>
             <artifactId>asm</artifactId>
-            <version>3.2</version>
+            <version>4.1</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>asm</groupId>
+            <groupId>org.ow2.asm</groupId>
             <artifactId>asm-commons</artifactId>
-            <version>3.2</version>
+            <version>4.1</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -58,6 +58,11 @@
             <version>4.3.1</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.xbean</groupId>
+            <artifactId>xbean-asm-util</artifactId>
+            <version>3.14-SNAPSHOT</version>
+        </dependency>
     </dependencies>
     <build>
         <plugins>

Modified: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AbstractFinder.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AbstractFinder.java?rev=1486553&r1=1486552&r2=1486553&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AbstractFinder.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AbstractFinder.java
Mon May 27 09:50:29 2013
@@ -34,12 +34,13 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.xbean.asm4.original.commons.EmptyVisitor;
 import org.apache.xbean.finder.util.SingleLinkedList;
 import org.objectweb.asm.AnnotationVisitor;
 import org.objectweb.asm.ClassReader;
 import org.objectweb.asm.FieldVisitor;
 import org.objectweb.asm.MethodVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.signature.SignatureVisitor;
 
 /**
@@ -948,7 +949,7 @@ public abstract class AbstractFinder imp
             AnnotationInfo annotationInfo = new AnnotationInfo(desc);
             info.getAnnotations().add(annotationInfo);
             getAnnotationInfos(annotationInfo.getName()).add(info);
-            return new InfoBuildingVisitor(annotationInfo);
+            return new InfoBuildingVisitor(annotationInfo).annotationVisitor();
         }
 
         @Override
@@ -956,7 +957,7 @@ public abstract class AbstractFinder imp
             ClassInfo classInfo = ((ClassInfo) info);
             FieldInfo fieldInfo = new FieldInfo(classInfo, name, desc);
             classInfo.getFields().add(fieldInfo);
-            return new InfoBuildingVisitor(fieldInfo);
+            return new InfoBuildingVisitor(fieldInfo).fieldVisitor();
         }
 
         @Override
@@ -964,20 +965,20 @@ public abstract class AbstractFinder imp
             ClassInfo classInfo = ((ClassInfo) info);
             MethodInfo methodInfo = new MethodInfo(classInfo, name, desc);
             classInfo.getMethods().add(methodInfo);
-            return new InfoBuildingVisitor(methodInfo);
+            return new InfoBuildingVisitor(methodInfo).methodVisitor();
         }
 
         @Override
-        public AnnotationVisitor visitParameterAnnotation(int param, String desc, boolean
visible) {
+        public AnnotationVisitor visitMethodParameterAnnotation(int param, String desc, boolean
visible) {
             MethodInfo methodInfo = ((MethodInfo) info);
             List<AnnotationInfo> annotationInfos = methodInfo.getParameterAnnotations(param);
             AnnotationInfo annotationInfo = new AnnotationInfo(desc);
             annotationInfos.add(annotationInfo);
-            return new InfoBuildingVisitor(annotationInfo);
+            return new InfoBuildingVisitor(annotationInfo).annotationVisitor();
         }
     }
 
-    public static class GenericAwareInfoBuildingVisitor implements SignatureVisitor {
+    public static class GenericAwareInfoBuildingVisitor extends SignatureVisitor {
 
         public enum TYPE {
             CLASS
@@ -994,9 +995,11 @@ public abstract class AbstractFinder imp
         private static boolean debug = false;
 
         public GenericAwareInfoBuildingVisitor() {
+            super(Opcodes.ASM4);
         }
 
         public GenericAwareInfoBuildingVisitor(GenericAwareInfoBuildingVisitor.TYPE type,
Info info) {
+            super(Opcodes.ASM4);
             this.type = type;
             this.info = info;
             this.state = GenericAwareInfoBuildingVisitor.STATE.BEGIN;

Modified: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java?rev=1486553&r1=1486552&r2=1486553&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
Mon May 27 09:50:29 2013
@@ -20,6 +20,7 @@
 
 package org.apache.xbean.finder;
 
+import org.apache.xbean.asm4.original.commons.EmptyVisitor;
 import org.apache.xbean.finder.archive.Archive;
 import org.apache.xbean.finder.util.Classes;
 import org.apache.xbean.finder.util.SingleLinkedList;
@@ -28,8 +29,8 @@ import org.objectweb.asm.Attribute;
 import org.objectweb.asm.ClassReader;
 import org.objectweb.asm.FieldVisitor;
 import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.Type;
-import org.objectweb.asm.commons.EmptyVisitor;
 import org.objectweb.asm.signature.SignatureVisitor;
 
 import java.io.ByteArrayInputStream;
@@ -1758,7 +1759,7 @@ public class AnnotationFinder implements
             AnnotationInfo annotationInfo = new AnnotationInfo(desc);
             info.getAnnotations().add(annotationInfo);
             index(annotationInfo, info);
-            return new InfoBuildingVisitor(annotationInfo);
+            return new InfoBuildingVisitor(annotationInfo).annotationVisitor();
         }
 
         @Override
@@ -1766,7 +1767,7 @@ public class AnnotationFinder implements
             ClassInfo classInfo = ((ClassInfo) info);
             FieldInfo fieldInfo = new FieldInfo(classInfo, name, desc);
             classInfo.getFields().add(fieldInfo);
-            return new InfoBuildingVisitor(fieldInfo);
+            return new InfoBuildingVisitor(fieldInfo).fieldVisitor();
         }
 
         @Override
@@ -1775,12 +1776,12 @@ public class AnnotationFinder implements
             MethodInfo methodInfo = new MethodInfo(classInfo, name, desc);
 
             classInfo.getMethods().add(methodInfo);
-            return new InfoBuildingVisitor(methodInfo);
+            return new InfoBuildingVisitor(methodInfo).methodVisitor();
         }
 
 
         @Override
-        public AnnotationVisitor visitParameterAnnotation(int param, String desc, boolean
visible) {
+        public AnnotationVisitor visitMethodParameterAnnotation(int param, String desc, boolean
visible) {
             MethodInfo methodInfo = ((MethodInfo) info);
             List<AnnotationInfo> annotationInfos = methodInfo.getParameterAnnotations(param);
             AnnotationInfo annotationInfo = new AnnotationInfo(desc);
@@ -1790,11 +1791,11 @@ public class AnnotationFinder implements
             methodInfo.getParameters().add(parameterInfo);
             index(annotationInfo, parameterInfo);
 
-            return new InfoBuildingVisitor(annotationInfo);
+            return new InfoBuildingVisitor(annotationInfo).annotationVisitor();
         }
     }
 
-    public static class GenericAwareInfoBuildingVisitor implements SignatureVisitor {
+    public static class GenericAwareInfoBuildingVisitor extends SignatureVisitor {
 
         public enum TYPE {
             CLASS
@@ -1811,9 +1812,11 @@ public class AnnotationFinder implements
         private static boolean debug = false;
 
         public GenericAwareInfoBuildingVisitor() {
+            super(Opcodes.ASM4);
         }
 
         public GenericAwareInfoBuildingVisitor(GenericAwareInfoBuildingVisitor.TYPE type,
Info info) {
+            super(Opcodes.ASM4);
             this.type = type;
             this.info = info;
             this.state = GenericAwareInfoBuildingVisitor.STATE.BEGIN;

Modified: geronimo/xbean/trunk/xbean-reflect/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-reflect/pom.xml?rev=1486553&r1=1486552&r2=1486553&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-reflect/pom.xml (original)
+++ geronimo/xbean/trunk/xbean-reflect/pom.xml Mon May 27 09:50:29 2013
@@ -47,6 +47,12 @@
             <optional>true</optional>
         </dependency>
         <dependency>
+          <groupId>org.apache.xbean</groupId>
+          <artifactId>xbean-asm-util</artifactId>
+          <scope>provided</scope>
+          <optional>true</optional>
+        </dependency>
+        <dependency>
             <groupId>org.apache.xbean</groupId>
             <artifactId>xbean-asm4-shaded</artifactId>
             <version>3.14-SNAPSHOT</version>

Modified: geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java?rev=1486553&r1=1486552&r2=1486553&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java
(original)
+++ geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java
Mon May 27 09:50:29 2013
@@ -17,25 +17,25 @@
  */
 package org.apache.xbean.recipe;
 
+import org.apache.xbean.asm4.original.commons.EmptyVisitor;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.Type;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.WeakHashMap;
-import java.util.Arrays;
-
-import org.apache.xbean.asm4.original.EmptyVisitor;
-import org.objectweb.asm.ClassReader;
-import org.objectweb.asm.Label;
-import org.objectweb.asm.MethodVisitor;
-import org.objectweb.asm.Opcodes;
-import org.objectweb.asm.Type;
 
 /**
  * Implementation of ParameterNameLoader that uses ASM to read the parameter names from the
local variable table in the

Modified: geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java?rev=1486553&r1=1486552&r2=1486553&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
(original)
+++ geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
Mon May 27 09:50:29 2013
@@ -18,11 +18,11 @@
 package org.apache.xbean.recipe;
 
 import org.apache.xbean.asm4.ClassReader;
-import org.apache.xbean.asm4.shade.EmptyVisitor;
 import org.apache.xbean.asm4.Label;
 import org.apache.xbean.asm4.MethodVisitor;
 import org.apache.xbean.asm4.Opcodes;
 import org.apache.xbean.asm4.Type;
+import org.apache.xbean.asm4.shade.commons.EmptyVisitor;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -37,11 +37,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.WeakHashMap;
 
-import org.apache.xbean.asm4.ClassReader;
-import org.apache.xbean.asm4.Label;
-import org.apache.xbean.asm4.MethodVisitor;
-import org.apache.xbean.asm4.Type;
-
 /**
  * Implementation of ParameterNameLoader that uses ASM to read the parameter names from the
local variable table in the
  * class byte code.



Mime
View raw message