commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1702615 - in /commons/proper/bcel/trunk/src: changes/ main/java/org/apache/commons/bcel6/classfile/ test/java/org/apache/commons/bcel6/visitors/
Date Sat, 12 Sep 2015 11:22:05 GMT
Author: sebb
Date: Sat Sep 12 11:22:02 2015
New Revision: 1702615

URL: http://svn.apache.org/r1702615
Log:
BCEL-264 Add missing Node.accept() implementations (ConstantMethodHandle, ConstantMethodType,
ParameterAnnotationEntry)

Modified:
    commons/proper/bcel/trunk/src/changes/changes.xml
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodHandle.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodType.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/DescendingVisitor.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/EmptyVisitor.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotationEntry.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Visitor.java
    commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/visitors/CounterVisitor.java

Modified: commons/proper/bcel/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/changes/changes.xml?rev=1702615&r1=1702614&r2=1702615&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/changes/changes.xml (original)
+++ commons/proper/bcel/trunk/src/changes/changes.xml Sat Sep 12 11:22:02 2015
@@ -63,7 +63,8 @@ The <action> type attribute can be add,u
 
   <body>
     <release version="6.0" date="TBA" description="Major release with Java 7 and 8 support">
-      <action issue="BCEL-221" type="fix">BCELifier is not working for Java8Example</action>
+      <action issue="BCEL-264" type="fix">Add missing Node.accept() implementations
(ConstantMethodHandle, ConstantMethodType, ParameterAnnotationEntry)</action>
+      <action issue="BCEL-221" type="fix">BCELifier is not working for Java8Example
(incomplete)</action>
       <action issue="BCEL-195" type="fix">addition of hashCode() to generic/Instruction.java
breaks Targeters. Never make distinct BranchInstructions compare equal</action>
       <action issue="BCEL-261" type="fix">Select constructor allows partially constructed
instance to escape. Re-ordered code to delay the escape.</action>
       <action issue="BCEL-259" type="fix">Minor doc error in BranchInstruction.java</action>

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodHandle.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodHandle.java?rev=1702615&r1=1702614&r2=1702615&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodHandle.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodHandle.java
Sat Sep 12 11:22:02 2015
@@ -71,7 +71,7 @@ public final class ConstantMethodHandle
      */
     @Override
     public void accept( Visitor v ) {
-        // TODO Add .visitMethodHandle to Visitor interface
+        v.visitConstantMethodHandle(this);
     }
 
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodType.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodType.java?rev=1702615&r1=1702614&r2=1702615&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodType.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodType.java
Sat Sep 12 11:22:02 2015
@@ -69,7 +69,7 @@ public final class ConstantMethodType ex
      */
     @Override
     public void accept( Visitor v ) {
-        // TODO Add .visitMethodType to Visitor interface
+        v.visitConstantMethodType(this);
     }
 
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/DescendingVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/DescendingVisitor.java?rev=1702615&r1=1702614&r2=1702615&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/DescendingVisitor.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/DescendingVisitor.java
Sat Sep 12 11:22:02 2015
@@ -529,4 +529,29 @@ public class DescendingVisitor implement
         obj.accept(visitor);
         stack.pop();
     }
+
+    /** @since 6.0 */
+    @Override
+    public void visitConstantMethodType(ConstantMethodType obj) {
+        stack.push(obj);
+        obj.accept(visitor);
+        stack.pop();
+    }
+
+    /** @since 6.0 */
+    @Override
+    public void visitConstantMethodHandle(ConstantMethodHandle obj) {
+        stack.push(obj);
+        obj.accept(visitor);
+        stack.pop();
+    }
+
+    /** @since 6.0 */
+    @Override
+    public void visitParameterAnnotationEntry(ParameterAnnotationEntry obj) {
+        stack.push(obj);
+        obj.accept(visitor);
+        stack.pop();
+    }
+
 }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/EmptyVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/EmptyVisitor.java?rev=1702615&r1=1702614&r2=1702615&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/EmptyVisitor.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/EmptyVisitor.java
