You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2015/08/12 16:50:34 UTC

svn commit: r1695544 - in /commons/proper/bcel/trunk/src: changes/ main/java/org/apache/commons/bcel6/classfile/

Author: sebb
Date: Wed Aug 12 14:50:33 2015
New Revision: 1695544

URL: http://svn.apache.org/r1695544
Log:
BCEL-235 Remove unused setters

Modified:
    commons/proper/bcel/trunk/src/changes/changes.xml
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantNameAndType.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantString.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantValue.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Deprecated.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/EnclosingMethod.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Field.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumberTable.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTable.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTypeTable.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameters.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/PMGClass.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotations.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Signature.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/SimpleElementValue.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/SourceFile.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMap.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTable.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Synthetic.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Unknown.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=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/changes/changes.xml (original)
+++ commons/proper/bcel/trunk/src/changes/changes.xml Wed Aug 12 14:50:33 2015
@@ -63,6 +63,7 @@ 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-235" type="fix">Remove unused setters</action>
       <action issue="BCEL-232" type="fix">Make mutable fields private</action>
       <action issue="BCEL-233" type="fix">The access_flags field in AccessFlags class should be final</action>
       <action issue="BCEL-234" type="fix">Code must not swallow Throwable</action>

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java Wed Aug 12 14:50:33 2015
@@ -52,7 +52,7 @@ public abstract class Attribute implemen
 {
     private static final long serialVersionUID = -1707826820310002955L;
 
-    private int name_index; // Points to attribute name in constant pool
+    private final int name_index; // Points to attribute name in constant pool
 
     private int length; // Content length of attribute field
 
@@ -258,14 +258,6 @@ public abstract class Attribute implemen
     }
 
     /**
-     * @param name_index of attribute.
-     */
-    public final void setNameIndex(int name_index) // TODO unused
-    {
-        this.name_index = name_index;
-    }
-
-    /**
      * @return Name index in constant pool of attribute name.
      */
     public final int getNameIndex()

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantNameAndType.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantNameAndType.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantNameAndType.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantNameAndType.java Wed Aug 12 14:50:33 2015
@@ -35,8 +35,8 @@ import org.apache.commons.bcel6.Constant
 public final class ConstantNameAndType extends Constant {
 
     private static final long serialVersionUID = -7913354727264034451L;
-    private int name_index; // Name of field/method // TODO could be final (setter unused)
-    private int signature_index; // and its signature. // TODO could be final (setter unused)
+    private final int name_index; // Name of field/method
+    private final int signature_index; // and its signature.
 
 
     /**
@@ -126,22 +126,6 @@ public final class ConstantNameAndType e
     }
 
 
-    /**
-     * @param name_index the name index of this constant
-     */
-    public final void setNameIndex( int name_index ) { // TODO unused
-        this.name_index = name_index;
-    }
-
-
-    /**
-     * @param signature_index the signature index in the constant pool of this type
-     */
-    public final void setSignatureIndex( int signature_index ) { // TODO unused
-        this.signature_index = signature_index;
-    }
-
-
     /**
      * @return String representation
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java Wed Aug 12 14:50:33 2015
@@ -332,14 +332,6 @@ public class ConstantPool implements Clo
 
 
     /**
-     * @param constant_pool
-     */
-    public void setConstantPool( Constant[] constant_pool ) { // TODO unused
-        this.constant_pool = constant_pool;
-    }
-
-
-    /**
      * @return String representation.
      */
     @Override

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantString.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantString.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantString.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantString.java Wed Aug 12 14:50:33 2015
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.Constant
 public final class ConstantString extends Constant implements ConstantObject {
 
     private static final long serialVersionUID = 6603144389219397225L;
-    private int string_index; // Identical to ConstantClass except for this name // TODO could be final (setter unused)
+    private final int string_index; // Identical to ConstantClass except for this name
 
 
     /**
@@ -99,14 +99,6 @@ public final class ConstantString extend
     }
 
 
-    /**
-     * @param string_index the index into the constant of the string value
-     */
-    public final void setStringIndex( int string_index ) { // TODO unused
-        this.string_index = string_index;
-    }
-
-
     /**
      * @return String representation.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantValue.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantValue.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantValue.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantValue.java Wed Aug 12 14:50:33 2015
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.Constant
 public final class ConstantValue extends Attribute {
 
     private static final long serialVersionUID = -5668999920978520157L;
-    private int constantvalue_index; // TODO could be final (setter unused)
+    private final int constantvalue_index;
 
 
     /**
@@ -107,14 +107,6 @@ public final class ConstantValue extends
     }
 
 
-    /**
-     * @param constantvalue_index the index info the constant pool of this constant value
-     */
-    public final void setConstantValueIndex( int constantvalue_index ) { // TODO unused
-        this.constantvalue_index = constantvalue_index;
-    }
-
-
     /**
      * @return String representation of constant value.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Deprecated.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Deprecated.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Deprecated.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Deprecated.java Wed Aug 12 14:50:33 2015
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.Constant
 public final class Deprecated extends Attribute {
 
     private static final long serialVersionUID = -2242528405240201000L;
-    private byte[] bytes; // TODO could be final (setter unused)
+    private byte[] bytes; // TODO could be final if copy() were rewritten
 
 
     /**
@@ -114,14 +114,6 @@ public final class Deprecated extends At
     }
 
 
-    /**
-     * @param bytes the raw bytes that represents this byte array
-     */
-    public final void setBytes( byte[] bytes ) { // TODO unused
-        this.bytes = bytes;
-    }
-
-
     /**
      * @return attribute name
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/EnclosingMethod.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/EnclosingMethod.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/EnclosingMethod.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/EnclosingMethod.java Wed Aug 12 14:50:33 2015
@@ -34,7 +34,7 @@ public class EnclosingMethod extends Att
 
     // Pointer to the CONSTANT_Class_info structure representing the 
     // innermost class that encloses the declaration of the current class.
-    private int classIndex; // TODO could be final (setter unused)
+    private final int classIndex;
 
     // If the current class is not immediately enclosed by a method or 
     // constructor, then the value of the method_index item must be zero.  
@@ -44,7 +44,7 @@ public class EnclosingMethod extends Att
     // to in the class_index.  *It is the compiler responsibility* to 
     // ensure that the method identified by this index is the closest 
     // lexically enclosing method that includes the local/anonymous class.
-    private int methodIndex; // TODO could be final (setter unused)
+    private final int methodIndex;
 
     // Ctors - and code to read an attribute in.
     EnclosingMethod(int nameIndex, int len, DataInput input, ConstantPool cpool) throws IOException {
@@ -73,9 +73,6 @@ public class EnclosingMethod extends Att
     public final int getEnclosingClassIndex() { return classIndex; }  
     public final int getEnclosingMethodIndex(){ return methodIndex;}
 
-    public final void setEnclosingClassIndex(int idx) {classIndex = idx;} // TODO unused
-    public final void setEnclosingMethodIndex(int idx){methodIndex= idx;} // TODO unused
-
     public final ConstantClass getEnclosingClass() {
         ConstantClass c = 
             (ConstantClass)super.getConstantPool().getConstant(classIndex,Constants.CONSTANT_Class);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java Wed Aug 12 14:50:33 2015
@@ -38,7 +38,7 @@ public final class ExceptionTable extend
 
     private static final long serialVersionUID = 2045358830660883220L;
 
-    private int[] exception_index_table; // constant pool // TODO could be final (setter unused)
+    private int[] exception_index_table; // constant pool
 
 
     /**
@@ -139,15 +139,6 @@ public final class ExceptionTable extend
     }
 
 
-    /**
-     * @param exception_index_table the list of exception indexes
-     * Also redefines number_of_exceptions according to table length.
-     */
-    public final void setExceptionIndexTable( int[] exception_index_table ) { // TODO unused
-        this.exception_index_table = exception_index_table != null ? exception_index_table : new int[0];
-    }
-
-
     /**
      * @return String representation, i.e., a list of thrown exceptions.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Field.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Field.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Field.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Field.java Wed Aug 12 14:50:33 2015
@@ -33,7 +33,7 @@ import org.apache.commons.bcel6.util.BCE
 public final class Field extends FieldOrMethod {
 
     private static final long serialVersionUID = -4604082205545049134L;
-    private static BCELComparator _cmp = new BCELComparator() { // TODO could be final (setter unused)
+    private static final BCELComparator _cmp = new BCELComparator() {
 
         public boolean equals( Object o1, Object o2 ) {
             Field THIS = (Field) o1;
@@ -160,14 +160,6 @@ public final class Field extends FieldOr
     }
 
 
-    /**
-     * @param comparator Comparison strategy object
-     */
-    public static void setComparator( BCELComparator comparator ) { // TODO unused
-        _cmp = comparator;
-    }
-
-
     /**
      * Return value as defined by given BCELComparator strategy.
      * By default two Field objects are said to be equal when

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java Wed Aug 12 14:50:33 2015
@@ -32,8 +32,8 @@ public abstract class FieldOrMethod exte
 
     private static final long serialVersionUID = -1833306330869469714L;
 
-    private int name_index; // Points to field name in constant pool 
-    private int signature_index; // Points to encoded signature
+    private final int name_index; // Points to field name in constant pool 
+    private final int signature_index; // Points to encoded signature
     private Attribute[] attributes; // Collection of attributes
     private AnnotationEntry[] annotationEntries; // annotations defined on the field or method 
     private ConstantPool constant_pool;
@@ -41,7 +41,9 @@ public abstract class FieldOrMethod exte
     private String signatureAttributeString = null;
     private boolean searchedForSignatureAttribute = false;
 
-    FieldOrMethod() {
+    FieldOrMethod() { // TODO is this ctor needed?
+        this.name_index = 0;
+        this.signature_index = 0;
     }
 
 
@@ -147,14 +149,6 @@ public abstract class FieldOrMethod exte
 
 
     /**
-     * @param name_index Index in constant pool of object's name.
-     */
-    public final void setNameIndex( int name_index ) { // TODO unused
-        this.name_index = name_index;
-    }
-
-
-    /**
      * @return Index in constant pool of field signature.
      */
     public final int getSignatureIndex() {
@@ -162,14 +156,6 @@ public abstract class FieldOrMethod exte
     }
 
 
-    /**
-     * @param signature_index Index in constant pool of field signature.
-     */
-    public final void setSignatureIndex( int signature_index ) { // TODO unused
-        this.signature_index = signature_index;
-    }
-
-
     /**
      * @return Name of object, i.e., method name or field name
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java Wed Aug 12 14:50:33 2015
@@ -35,10 +35,10 @@ import org.apache.commons.bcel6.Constant
 public final class InnerClass implements Cloneable, Node, Serializable {
 
     private static final long serialVersionUID = -7200195918166127614L;
-    private int inner_class_index; // TODO could be final (setter unused)
-    private int outer_class_index; // TODO could be final (setter unused)
-    private int inner_name_index; // TODO could be final (setter unused)
-    private int inner_access_flags; // TODO could be final (setter unused)
+    private final int inner_class_index;
+    private final int outer_class_index;
+    private final int inner_name_index;
+    private final int inner_access_flags;
 
 
     /**
@@ -134,38 +134,6 @@ public final class InnerClass implements
     }
 
 
-    /**
-     * @param inner_access_flags access flags for this inner class
-     */
-    public final void setInnerAccessFlags( int inner_access_flags ) { // TODO unused
-        this.inner_access_flags = inner_access_flags;
-    }
-
-
-    /**
-     * @param inner_class_index index into the constant pool for this class
-     */
-    public final void setInnerClassIndex( int inner_class_index ) { // TODO unused
-        this.inner_class_index = inner_class_index;
-    }
-
-
-    /**
-     * @param inner_name_index index into the constant pool for this class's name
-     */
-    public final void setInnerNameIndex( int inner_name_index ) { // TODO unused
-        this.inner_name_index = inner_name_index;
-    }
-
-
-    /**
-     * @param outer_class_index index into the constant pool for the owning class
-     */
-    public final void setOuterClassIndex( int outer_class_index ) { // TODO unused
-        this.outer_class_index = outer_class_index;
-    }
-
-
     /**
      * @return String representation.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java Wed Aug 12 14:50:33 2015
@@ -35,7 +35,7 @@ import org.apache.commons.bcel6.Constant
 public final class InnerClasses extends Attribute {
 
     private static final long serialVersionUID = 4570147726361753700L;
-    private InnerClass[] inner_classes; // TODO could be final (setter unused; would need to recode the copy method)
+    private InnerClass[] inner_classes; // TODO could be final (would need to recode the copy method)
 
 
     /**
@@ -117,14 +117,6 @@ public final class InnerClasses extends
     }
 
 
-    /**
-     * @param inner_classes the array of inner classes
-     */
-    public final void setInnerClasses( InnerClass[] inner_classes ) { // TODO unused
-        this.inner_classes = inner_classes != null ? inner_classes : new InnerClass[0];
-    }
-
-
     /**
      * @return String representation.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java Wed Aug 12 14:50:33 2015
@@ -74,7 +74,7 @@ public class JavaClass extends AccessFla
     static boolean debug = false; // Debugging on/off
     final static char sep = File.separatorChar; // directory separator
     
-    private static BCELComparator _cmp = new BCELComparator() { // TODO could be final (setter unused)
+    private static final BCELComparator _cmp = new BCELComparator() { // TODO could be final (setter unused)
 
         public boolean equals( Object o1, Object o2 ) {
             JavaClass THIS = (JavaClass) o1;
@@ -882,14 +882,6 @@ public class JavaClass extends AccessFla
     }
 
 
-    /**
-     * @param comparator Comparison strategy object
-     */
-    public static void setComparator( BCELComparator comparator ) { // TODO unused
-        _cmp = comparator;
-    }
-
-
     /**
      * Return value as defined by given BCELComparator strategy.
      * By default two JavaClass objects are said to be equal when

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java Wed Aug 12 14:50:33 2015
@@ -35,10 +35,10 @@ public final class LineNumber implements
     private static final long serialVersionUID = 169537400672820016L;
     
     /** Program Counter (PC) corresponds to line */
-    private short start_pc; // TODO could be final (setter unused)
+    private final short start_pc;
     
     /** number in source file */
-    private short line_number; // TODO could be final (setter unused)
+    private final short line_number;
 
     /**
      * Initialize from another object.
@@ -109,22 +109,6 @@ public final class LineNumber implements
     }
 
 
-    /**
-     * @param line_number the source line number
-     */
-    public final void setLineNumber( int line_number ) { // TODO unused
-        this.line_number = (short) line_number;
-    }
-
-
-    /**
-     * @param start_pc the pc for this line number
-     */
-    public final void setStartPC( int start_pc ) { // TODO unused
-        this.start_pc = (short) start_pc;
-    }
-
-
     /**
      * @return String representation
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumberTable.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumberTable.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumberTable.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumberTable.java Wed Aug 12 14:50:33 2015
@@ -36,7 +36,7 @@ public final class LineNumberTable exten
 
     private static final long serialVersionUID = -6967221519632128904L;
 
-    private LineNumber[] line_number_table; // Table of line/numbers pairs // TODO could be final (unused setter; copy() would need adjusting)
+    private LineNumber[] line_number_table; // Table of line/numbers pairs // TODO could be final (copy() would need adjusting)
 
 
     /*
@@ -116,14 +116,6 @@ public final class LineNumberTable exten
     }
 
 
-    /**
-     * @param line_number_table the line number entries for this table
-     */
-    public final void setLineNumberTable( LineNumber[] line_number_table ) { // TODO unused
-        this.line_number_table = line_number_table;
-    }
-
-
     /**
      * @return String representation.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java Wed Aug 12 14:50:33 2015
@@ -34,11 +34,11 @@ import org.apache.commons.bcel6.Constant
 public final class LocalVariable implements Constants, Cloneable, Node, Serializable {
 
     private static final long serialVersionUID = -51081099265972179L;
-    private int start_pc; // Range in which the variable is valid
-    private int length;
-    private int name_index; // Index in constant pool of variable name
-    private int signature_index; // Index of variable signature
-    private int index; /* Variable is `index'th local variable on
+    private final int start_pc; // Range in which the variable is valid
+    private final int length;
+    private final int name_index; // Index in constant pool of variable name
+    private final int signature_index; // Index of variable signature
+    private final int index; /* Variable is `index'th local variable on
      * this method's frame.
      */
     private ConstantPool constant_pool;
@@ -179,54 +179,6 @@ public final class LocalVariable impleme
     }
 
 
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) { // TODO unused
-        this.constant_pool = constant_pool;
-    }
-
-
-    /**
-     * @param length the length of this local variable
-     */
-    public final void setLength( int length ) { // TODO unused
-        this.length = length;
-    }
-
-
-    /**
-     * @param name_index the index into the constant pool for the name of this variable
-     */
-    public final void setNameIndex( int name_index ) { // TODO unused
-        this.name_index = name_index;
-    }
-
-
-    /**
-     * @param signature_index the index into the constant pool for the signature of this variable
-     */
-    public final void setSignatureIndex( int signature_index ) { // TODO unused
-        this.signature_index = signature_index;
-    }
-
-
-    /**
-     * @param index the index in the local variable table of this variable
-     */
-    public final void setIndex( int index ) { // TODO unused
-        this.index = index;
-    }
-
-
-    /**
-     * @param start_pc Specify range where the local variable is valid.
-     */
-    public final void setStartPC( int start_pc ) { // TODO unused
-        this.start_pc = start_pc;
-    }
-
-
     /**
      * @return string representation.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTable.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTable.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTable.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTable.java Wed Aug 12 14:50:33 2015
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.Constant
 public class LocalVariableTable extends Attribute {
 
     private static final long serialVersionUID = 6780929007774637689L;
-    private LocalVariable[] local_variable_table; // variables
+    private LocalVariable[] local_variable_table; // variables TODO could be final if copy() were recoded
 
 
     /**
@@ -156,11 +156,6 @@ public class LocalVariableTable extends
     }
 
 
-    public final void setLocalVariableTable( LocalVariable[] local_variable_table ) { // TODO unused
-        this.local_variable_table = local_variable_table;
-    }
-
-
     /**
      * @return String representation.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTypeTable.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTypeTable.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTypeTable.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTypeTable.java Wed Aug 12 14:50:33 2015
@@ -108,10 +108,6 @@ public class LocalVariableTypeTable exte
         return null;
     }
 
-    public final void setLocalVariableTable(LocalVariable[] local_variable_table) { // TODO unused
-        this.local_variable_type_table = local_variable_table;
-    }
-
     /**
      * @return String representation.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java Wed Aug 12 14:50:33 2015
@@ -35,12 +35,14 @@ public class MethodParameter implements
     private static final long serialVersionUID = 6014494029439440326L;
 
     /** Index of the CONSTANT_Utf8_info structure in the constant_pool table representing the name of the parameter */
