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 15:35:22 UTC
svn commit: r1695512 -
/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/
Author: sebb
Date: Wed Aug 12 13:35:21 2015
New Revision: 1695512
URL: http://svn.apache.org/r1695512
Log:
BCEL-235 Remove unused setters
(incomplete)
Modified:
commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java
commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantClass.java
commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantDouble.java
commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantFloat.java
commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantInteger.java
commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantLong.java
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
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java?rev=1695512&r1=1695511&r2=1695512&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java Wed Aug 12 13:35:21 2015
@@ -35,12 +35,12 @@ import org.apache.commons.bcel6.Constant
public final class CodeException implements Cloneable, Constants, Node, Serializable {
private static final long serialVersionUID = 2972500041254967221L;
- private int start_pc; // Range in the code the exception handler is TODO could be final (setter unused)
- private int end_pc; // active. start_pc is inclusive, end_pc exclusive TODO could be final (setter unused)
- private int handler_pc; /* Starting address of exception handler, i.e., TODO could be final (setter unused)
+ private final int start_pc; // Range in the code the exception handler is
+ private final int end_pc; // active. start_pc is inclusive, end_pc exclusive
+ private final int handler_pc; /* Starting address of exception handler, i.e.,
* an offset from start of code.
*/
- private int catch_type; /* If this is zero the handler catches any TODO could be final (setter unused)
+ private final int catch_type; /* If this is zero the handler catches any
* exception, otherwise it points to the
* exception class which is to be caught.
*/
@@ -142,38 +142,6 @@ public final class CodeException impleme
}
- /**
- * @param catch_type the type of exception that is caught
- */
- public final void setCatchType( int catch_type ) { // TODO unused
- this.catch_type = catch_type;
- }
-
-
- /**
- * @param end_pc end of handled block
- */
- public final void setEndPC( int end_pc ) { // TODO unused
- this.end_pc = end_pc;
- }
-
-
- /**
- * @param handler_pc where the actual code is
- */
- public final void setHandlerPC( int handler_pc ) { // TODO unused
- this.handler_pc = handler_pc;
- }
-
-
- /**
- * @param start_pc start of handled block
- */
- 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/ConstantClass.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantClass.java?rev=1695512&r1=1695511&r2=1695512&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantClass.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantClass.java Wed Aug 12 13:35:21 2015
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.Constant
public final class ConstantClass extends Constant implements ConstantObject {
private static final long serialVersionUID = -1083450233715258720L;
- private int name_index; // Identical to ConstantString except for the name TODO could be final (setter unused)
+ private final int name_index; // Identical to ConstantString except for the name
/**
@@ -100,14 +100,6 @@ public final class ConstantClass extends
}
- /**
- * @param name_index the name index in the constant pool of this Constant Class
- */
- public final void setNameIndex( int name_index ) {
- this.name_index = name_index;
- }
-
-
/** @return String object
*/
public Object getConstantValue( ConstantPool cp ) {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantDouble.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantDouble.java?rev=1695512&r1=1695511&r2=1695512&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantDouble.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantDouble.java Wed Aug 12 13:35:21 2015
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.Constant
public final class ConstantDouble extends Constant implements ConstantObject {
private static final long serialVersionUID = -7394764537394782136L;
- private double bytes; // TODO could be final (setter not used)
+ private final double bytes;
/**
@@ -99,14 +99,6 @@ public final class ConstantDouble extend
}
- /**
- * @param bytes the raw bytes that represent the double value
- */
- public final void setBytes( double bytes ) { // TODO unused
- this.bytes = bytes;
- }
-
-
/**
* @return String representation.
*/
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantFloat.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantFloat.java?rev=1695512&r1=1695511&r2=1695512&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantFloat.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantFloat.java Wed Aug 12 13:35:21 2015
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.Constant
public final class ConstantFloat extends Constant implements ConstantObject {
private static final long serialVersionUID = -2316732495687628398L;
- private float bytes; // TODO could be final (setter unused)
+ private final float bytes;
/**
@@ -100,14 +100,6 @@ public final class ConstantFloat extends
}
- /**
- * @param bytes the raw bytes that represent this float
- */
- public final void setBytes( float bytes ) { // TODO unused
- this.bytes = bytes;
- }
-
-
/**
* @return String representation.
*/
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantInteger.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantInteger.java?rev=1695512&r1=1695511&r2=1695512&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantInteger.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantInteger.java Wed Aug 12 13:35:21 2015
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.Constant
public final class ConstantInteger extends Constant implements ConstantObject {
private static final long serialVersionUID = -7040676276945754375L;
- private int bytes; // TODO could be final (setter unused)
+ private final int bytes;
/**
@@ -99,14 +99,6 @@ public final class ConstantInteger exten
}
- /**
- * @param bytes the raw bytes that represent this integer
- */
- public final void setBytes( int bytes ) { // TODO unused
- this.bytes = bytes;
- }
-
-
/**
* @return String representation.
*/
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantLong.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantLong.java?rev=1695512&r1=1695511&r2=1695512&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantLong.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantLong.java Wed Aug 12 13:35:21 2015
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.Constant
public final class ConstantLong extends Constant implements ConstantObject {
private static final long serialVersionUID = 8495971186433816161L;
- private long bytes; // TODO could be final (setter unused)
+ private final long bytes;
/**
@@ -99,14 +99,6 @@ public final class ConstantLong extends
}
- /**
- * @param bytes the raw bytes that represent this long
- */
- public final void setBytes( long bytes ) { // TODO unused
- this.bytes = bytes;
- }
-
-
/**
* @return String representation.
*/
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=1695512&r1=1695511&r2=1695512&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 Wed Aug 12 13:35:21 2015
@@ -34,8 +34,8 @@ import org.apache.commons.bcel6.Constant
public final class ConstantMethodHandle extends Constant {
private static final long serialVersionUID = -7875124116920198044L;
- private int reference_kind; // TODO could be final (setter unused)
- private int reference_index; // TODO could be final (setter unused)
+ private final int reference_kind;
+ private final int reference_index;
/**
@@ -96,21 +96,11 @@ public final class ConstantMethodHandle
}
- public void setReferenceKind(int reference_kind) { // TODO unused
- this.reference_kind = reference_kind;
- }
-
-
public int getReferenceIndex() {
return reference_index;
}
- public void setReferenceIndex(int reference_index) { // TODO unused
- this.reference_index = reference_index;
- }
-
-
/**
* @return String representation
*/
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=1695512&r1=1695511&r2=1695512&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 Wed Aug 12 13:35:21 2015
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.Constant
public final class ConstantMethodType extends Constant {
private static final long serialVersionUID = 6750768220616618881L;
- private int descriptor_index; // TODO could be final (setter unused)
+ private final int descriptor_index;
/**
@@ -93,11 +93,6 @@ public final class ConstantMethodType ex
}
- public void setDescriptorIndex(int descriptor_index) { // TODO unused
- this.descriptor_index = descriptor_index;
- }
-
-
/**
* @return String representation
*/