Sat Sep 12 11:22:02 2015
@@ -274,4 +274,26 @@ public class EmptyVisitor implements Vis
     public void visitMethodParameters(MethodParameters obj)
     {
     }
+
+    /**
+     * @since 6.0
+     */
+    @Override
+    public void visitConstantMethodType(ConstantMethodType obj)
+    {
+    }
+
+    /**
+     * @since 6.0
+     */
+    @Override
+    public void visitConstantMethodHandle(ConstantMethodHandle constantMethodHandle) {
+    }
+
+    /**
+     * @since 6.0
+     */
+    @Override
+    public void visitParameterAnnotationEntry(ParameterAnnotationEntry parameterAnnotationEntry)
{
+    }
 }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotationEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotationEntry.java?rev=1702615&r1=1702614&r2=1702615&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotationEntry.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotationEntry.java
Sat Sep 12 11:22:02 2015
@@ -60,7 +60,7 @@ public class ParameterAnnotationEntry im
      */
     @Override
     public void accept( Visitor v ) {
-        // v.visitParameterAnnotationEntry(this);
+        v.visitParameterAnnotationEntry(this);
     }
 
     /**

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Visitor.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Visitor.java?rev=1702615&r1=1702614&r2=1702615&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Visitor.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Visitor.java
Sat Sep 12 11:22:02 2015
@@ -131,4 +131,19 @@ public interface Visitor
      * @since 6.0
      */
     void visitMethodParameters(MethodParameters obj);
+
+    /**
+     * @since 6.0
+     */
+    void visitConstantMethodType(ConstantMethodType obj);
+
+    /**
+     * @since 6.0
+     */
+    void visitConstantMethodHandle(ConstantMethodHandle obj);
+
+    /**
+     * @since 6.0
+     */
+    void visitParameterAnnotationEntry(ParameterAnnotationEntry obj);
 }

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/visitors/CounterVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/visitors/CounterVisitor.java?rev=1702615&r1=1702614&r2=1702615&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/visitors/CounterVisitor.java
(original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/visitors/CounterVisitor.java
Sat Sep 12 11:22:02 2015
@@ -32,6 +32,8 @@ import org.apache.commons.bcel6.classfil
 import org.apache.commons.bcel6.classfile.ConstantInterfaceMethodref;
 import org.apache.commons.bcel6.classfile.ConstantInvokeDynamic;
 import org.apache.commons.bcel6.classfile.ConstantLong;
+import org.apache.commons.bcel6.classfile.ConstantMethodHandle;
+import org.apache.commons.bcel6.classfile.ConstantMethodType;
 import org.apache.commons.bcel6.classfile.ConstantMethodref;
 import org.apache.commons.bcel6.classfile.ConstantNameAndType;
 import org.apache.commons.bcel6.classfile.ConstantPool;
@@ -52,6 +54,7 @@ import org.apache.commons.bcel6.classfil
 import org.apache.commons.bcel6.classfile.LocalVariableTypeTable;
 import org.apache.commons.bcel6.classfile.Method;
 import org.apache.commons.bcel6.classfile.MethodParameters;
+import org.apache.commons.bcel6.classfile.ParameterAnnotationEntry;
 import org.apache.commons.bcel6.classfile.ParameterAnnotations;
 import org.apache.commons.bcel6.classfile.Signature;
 import org.apache.commons.bcel6.classfile.SourceFile;
@@ -399,4 +402,22 @@ public class CounterVisitor implements V
     {
         constantInvokeDynamic++;
     }
+
+    /** @since 6.0 */
+    @Override
+    public void visitConstantMethodType(ConstantMethodType obj) {
+        // TODO Auto-generated method stub        
+    }
+
+    /** @since 6.0 */
+    @Override
+    public void visitConstantMethodHandle(ConstantMethodHandle constantMethodHandle) {
+        // TODO Auto-generated method stub
+    }
+
+    /** @since 6.0 */
+    @Override
+    public void visitParameterAnnotationEntry(ParameterAnnotationEntry parameterAnnotationEntry)
{
+        // TODO Auto-generated method stub        
+    }
 }



Mime
View raw message