commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1697716 - /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LocalVariableInstruction.java
Date Tue, 25 Aug 2015 16:10:15 GMT
Author: sebb
Date: Tue Aug 25 16:10:15 2015
New Revision: 1697716

URL: http://svn.apache.org/r1697716
Log:
Need direct setter for n

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LocalVariableInstruction.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LocalVariableInstruction.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LocalVariableInstruction.java?rev=1697716&r1=1697715&r2=1697716&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LocalVariableInstruction.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LocalVariableInstruction.java
Tue Aug 25 16:10:15 2015
@@ -153,7 +153,10 @@ public abstract class LocalVariableInstr
 
 
     /**
-     * Set the local variable index
+     * Set the local variable index.
+     * also updates opcode and length
+     * TODO Why?
+     * @see #setIndexOnly(int)
      */
     @Override
     public void setIndex( int n ) { // TODO could be package-protected?
@@ -213,4 +216,13 @@ public abstract class LocalVariableInstr
                 throw new ClassGenException("Oops: unknown case in switch" + canon_tag);
         }
     }
+
+    /**
+     * Sets the index of the referenced variable (n) only
+     * @since 6.0
+     * @see #setIndex(int)
+     */
+    final void setIndexOnly(int n) {
+        this.n = n;
+    }
 }



Mime
View raw message