-    private int name_index; // TODO could be final (setter unused)
+    private final int name_index;
 
     /** The access flags */
-    private int access_flags; // TODO could be final (setter unused)
+    private final int access_flags;
 
     public MethodParameter() {
+        this.access_flags = 0;
+        this.name_index = 0;
     }
 
     /**
@@ -59,10 +61,6 @@ public class MethodParameter implements
         return name_index;
     }
 
-    public void setNameIndex(int name_index) { // TODO unused
-        this.name_index = name_index;
-    }
-
     /**
      * Returns the name of the parameter.
      */
@@ -77,10 +75,6 @@ public class MethodParameter implements
         return access_flags;
     }
 
-    public void setAccessFlags(int access_flags) { // TODO unused
-        this.access_flags = access_flags;
-    }
-
     public boolean isFinal() {
         return (access_flags & Constants.ACC_FINAL) != 0;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameters.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameters.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameters.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameters.java Wed Aug 12 14:50:33 2015
@@ -33,7 +33,7 @@ public class MethodParameters extends At
 
     private static final long serialVersionUID = 2500272580422360140L;
 
-    private MethodParameter[] parameters = new MethodParameter[0]; // TODO could be final (setter unused)
+    private MethodParameter[] parameters = new MethodParameter[0]; // TODO could be final if copy() were recoded
 
     MethodParameters(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException {
         super(Constants.ATTR_METHOD_PARAMETERS, name_index, length, constant_pool);
@@ -49,10 +49,6 @@ public class MethodParameters extends At
         return parameters;
     }
 
-    public void setParameters(MethodParameter[] parameters) { // TODO unused
-        this.parameters = parameters;
-    }
-
     @Override
     public void accept(Visitor v) {
         v.visitMethodParameters(this);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/PMGClass.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/PMGClass.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/PMGClass.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/PMGClass.java Wed Aug 12 14:50:33 2015
@@ -33,7 +33,7 @@ import org.apache.commons.bcel6.Constant
 public final class PMGClass extends Attribute {
 
     private static final long serialVersionUID = -7075964153234211509L;
-    private int pmg_class_index, pmg_index; // TODO could be final (setter unused)
+    private final int pmg_class_index, pmg_index;
 
 
     /**
@@ -111,14 +111,6 @@ public final class PMGClass extends Attr
 
 
     /**
-     * @param pmg_class_index
-     */
-    public final void setPMGClassIndex( int pmg_class_index ) { // TODO unused
-        this.pmg_class_index = pmg_class_index;
-    }
-
-
-    /**
      * @return Index in constant pool of source file name.
      */
     public final int getPMGIndex() {
@@ -126,14 +118,6 @@ public final class PMGClass extends Attr
     }
 
 
-    /**
-     * @param pmg_index
-     */
-    public final void setPMGIndex( int pmg_index ) { // TODO unused
-        this.pmg_index = pmg_index;
-    }
-
-
     /**
      * @return PMG name.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotations.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotations.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotations.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotations.java Wed Aug 12 14:50:33 2015
@@ -32,7 +32,7 @@ public abstract class ParameterAnnotatio
     private static final long serialVersionUID = 5234607357644462705L;
     
     /** Table of parameter annotations */
-    private ParameterAnnotationEntry[] parameter_annotation_table; // TODO could be final (setter unused)
+    private ParameterAnnotationEntry[] parameter_annotation_table; // TODO could be final would need to recode ctor and copy method
 
     /**
      * @param parameter_annotation_type the subclass type of the parameter annotation
@@ -80,14 +80,6 @@ public abstract class ParameterAnnotatio
     }
 
 
-    /**
-     * @param parameter_annotation_table the entries to set in this parameter annotation
-     */
-    public final void setParameterAnnotationTable(ParameterAnnotationEntry[] parameter_annotation_table ) { // TODO unused
-        this.parameter_annotation_table = parameter_annotation_table;
-    }
-
-
     /**
      * @return the parameter annotation entry table
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Signature.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Signature.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Signature.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Signature.java Wed Aug 12 14:50:33 2015
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.Constant
 public final class Signature extends Attribute {
 
     private static final long serialVersionUID = 5808807822688827177L;
-    private int signature_index; // TODO could be final (setter unused)
+    private final int signature_index;
 
 
     /**
@@ -107,14 +107,6 @@ public final class Signature extends Att
     }
 
 
-    /**
-     * @param signature_index the index info the constant pool of this signature
-     */
-    public final void setSignatureIndex( int signature_index ) { // TODO unused
-        this.signature_index = signature_index;
-    }
-
-
     /**
      * @return GJ signature.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/SimpleElementValue.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/SimpleElementValue.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/SimpleElementValue.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/SimpleElementValue.java Wed Aug 12 14:50:33 2015
@@ -27,7 +27,7 @@ import org.apache.commons.bcel6.Constant
  */
 public class SimpleElementValue extends ElementValue
 {
-    private int index; // TODO could be final (setter unused)
+    private final int index;
 
     public SimpleElementValue(int type, int index, ConstantPool cpool)
     {
@@ -43,11 +43,6 @@ public class SimpleElementValue extends
         return index;
     }
 
-    public void setIndex(int index) // TODO unused
-    {
-        this.index = index;
-    }
-
     public String getValueString()
     {
         if (type != STRING) {

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/SourceFile.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/SourceFile.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/SourceFile.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/SourceFile.java Wed Aug 12 14:50:33 2015
@@ -35,7 +35,7 @@ import org.apache.commons.bcel6.Constant
 public final class SourceFile extends Attribute {
 
     private static final long serialVersionUID = -804226255663222912L;
-    private int sourcefile_index; // TODO could be final (setter unused)
+    private final int sourcefile_index;
 
 
     /**
@@ -114,14 +114,6 @@ public final class SourceFile extends At
     }
 
 
-    /**
-     * @param sourcefile_index
-     */
-    public final void setSourceFileIndex( int sourcefile_index ) { // TODO unused
-        this.sourcefile_index = sourcefile_index;
-    }
-
-
     /**
      * @return Source file name.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMap.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMap.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMap.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMap.java Wed Aug 12 14:50:33 2015
@@ -40,7 +40,7 @@ import org.apache.commons.bcel6.Constant
 public final class StackMap extends Attribute {
 
     private static final long serialVersionUID = -6238662431726968495L;
-    private StackMapEntry[] map; // Table of stack map entries // TODO could be final (setter unused)
+    private StackMapEntry[] map; // Table of stack map entries // TODO could be final if ctor and copy() were recoded
 
 
     /*
@@ -98,14 +98,6 @@ public final class StackMap extends Attr
     }
 
 
-    /**
-     * @param map Array of stack map entries
-     */
-    public final void setStackMap( StackMapEntry[] map ) { // TODO unused
-        this.map = map;
-    }
-
-
     /**
      * @return String representation.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java Wed Aug 12 14:50:33 2015
@@ -35,10 +35,10 @@ public final class StackMapEntry impleme
 
     private static final long serialVersionUID = 1L;
 
-    private int byte_code_offset; // TODO could be final (setter unused)
-    private StackMapType[] types_of_locals; // TODO could be final (setter unused)
-    private StackMapType[] types_of_stack_items; // TODO could be final (setter unused)
-    private ConstantPool constant_pool; // TODO could be final (setter unused)
+    private final int byte_code_offset;
+    private final StackMapType[] types_of_locals;
+    private final StackMapType[] types_of_stack_items;
+    private final ConstantPool constant_pool;
 
 
     /**
@@ -126,11 +126,6 @@ public final class StackMapEntry impleme
     }
 
 
-    public void setByteCodeOffset( int b ) { // TODO unused
-        byte_code_offset = b;
-    }
-
-
     public int getByteCodeOffset() {
         return byte_code_offset;
     }
@@ -141,11 +136,6 @@ public final class StackMapEntry impleme
     }
 
 
-    public void setTypesOfLocals( StackMapType[] types ) { // TODO unused
-        types_of_locals = types != null ? types : new StackMapType[0];
-    }
-
-
     public StackMapType[] getTypesOfLocals() {
         return types_of_locals;
     }
@@ -156,11 +146,6 @@ public final class StackMapEntry impleme
     }
 
 
-    public void setTypesOfStackItems( StackMapType[] types ) {
-        types_of_stack_items = types != null ? types : new StackMapType[0];
-    }
-
-
     public StackMapType[] getTypesOfStackItems() {
         return types_of_stack_items;
     }
@@ -197,11 +182,4 @@ public final class StackMapEntry impleme
         return constant_pool;
     }
 
-
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) { // TODO unused
-        this.constant_pool = constant_pool;
-    }
 }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTable.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTable.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTable.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTable.java Wed Aug 12 14:50:33 2015
@@ -41,7 +41,7 @@ import org.apache.commons.bcel6.Constant
 public final class StackMapTable extends Attribute {
 
     private static final long serialVersionUID = -5802191977296683162L;
-    private StackMapTableEntry[] map; // Table of stack map entries // TODO could be final (setter unused)
+    private StackMapTableEntry[] map; // Table of stack map entries TODO could be final if copy() and ctor were rewritten
 
 
     /*
@@ -98,14 +98,6 @@ public final class StackMapTable extends
     }
 
 
-    /**
-     * @param map Array of stack map entries
-     */
-    public final void setStackMapTable( StackMapTableEntry[] map ) { // TODO unused
-        this.map = map;
-    }
-
-
     /**
      * @return String representation.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java Wed Aug 12 14:50:33 2015
@@ -39,10 +39,10 @@ public final class StackMapTableEntry im
     private static final long serialVersionUID = 1L;
 
     private final int frame_type;
-    private int byte_code_offset_delta; // TODO could be final (setter unused)
-    private StackMapType[] types_of_locals; // TODO could be final (setter unused)
-    private StackMapType[] types_of_stack_items; // TODO could be final (setter unused)
-    private ConstantPool constant_pool; // TODO could be final (setter unused)
+    private int byte_code_offset_delta; // TODO could be final if ctor were rewritten
+    private StackMapType[] types_of_locals; // TODO could be final if ctor were rewritten
+    private StackMapType[] types_of_stack_items; // TODO could be final if ctor were rewritten
+    private final ConstantPool constant_pool; // TODO could be final if ctor were rewritten
 
 
     /**
@@ -196,11 +196,6 @@ public final class StackMapTableEntry im
     }
 
 
-    public void setByteCodeOffsetDelta( int b ) { // TODO unused
-        byte_code_offset_delta = b;
-    }
-
-
     public int getByteCodeOffsetDelta() {
         return byte_code_offset_delta;
     }
@@ -211,11 +206,6 @@ public final class StackMapTableEntry im
     }
 
 
-    public void setTypesOfLocals( StackMapType[] types ) { // TODO unused
-        types_of_locals = types != null ? types : new StackMapType[0];
-    }
-
-
     public StackMapType[] getTypesOfLocals() {
         return types_of_locals;
     }
@@ -226,11 +216,6 @@ public final class StackMapTableEntry im
     }
 
 
-    public void setTypesOfStackItems( StackMapType[] types ) { // TODO unused
-        types_of_stack_items = types != null ? types : new StackMapType[0];
-    }
-
-
     public StackMapType[] getTypesOfStackItems() {
         return types_of_stack_items;
     }
@@ -267,11 +252,4 @@ public final class StackMapTableEntry im
         return constant_pool;
     }
 
-
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
 }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java Wed Aug 12 14:50:33 2015
@@ -37,9 +37,9 @@ public final class StackMapType implemen
 
     private static final long serialVersionUID = 1L;
 
-    private byte type;
-    private int index = -1; // Index to CONSTANT_Class or offset
-    private ConstantPool constant_pool;
+    private final byte type;
+    private final int index; // Index to CONSTANT_Class or offset
+    private final ConstantPool constant_pool;
 
 
     /**
@@ -48,10 +48,12 @@ public final class StackMapType implemen
      * @throws IOException
      */
     StackMapType(DataInput file, ConstantPool constant_pool) throws IOException {
-        this(file.readByte(), -1, constant_pool);
-        if (hasIndex()) {
-            this.index = (int) file.readShort();
+        byte type = file.readByte();
+        if ((type < Constants.ITEM_Bogus) || (type > Constants.ITEM_NewObject)) {
+            throw new RuntimeException("Illegal type for StackMapType: " + type);
         }
+        this.type = type;
+        this.index = hasIndex() ? (int) file.readShort() : -1;
         this.constant_pool = constant_pool;
     }
 
@@ -70,24 +72,11 @@ public final class StackMapType implemen
     }
 
 
-    public void setType( byte t ) { // TODO unused
-        if ((t < Constants.ITEM_Bogus) || (t > Constants.ITEM_NewObject)) {
-            throw new RuntimeException("Illegal type for StackMapType: " + t);
-        }
-        type = t;
-    }
-
-
     public byte getType() {
         return type;
     }
 
 
-    public void setIndex( int t ) { // TODO unused
-        index = t;
-    }
-
-
     /** @return index to constant pool if type == ITEM_Object, or offset
      * in byte code, if type == ITEM_NewObject, and -1 otherwise
      */
@@ -159,11 +148,4 @@ public final class StackMapType implemen
         return constant_pool;
     }
 
-
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) { // TODO unused
-        this.constant_pool = constant_pool;
-    }
 }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Synthetic.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Synthetic.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Synthetic.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Synthetic.java Wed Aug 12 14:50:33 2015
@@ -38,7 +38,7 @@ import org.apache.commons.bcel6.Constant
 public final class Synthetic extends Attribute {
 
     private static final long serialVersionUID = -123334426995458366L;
-    private byte[] bytes;
+    private byte[] bytes; // TODO could be final if copy() and ctor were recoded
 
 
     /**
@@ -120,14 +120,6 @@ public final class Synthetic extends Att
     }
 
 
-    /**
-     * @param bytes
-     */
-    public final void setBytes( byte[] bytes ) { // TODO unused
-        this.bytes = bytes;
-    }
-
-
     /**
      * @return String representation.
      */

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Unknown.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Unknown.java?rev=1695544&r1=1695543&r2=1695544&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Unknown.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Unknown.java Wed Aug 12 14:50:33 2015
@@ -41,7 +41,7 @@ import org.apache.commons.bcel6.Constant
 public final class Unknown extends Attribute {
 
     private static final long serialVersionUID = -4099655108069755015L;
-    private byte[] bytes;
+    private byte[] bytes; // TODO could be final if copy() were adjusted
     private final String name;
     private static final Map<String, Unknown> unknown_attributes = new HashMap<String, Unknown>();
 
@@ -146,14 +146,6 @@ public final class Unknown extends Attri
     }
 
 
-    /**
-     * @param bytes the bytes to set
-     */
-    public final void setBytes( byte[] bytes ) { // TODO unused
-        this.bytes = bytes;
-    }
-
-
     /**
      * @return String representation.
      */