You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2016/06/01 04:25:32 UTC
svn commit: r1746378 [4/13] - in /commons/proper/bcel/trunk/src:
main/java/org/apache/commons/bcel6/
main/java/org/apache/commons/bcel6/classfile/
main/java/org/apache/commons/bcel6/generic/
main/java/org/apache/commons/bcel6/util/ main/java/org/apache...
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=1746378&r1=1746377&r2=1746378&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 Jun 1 04:25:27 2016
@@ -47,7 +47,7 @@ public final class StackMapEntry impleme
* @param input Input stream
* @throws IOException
*/
- StackMapEntry(DataInput input, ConstantPool constant_pool) throws IOException {
+ StackMapEntry(final DataInput input, final ConstantPool constant_pool) throws IOException {
this(input.readByte() & 0xFF, -1, null, null, constant_pool);
if (frame_type >= Const.SAME_FRAME && frame_type <= Const.SAME_FRAME_MAX) {
@@ -102,9 +102,9 @@ public final class StackMapEntry impleme
* @deprecated Since 6.0, use {@link #StackMapEntry(int, int, StackMapType[], StackMapType[], ConstantPool)}
* instead
*/
- public StackMapEntry(int byte_code_offset, int number_of_locals,
- StackMapType[] types_of_locals, int number_of_stack_items,
- StackMapType[] types_of_stack_items, ConstantPool constant_pool) {
+ public StackMapEntry(final int byte_code_offset, final int number_of_locals,
+ final StackMapType[] types_of_locals, final int number_of_stack_items,
+ final StackMapType[] types_of_stack_items, final ConstantPool constant_pool) {
this.byte_code_offset = byte_code_offset;
this.types_of_locals = types_of_locals != null ? types_of_locals : new StackMapType[0];
this.types_of_stack_items = types_of_stack_items != null ? types_of_stack_items : new StackMapType[0];
@@ -120,9 +120,9 @@ public final class StackMapEntry impleme
* @param types_of_stack_items array ot {@link StackMapType}s of stack items
* @param constant_pool the constant pool
*/
- public StackMapEntry(int tag, int byte_code_offset,
- StackMapType[] types_of_locals,
- StackMapType[] types_of_stack_items, ConstantPool constant_pool) {
+ public StackMapEntry(final int tag, final int byte_code_offset,
+ final StackMapType[] types_of_locals,
+ final StackMapType[] types_of_stack_items, final ConstantPool constant_pool) {
this.frame_type = tag;
this.byte_code_offset = byte_code_offset;
this.types_of_locals = types_of_locals != null ? types_of_locals : new StackMapType[0];
@@ -137,7 +137,7 @@ public final class StackMapEntry impleme
* @param file Output file stream
* @throws IOException
*/
- public final void dump( DataOutputStream file ) throws IOException {
+ public final void dump( final DataOutputStream file ) throws IOException {
file.write(frame_type);
if (frame_type >= Const.SAME_FRAME && frame_type <= Const.SAME_FRAME_MAX) {
// nothing to be done
@@ -261,7 +261,7 @@ public final class StackMapEntry impleme
}
- public void setFrameType( int f ) {
+ public void setFrameType( final int f ) {
if (f >= Const.SAME_FRAME && f <= Const.SAME_FRAME_MAX) {
byte_code_offset = f - Const.SAME_FRAME;
} else if (f >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME &&
@@ -284,7 +284,7 @@ public final class StackMapEntry impleme
}
- public void setByteCodeOffset( int new_offset ) {
+ public void setByteCodeOffset( final int new_offset ) {
if (new_offset < 0 || new_offset > 32767) {
throw new RuntimeException("Invalid StackMap offset: " + new_offset);
}
@@ -324,7 +324,7 @@ public final class StackMapEntry impleme
*
* @param int offset delta
*/
- public void updateByteCodeOffset(int delta) {
+ public void updateByteCodeOffset(final int delta) {
setByteCodeOffset(byte_code_offset + delta);
}
@@ -335,7 +335,7 @@ public final class StackMapEntry impleme
@java.lang.Deprecated
- public void setNumberOfLocals( int n ) { // TODO unused
+ public void setNumberOfLocals( final int n ) { // TODO unused
}
@@ -344,7 +344,7 @@ public final class StackMapEntry impleme
}
- public void setTypesOfLocals( StackMapType[] types ) {
+ public void setTypesOfLocals( final StackMapType[] types ) {
types_of_locals = types != null ? types : new StackMapType[0];
}
@@ -355,7 +355,7 @@ public final class StackMapEntry impleme
@java.lang.Deprecated
- public void setNumberOfStackItems( int n ) { // TODO unused
+ public void setNumberOfStackItems( final int n ) { // TODO unused
}
@@ -364,7 +364,7 @@ public final class StackMapEntry impleme
}
- public void setTypesOfStackItems( StackMapType[] types ) {
+ public void setTypesOfStackItems( final StackMapType[] types ) {
types_of_stack_items = types != null ? types : new StackMapType[0];
}
@@ -405,7 +405,7 @@ public final class StackMapEntry impleme
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitStackMapEntry(this);
}
@@ -421,7 +421,7 @@ public final class StackMapEntry impleme
/**
* @param constant_pool Constant pool to be used for this object.
*/
- public final void setConstantPool( ConstantPool constant_pool ) {
+ public final void setConstantPool( final 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=1746378&r1=1746377&r2=1746378&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 Jun 1 04:25:27 2016
@@ -44,7 +44,7 @@ public final class StackMapType implemen
* @param file Input stream
* @throws IOException
*/
- StackMapType(DataInput file, ConstantPool constant_pool) throws IOException {
+ StackMapType(final DataInput file, final ConstantPool constant_pool) throws IOException {
this(file.readByte(), -1, constant_pool);
if (hasIndex()) {
this.index = file.readShort();
@@ -57,7 +57,7 @@ public final class StackMapType implemen
* @param type type tag as defined in the Constants interface
* @param index index to constant pool, or byte code offset
*/
- public StackMapType(byte type, int index, ConstantPool constant_pool) {
+ public StackMapType(final byte type, final int index, final ConstantPool constant_pool) {
if ((type < Const.ITEM_Bogus) || (type > Const.ITEM_NewObject)) {
throw new RuntimeException("Illegal type for StackMapType: " + type);
}
@@ -67,7 +67,7 @@ public final class StackMapType implemen
}
- public void setType( byte t ) {
+ public void setType( final byte t ) {
if ((t < Const.ITEM_Bogus) || (t > Const.ITEM_NewObject)) {
throw new RuntimeException("Illegal type for StackMapType: " + t);
}
@@ -80,7 +80,7 @@ public final class StackMapType implemen
}
- public void setIndex( int t ) {
+ public void setIndex( final int t ) {
index = t;
}
@@ -99,7 +99,7 @@ public final class StackMapType implemen
* @param file Output file stream
* @throws IOException
*/
- public final void dump( DataOutputStream file ) throws IOException {
+ public final void dump( final DataOutputStream file ) throws IOException {
file.writeByte(type);
if (hasIndex()) {
file.writeShort(getIndex());
@@ -161,7 +161,7 @@ public final class StackMapType implemen
/**
* @param constant_pool Constant pool to be used for this object.
*/
- public final void setConstantPool( ConstantPool constant_pool ) {
+ public final void setConstantPool( final ConstantPool constant_pool ) {
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=1746378&r1=1746377&r2=1746378&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 Jun 1 04:25:27 2016
@@ -44,7 +44,7 @@ public final class Synthetic extends Att
* Initialize from another object. Note that both objects use the same
* references (shallow copy). Use copy() for a physical copy.
*/
- public Synthetic(Synthetic c) {
+ public Synthetic(final Synthetic c) {
this(c.getNameIndex(), c.getLength(), c.getBytes(), c.getConstantPool());
}
@@ -57,7 +57,7 @@ public final class Synthetic extends Att
* @param constant_pool The constant pool this attribute is associated
* with.
*/
- public Synthetic(int name_index, int length, byte[] bytes, ConstantPool constant_pool) {
+ public Synthetic(final int name_index, final int length, final byte[] bytes, final ConstantPool constant_pool) {
super(Const.ATTR_SYNTHETIC, name_index, length, constant_pool);
this.bytes = bytes;
}
@@ -72,7 +72,7 @@ public final class Synthetic extends Att
* @param constant_pool Array of constants
* @throws IOException
*/
- Synthetic(int name_index, int length, DataInput input, ConstantPool constant_pool)
+ Synthetic(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool)
throws IOException {
this(name_index, length, (byte[]) null, constant_pool);
if (length > 0) {
@@ -91,7 +91,7 @@ public final class Synthetic extends Att
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitSynthetic(this);
}
@@ -103,7 +103,7 @@ public final class Synthetic extends Att
* @throws IOException
*/
@Override
- public final void dump( DataOutputStream file ) throws IOException {
+ public final void dump( final DataOutputStream file ) throws IOException {
super.dump(file);
if (super.getLength() > 0) {
file.write(bytes, 0, super.getLength());
@@ -122,7 +122,7 @@ public final class Synthetic extends Att
/**
* @param bytes
*/
- public final void setBytes( byte[] bytes ) {
+ public final void setBytes( final byte[] bytes ) {
this.bytes = bytes;
}
@@ -144,7 +144,7 @@ public final class Synthetic extends Att
* @return deep copy of this attribute
*/
@Override
- public Attribute copy( ConstantPool _constant_pool ) {
+ public Attribute copy( final ConstantPool _constant_pool ) {
Synthetic c = (Synthetic) clone();
if (bytes != null) {
c.bytes = new byte[bytes.length];
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=1746378&r1=1746377&r2=1746378&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 Jun 1 04:25:27 2016
@@ -59,7 +59,7 @@ public final class Unknown extends Attri
* Initialize from another object. Note that both objects use the same
* references (shallow copy). Use clone() for a physical copy.
*/
- public Unknown(Unknown c) {
+ public Unknown(final Unknown c) {
this(c.getNameIndex(), c.getLength(), c.getBytes(), c.getConstantPool());
}
@@ -72,7 +72,7 @@ public final class Unknown extends Attri
* @param bytes Attribute contents
* @param constant_pool Array of constants
*/
- public Unknown(int name_index, int length, byte[] bytes, ConstantPool constant_pool) {
+ public Unknown(final int name_index, final int length, final byte[] bytes, final ConstantPool constant_pool) {
super(Const.ATTR_UNKNOWN, name_index, length, constant_pool);
this.bytes = bytes;
name = ((ConstantUtf8) constant_pool.getConstant(name_index, Const.CONSTANT_Utf8))
@@ -90,7 +90,7 @@ public final class Unknown extends Attri
* @param constant_pool Array of constants
* @throws IOException
*/
- Unknown(int name_index, int length, DataInput input, ConstantPool constant_pool)
+ Unknown(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool)
throws IOException {
this(name_index, length, (byte[]) null, constant_pool);
if (length > 0) {
@@ -108,7 +108,7 @@ public final class Unknown extends Attri
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitUnknown(this);
}
@@ -120,7 +120,7 @@ public final class Unknown extends Attri
* @throws IOException
*/
@Override
- public final void dump( DataOutputStream file ) throws IOException {
+ public final void dump( final DataOutputStream file ) throws IOException {
super.dump(file);
if (super.getLength() > 0) {
file.write(bytes, 0, super.getLength());
@@ -148,7 +148,7 @@ public final class Unknown extends Attri
/**
* @param bytes the bytes to set
*/
- public final void setBytes( byte[] bytes ) {
+ public final void setBytes( final byte[] bytes ) {
this.bytes = bytes;
}
@@ -177,7 +177,7 @@ public final class Unknown extends Attri
* @return deep copy of this attribute
*/
@Override
- public Attribute copy( ConstantPool _constant_pool ) {
+ public Attribute copy( final ConstantPool _constant_pool ) {
Unknown c = (Unknown) clone();
if (bytes != null) {
c.bytes = new byte[bytes.length];
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Utility.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Utility.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Utility.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Utility.java Wed Jun 1 04:25:27 2016
@@ -45,12 +45,12 @@ import org.apache.commons.bcel6.util.Byt
// @since 6.0 methods are no longer final
public abstract class Utility {
- private static int unwrap( ThreadLocal<Integer> tl ) {
+ private static int unwrap( final ThreadLocal<Integer> tl ) {
return tl.get().intValue();
}
- private static void wrap( ThreadLocal<Integer> tl, int value ) {
+ private static void wrap( final ThreadLocal<Integer> tl, final int value ) {
tl.set(Integer.valueOf(value));
}
@@ -82,7 +82,7 @@ public abstract class Utility {
* @param access_flags Access flags
* @return String representation of flags
*/
- public static String accessToString( int access_flags ) {
+ public static String accessToString( final int access_flags ) {
return accessToString(access_flags, false);
}
@@ -99,7 +99,7 @@ public abstract class Utility {
* @param for_class access flags are for class qualifiers ?
* @return String representation of flags
*/
- public static String accessToString( int access_flags, boolean for_class ) {
+ public static String accessToString( final int access_flags, final boolean for_class ) {
StringBuilder buf = new StringBuilder();
int p = 0;
for (int i = 0; p < Const.MAX_ACC_FLAG; i++) { // Loop through known flags
@@ -125,7 +125,7 @@ public abstract class Utility {
*
* @return "class" or "interface", depending on the ACC_INTERFACE flag
*/
- public static String classOrInterface( int access_flags ) {
+ public static String classOrInterface( final int access_flags ) {
return ((access_flags & Const.ACC_INTERFACE) != 0) ? "interface" : "class";
}
@@ -144,8 +144,8 @@ public abstract class Utility {
* @param verbose be verbose, e.g. print constant pool index
* @return String representation of byte codes
*/
- public static String codeToString( byte[] code, ConstantPool constant_pool, int index,
- int length, boolean verbose ) {
+ public static String codeToString( final byte[] code, final ConstantPool constant_pool, final int index,
+ final int length, final boolean verbose ) {
StringBuilder buf = new StringBuilder(code.length * 20); // Should be sufficient // CHECKSTYLE IGNORE MagicNumber
ByteSequence stream = new ByteSequence(code);
try {
@@ -168,7 +168,7 @@ public abstract class Utility {
}
- public static String codeToString( byte[] code, ConstantPool constant_pool, int index, int length ) {
+ public static String codeToString( final byte[] code, final ConstantPool constant_pool, final int index, final int length ) {
return codeToString(code, constant_pool, index, length, true);
}
@@ -184,8 +184,8 @@ public abstract class Utility {
*
* @throws IOException if a failure from reading from the bytes argument occurs
*/
- public static String codeToString( ByteSequence bytes, ConstantPool constant_pool,
- boolean verbose ) throws IOException {
+ public static String codeToString( final ByteSequence bytes, final ConstantPool constant_pool,
+ final boolean verbose ) throws IOException {
short opcode = (short) bytes.readUnsignedByte();
int default_offset = 0;
int low;
@@ -452,7 +452,7 @@ public abstract class Utility {
}
- public static String codeToString( ByteSequence bytes, ConstantPool constant_pool )
+ public static String codeToString( final ByteSequence bytes, final ConstantPool constant_pool )
throws IOException {
return codeToString(bytes, constant_pool, true);
}
@@ -465,7 +465,7 @@ public abstract class Utility {
* @param str The long class name
* @return Compacted class name
*/
- public static String compactClassName( String str ) {
+ public static String compactClassName( final String str ) {
return compactClassName(str, true);
}
@@ -481,7 +481,7 @@ public abstract class Utility {
* @param chopit Flag that determines whether chopping is executed or not
* @return Compacted class name
*/
- public static String compactClassName( String str, String prefix, boolean chopit ) {
+ public static String compactClassName( String str, final String prefix, final boolean chopit ) {
int len = prefix.length();
str = str.replace('/', '.'); // Is `/' on all systems, even DOS
if (chopit) {
@@ -504,7 +504,7 @@ public abstract class Utility {
* @param chopit Flag that determines whether chopping is executed or not
* @return Compacted class name
*/
- public static String compactClassName( String str, boolean chopit ) {
+ public static String compactClassName( final String str, final boolean chopit ) {
return compactClassName(str, "java.lang.", chopit);
}
@@ -512,7 +512,7 @@ public abstract class Utility {
/**
* @return `flag' with bit `i' set to 1
*/
- public static int setBit( int flag, int i ) {
+ public static int setBit( final int flag, final int i ) {
return flag | pow2(i);
}
@@ -520,7 +520,7 @@ public abstract class Utility {
/**
* @return `flag' with bit `i' set to 0
*/
- public static int clearBit( int flag, int i ) {
+ public static int clearBit( final int flag, final int i ) {
int bit = pow2(i);
return (flag & bit) == 0 ? flag : flag ^ bit;
}
@@ -529,7 +529,7 @@ public abstract class Utility {
/**
* @return true, if bit `i' in `flag' is set
*/
- public static boolean isSet( int flag, int i ) {
+ public static boolean isSet( final int flag, final int i ) {
return (flag & pow2(i)) != 0;
}
@@ -544,7 +544,7 @@ public abstract class Utility {
*
* @throws ClassFormatException if the signature is for Void
*/
- public static String methodTypeToSignature( String ret, String[] argv )
+ public static String methodTypeToSignature( final String ret, final String[] argv )
throws ClassFormatException {
StringBuilder buf = new StringBuilder("(");
String str;
@@ -568,7 +568,7 @@ public abstract class Utility {
* @return Array of argument types
* @throws ClassFormatException
*/
- public static String[] methodSignatureArgumentTypes( String signature )
+ public static String[] methodSignatureArgumentTypes( final String signature )
throws ClassFormatException {
return methodSignatureArgumentTypes(signature, true);
}
@@ -580,7 +580,7 @@ public abstract class Utility {
* @return Array of argument types
* @throws ClassFormatException
*/
- public static String[] methodSignatureArgumentTypes( String signature, boolean chopit )
+ public static String[] methodSignatureArgumentTypes( final String signature, final boolean chopit )
throws ClassFormatException {
List<String> vec = new ArrayList<>();
int index;
@@ -606,7 +606,7 @@ public abstract class Utility {
* @return return type of method
* @throws ClassFormatException
*/
- public static String methodSignatureReturnType( String signature ) throws ClassFormatException {
+ public static String methodSignatureReturnType( final String signature ) throws ClassFormatException {
return methodSignatureReturnType(signature, true);
}
@@ -617,7 +617,7 @@ public abstract class Utility {
* @return return type of method
* @throws ClassFormatException
*/
- public static String methodSignatureReturnType( String signature, boolean chopit ) throws ClassFormatException {
+ public static String methodSignatureReturnType( final String signature, final boolean chopit ) throws ClassFormatException {
int index;
String type;
try {
@@ -639,12 +639,12 @@ public abstract class Utility {
* @param access flags of method
* @return Human readable signature
*/
- public static String methodSignatureToString( String signature, String name, String access ) {
+ public static String methodSignatureToString( final String signature, final String name, final String access ) {
return methodSignatureToString(signature, name, access, true);
}
- public static String methodSignatureToString( String signature, String name, String access, boolean chopit ) {
+ public static String methodSignatureToString( final String signature, final String name, final String access, final boolean chopit ) {
return methodSignatureToString(signature, name, access, chopit, null);
}
@@ -684,8 +684,8 @@ public abstract class Utility {
* @return Java type declaration
* @throws ClassFormatException
*/
- public static String methodSignatureToString( String signature, String name,
- String access, boolean chopit, LocalVariableTable vars ) throws ClassFormatException {
+ public static String methodSignatureToString( final String signature, final String name,
+ final String access, final boolean chopit, final LocalVariableTable vars ) throws ClassFormatException {
StringBuilder buf = new StringBuilder("(");
String type;
int index;
@@ -731,7 +731,7 @@ public abstract class Utility {
// Guess what this does
- private static int pow2( int n ) {
+ private static int pow2( final int n ) {
return 1 << n;
}
@@ -744,7 +744,7 @@ public abstract class Utility {
* @param new_ Replacement string
* @return new String object
*/
- public static String replace( String str, String old, String new_ ) {
+ public static String replace( String str, final String old, final String new_ ) {
int index;
int old_index;
try {
@@ -773,7 +773,7 @@ public abstract class Utility {
* @param signature to convert
* @return Human readable signature
*/
- public static String signatureToString( String signature ) {
+ public static String signatureToString( final String signature ) {
return signatureToString(signature, true);
}
@@ -812,7 +812,7 @@ public abstract class Utility {
* @return Java type declaration
* @throws ClassFormatException
*/
- public static String signatureToString( String signature, boolean chopit ) {
+ public static String signatureToString( final String signature, final boolean chopit ) {
//corrected concurrent private static field acess
wrap(consumed_chars, 1); // This is the default, read just one char like `B'
try {
@@ -999,7 +999,7 @@ public abstract class Utility {
}
- private static int countBrackets( String brackets ) {
+ private static int countBrackets( final String brackets ) {
char[] chars = brackets.toCharArray();
int count = 0;
boolean open = false;
@@ -1039,7 +1039,7 @@ public abstract class Utility {
*
* @throws ClassFormatException if signature is not a method signature
*/
- public static byte typeOfMethodSignature( String signature ) throws ClassFormatException {
+ public static byte typeOfMethodSignature( final String signature ) throws ClassFormatException {
int index;
try {
if (signature.charAt(0) != '(') {
@@ -1062,7 +1062,7 @@ public abstract class Utility {
*
* @throws ClassFormatException if signature isn't a known type
*/
- public static byte typeOfSignature( String signature ) throws ClassFormatException {
+ public static byte typeOfSignature( final String signature ) throws ClassFormatException {
try {
switch (signature.charAt(0)) {
case 'B':
@@ -1114,7 +1114,7 @@ public abstract class Utility {
* Convert (signed) byte to (unsigned) short value, i.e., all negative
* values become positive.
*/
- private static short byteToShort( byte b ) {
+ private static short byteToShort( final byte b ) {
return (b < 0) ? (short) (256 + b) : (short) b;
}
@@ -1125,7 +1125,7 @@ public abstract class Utility {
*
* @return bytes as hexadecimal string, e.g. 00 fa 12 ...
*/
- public static String toHexString( byte[] bytes ) {
+ public static String toHexString( final byte[] bytes ) {
StringBuilder buf = new StringBuilder();
for (int i = 0; i < bytes.length; i++) {
short b = byteToShort(bytes[i]);
@@ -1152,7 +1152,7 @@ public abstract class Utility {
* @param fill fill character
* @return formatted int
*/
- public static String format( int i, int length, boolean left_justify, char fill ) {
+ public static String format( final int i, final int length, final boolean left_justify, final char fill ) {
return fillup(Integer.toString(i), length, left_justify, fill);
}
@@ -1166,7 +1166,7 @@ public abstract class Utility {
* @param fill fill character
* @return formatted string
*/
- public static String fillup( String str, int length, boolean left_justify, char fill ) {
+ public static String fillup( final String str, final int length, final boolean left_justify, final char fill ) {
int len = length - str.length();
char[] buf = new char[(len < 0) ? 0 : len];
for (int j = 0; j < buf.length; j++) {
@@ -1179,7 +1179,7 @@ public abstract class Utility {
}
- static boolean equals( byte[] a, byte[] b ) {
+ static boolean equals( final byte[] a, final byte[] b ) {
int size;
if ((size = a.length) != b.length) {
return false;
@@ -1193,27 +1193,27 @@ public abstract class Utility {
}
- public static void printArray( PrintStream out, Object[] obj ) {
+ public static void printArray( final PrintStream out, final Object[] obj ) {
out.println(printArray(obj, true));
}
- public static void printArray( PrintWriter out, Object[] obj ) {
+ public static void printArray( final PrintWriter out, final Object[] obj ) {
out.println(printArray(obj, true));
}
- public static String printArray( Object[] obj ) {
+ public static String printArray( final Object[] obj ) {
return printArray(obj, true);
}
- public static String printArray( Object[] obj, boolean braces ) {
+ public static String printArray( final Object[] obj, final boolean braces ) {
return printArray(obj, braces, false);
}
- public static String printArray( Object[] obj, boolean braces, boolean quote ) {
+ public static String printArray( final Object[] obj, final boolean braces, final boolean quote ) {
if (obj == null) {
return null;
}
@@ -1243,7 +1243,7 @@ public abstract class Utility {
*
* @return true, if character is one of (a, ... z, A, ... Z, 0, ... 9, _)
*/
- public static boolean isJavaIdentifierPart( char ch ) {
+ public static boolean isJavaIdentifierPart( final char ch ) {
return ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z'))
|| ((ch >= '0') && (ch <= '9')) || (ch == '_');
}
@@ -1269,7 +1269,7 @@ public abstract class Utility {
*
* @throws IOException if there's a gzip exception
*/
- public static String encode( byte[] bytes, boolean compress ) throws IOException {
+ public static String encode( byte[] bytes, final boolean compress ) throws IOException {
if (compress) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
GZIPOutputStream gos = new GZIPOutputStream(baos);
@@ -1297,7 +1297,7 @@ public abstract class Utility {
*
* @throws IOException if there's a gzip exception
*/
- public static byte[] decode( String s, boolean uncompress ) throws IOException {
+ public static byte[] decode( final String s, final boolean uncompress ) throws IOException {
char[] chars = s.toCharArray();
CharArrayReader car = new CharArrayReader(chars);
JavaReader jr = new JavaReader(car);
@@ -1354,7 +1354,7 @@ public abstract class Utility {
*/
private static class JavaReader extends FilterReader {
- public JavaReader(Reader in) {
+ public JavaReader(final Reader in) {
super(in);
}
@@ -1385,7 +1385,7 @@ public abstract class Utility {
@Override
- public int read( char[] cbuf, int off, int len ) throws IOException {
+ public int read( final char[] cbuf, final int off, final int len ) throws IOException {
for (int i = 0; i < len; i++) {
cbuf[off + i] = (char) read();
}
@@ -1399,13 +1399,13 @@ public abstract class Utility {
*/
private static class JavaWriter extends FilterWriter {
- public JavaWriter(Writer out) {
+ public JavaWriter(final Writer out) {
super(out);
}
@Override
- public void write( int b ) throws IOException {
+ public void write( final int b ) throws IOException {
if (isJavaIdentifierPart((char) b) && (b != ESCAPE_CHAR)) {
out.write(b);
} else {
@@ -1428,7 +1428,7 @@ public abstract class Utility {
@Override
- public void write( char[] cbuf, int off, int len ) throws IOException {
+ public void write( final char[] cbuf, final int off, final int len ) throws IOException {
for (int i = 0; i < len; i++) {
write(cbuf[off + i]);
}
@@ -1436,7 +1436,7 @@ public abstract class Utility {
@Override
- public void write( String str, int off, int len ) throws IOException {
+ public void write( final String str, final int off, final int len ) throws IOException {
write(str.toCharArray(), off, len);
}
}
@@ -1445,7 +1445,7 @@ public abstract class Utility {
/**
* Escape all occurences of newline chars '\n', quotes \", etc.
*/
- public static String convertString( String label ) {
+ public static String convertString( final String label ) {
char[] ch = label.toCharArray();
StringBuilder buf = new StringBuilder();
for (char element : ch) {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AALOAD.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AALOAD.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AALOAD.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AALOAD.java Wed Jun 1 04:25:27 2016
@@ -41,7 +41,7 @@ public class AALOAD extends ArrayInstruc
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitStackProducer(this);
v.visitExceptionThrower(this);
v.visitTypedInstruction(this);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AASTORE.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AASTORE.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AASTORE.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AASTORE.java Wed Jun 1 04:25:27 2016
@@ -41,7 +41,7 @@ public class AASTORE extends ArrayInstru
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitStackConsumer(this);
v.visitExceptionThrower(this);
v.visitTypedInstruction(this);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ACONST_NULL.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ACONST_NULL.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ACONST_NULL.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ACONST_NULL.java Wed Jun 1 04:25:27 2016
@@ -36,7 +36,7 @@ public class ACONST_NULL extends Instruc
/** @return Type.NULL
*/
@Override
- public Type getType( ConstantPoolGen cp ) {
+ public Type getType( final ConstantPoolGen cp ) {
return Type.NULL;
}
@@ -50,7 +50,7 @@ public class ACONST_NULL extends Instruc
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitStackProducer(this);
v.visitPushInstruction(this);
v.visitTypedInstruction(this);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ALOAD.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ALOAD.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ALOAD.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ALOAD.java Wed Jun 1 04:25:27 2016
@@ -37,7 +37,7 @@ public class ALOAD extends LoadInstructi
/** Load reference from local variable
* @param n index of local variable
*/
- public ALOAD(int n) {
+ public ALOAD(final int n) {
super(org.apache.commons.bcel6.Const.ALOAD, org.apache.commons.bcel6.Const.ALOAD_0, n);
}
@@ -51,7 +51,7 @@ public class ALOAD extends LoadInstructi
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
super.accept(v);
v.visitALOAD(this);
}
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ANEWARRAY.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ANEWARRAY.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ANEWARRAY.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ANEWARRAY.java Wed Jun 1 04:25:27 2016
@@ -36,7 +36,7 @@ public class ANEWARRAY extends CPInstruc
}
- public ANEWARRAY(int index) {
+ public ANEWARRAY(final int index) {
super(org.apache.commons.bcel6.Const.ANEWARRAY, index);
}
@@ -57,7 +57,7 @@ public class ANEWARRAY extends CPInstruc
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitLoadClass(this);
v.visitAllocationInstruction(this);
v.visitExceptionThrower(this);
@@ -69,7 +69,7 @@ public class ANEWARRAY extends CPInstruc
@Override
- public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
+ public ObjectType getLoadClassType( final ConstantPoolGen cpg ) {
Type t = getType(cpg);
if (t instanceof ArrayType) {
t = ((ArrayType) t).getBasicType();
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARETURN.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARETURN.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARETURN.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARETURN.java Wed Jun 1 04:25:27 2016
@@ -42,7 +42,7 @@ public class ARETURN extends ReturnInstr
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitExceptionThrower(this);
v.visitTypedInstruction(this);
v.visitStackConsumer(this);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARRAYLENGTH.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARRAYLENGTH.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARRAYLENGTH.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARRAYLENGTH.java Wed Jun 1 04:25:27 2016
@@ -53,7 +53,7 @@ public class ARRAYLENGTH extends Instruc
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitExceptionThrower(this);
v.visitStackProducer(this);
v.visitARRAYLENGTH(this);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ASTORE.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ASTORE.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ASTORE.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ASTORE.java Wed Jun 1 04:25:27 2016
@@ -37,7 +37,7 @@ public class ASTORE extends StoreInstruc
/** Store reference into local variable
* @param n index of local variable
*/
- public ASTORE(int n) {
+ public ASTORE(final int n) {
super(org.apache.commons.bcel6.Const.ASTORE, org.apache.commons.bcel6.Const.ASTORE_0, n);
}
@@ -51,7 +51,7 @@ public class ASTORE extends StoreInstruc
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
super.accept(v);
v.visitASTORE(this);
}
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ATHROW.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ATHROW.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ATHROW.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ATHROW.java Wed Jun 1 04:25:27 2016
@@ -54,7 +54,7 @@ public class ATHROW extends Instruction
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitUnconditionalBranch(this);
v.visitExceptionThrower(this);
v.visitATHROW(this);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AnnotationElementValueGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AnnotationElementValueGen.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AnnotationElementValueGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AnnotationElementValueGen.java Wed Jun 1 04:25:27 2016
@@ -31,14 +31,14 @@ public class AnnotationElementValueGen e
// For annotation element values, this is the annotation
private final AnnotationEntryGen a;
- public AnnotationElementValueGen(AnnotationEntryGen a, ConstantPoolGen cpool)
+ public AnnotationElementValueGen(final AnnotationEntryGen a, final ConstantPoolGen cpool)
{
super(ANNOTATION, cpool);
this.a = a;
}
- public AnnotationElementValueGen(int type, AnnotationEntryGen annotation,
- ConstantPoolGen cpool)
+ public AnnotationElementValueGen(final int type, final AnnotationEntryGen annotation,
+ final ConstantPoolGen cpool)
{
super(type, cpool);
if (type != ANNOTATION) {
@@ -48,15 +48,15 @@ public class AnnotationElementValueGen e
this.a = annotation;
}
- public AnnotationElementValueGen(AnnotationElementValue value,
- ConstantPoolGen cpool, boolean copyPoolEntries)
+ public AnnotationElementValueGen(final AnnotationElementValue value,
+ final ConstantPoolGen cpool, final boolean copyPoolEntries)
{
super(ANNOTATION, cpool);
a = new AnnotationEntryGen(value.getAnnotationEntry(), cpool, copyPoolEntries);
}
@Override
- public void dump(DataOutputStream dos) throws IOException
+ public void dump(final DataOutputStream dos) throws IOException
{
dos.writeByte(super.getElementValueType()); // u1 type of value (ANNOTATION == '@')
a.dump(dos);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AnnotationEntryGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AnnotationEntryGen.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AnnotationEntryGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AnnotationEntryGen.java Wed Jun 1 04:25:27 2016
@@ -55,8 +55,8 @@ public class AnnotationEntryGen {
* entries across. We need to copy the type and the element name value pairs
* and the visibility.
*/
- public AnnotationEntryGen(AnnotationEntry a, ConstantPoolGen cpool,
- boolean copyPoolEntries) {
+ public AnnotationEntryGen(final AnnotationEntry a, final ConstantPoolGen cpool,
+ final boolean copyPoolEntries) {
this.cpool = cpool;
if (copyPoolEntries) {
typeIndex = cpool.addUtf8(a.getAnnotationType());
@@ -67,8 +67,8 @@ public class AnnotationEntryGen {
evs = copyValues(a.getElementValuePairs(), cpool, copyPoolEntries);
}
- private List<ElementValuePairGen> copyValues(ElementValuePair[] in, ConstantPoolGen cpool,
- boolean copyPoolEntries) {
+ private List<ElementValuePairGen> copyValues(final ElementValuePair[] in, final ConstantPoolGen cpool,
+ final boolean copyPoolEntries) {
List<ElementValuePairGen> out = new ArrayList<>();
for (ElementValuePair nvp : in) {
out.add(new ElementValuePairGen(nvp, cpool, copyPoolEntries));
@@ -76,7 +76,7 @@ public class AnnotationEntryGen {
return out;
}
- private AnnotationEntryGen(ConstantPoolGen cpool) {
+ private AnnotationEntryGen(final ConstantPoolGen cpool) {
this.cpool = cpool;
}
@@ -92,17 +92,17 @@ public class AnnotationEntryGen {
return a;
}
- public AnnotationEntryGen(ObjectType type,
- List<ElementValuePairGen> elements, boolean vis,
- ConstantPoolGen cpool) {
+ public AnnotationEntryGen(final ObjectType type,
+ final List<ElementValuePairGen> elements, final boolean vis,
+ final ConstantPoolGen cpool) {
this.cpool = cpool;
this.typeIndex = cpool.addUtf8(type.getSignature());
evs = elements;
isRuntimeVisible = vis;
}
- public static AnnotationEntryGen read(DataInput dis,
- ConstantPoolGen cpool, boolean b) throws IOException {
+ public static AnnotationEntryGen read(final DataInput dis,
+ final ConstantPoolGen cpool, final boolean b) throws IOException {
AnnotationEntryGen a = new AnnotationEntryGen(cpool);
a.typeIndex = dis.readUnsignedShort();
int elemValuePairCount = dis.readUnsignedShort();
@@ -115,7 +115,7 @@ public class AnnotationEntryGen {
return a;
}
- public void dump(DataOutputStream dos) throws IOException {
+ public void dump(final DataOutputStream dos) throws IOException {
dos.writeShort(typeIndex); // u2 index of type name in cpool
dos.writeShort(evs.size()); // u2 element_value pair count
for (ElementValuePairGen envp : evs) {
@@ -123,7 +123,7 @@ public class AnnotationEntryGen {
}
}
- public void addElementNameValuePair(ElementValuePairGen evp) {
+ public void addElementNameValuePair(final ElementValuePairGen evp) {
if (evs == null) {
evs = new ArrayList<>();
}
@@ -180,7 +180,7 @@ public class AnnotationEntryGen {
return s.toString();
}
- private void isRuntimeVisible(boolean b) {
+ private void isRuntimeVisible(final boolean b) {
isRuntimeVisible = b;
}
@@ -196,7 +196,7 @@ public class AnnotationEntryGen {
* @param cp The constant pool gen where we can create the necessary name refs
* @param annotationEntryGens An array of AnnotationGen objects
*/
- static Attribute[] getAnnotationAttributes(ConstantPoolGen cp, AnnotationEntryGen[] annotationEntryGens) {
+ static Attribute[] getAnnotationAttributes(final ConstantPoolGen cp, final AnnotationEntryGen[] annotationEntryGens) {
if (annotationEntryGens.length == 0) {
return new Attribute[0];
}
@@ -274,8 +274,8 @@ public class AnnotationEntryGen {
* - RuntimeInvisibleParameterAnnotations
*/
static Attribute[] getParameterAnnotationAttributes(
- ConstantPoolGen cp,
- List<AnnotationEntryGen>[] /*Array of lists, array size depends on #params */vec) {
+ final ConstantPoolGen cp,
+ final List<AnnotationEntryGen>[] /*Array of lists, array size depends on #params */vec) {
int[] visCount = new int[vec.length];
int totalVisCount = 0;
int[] invisCount = new int[vec.length];
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArithmeticInstruction.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArithmeticInstruction.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArithmeticInstruction.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArithmeticInstruction.java Wed Jun 1 04:25:27 2016
@@ -38,7 +38,7 @@ public abstract class ArithmeticInstruct
/**
* @param opcode of instruction
*/
- protected ArithmeticInstruction(short opcode) {
+ protected ArithmeticInstruction(final short opcode) {
super(opcode, (short) 1);
}
@@ -46,7 +46,7 @@ public abstract class ArithmeticInstruct
/** @return type associated with the instruction
*/
@Override
- public Type getType( ConstantPoolGen cp ) {
+ public Type getType( final ConstantPoolGen cp ) {
final short _opcode = super.getOpcode();
switch (_opcode) {
case Const.DADD:
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArrayElementValueGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArrayElementValueGen.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArrayElementValueGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArrayElementValueGen.java Wed Jun 1 04:25:27 2016
@@ -34,14 +34,14 @@ public class ArrayElementValueGen extend
// modify ...
private final List<ElementValueGen> evalues;
- public ArrayElementValueGen(ConstantPoolGen cp)
+ public ArrayElementValueGen(final ConstantPoolGen cp)
{
super(ARRAY, cp);
evalues = new ArrayList<>();
}
- public ArrayElementValueGen(int type, ElementValue[] datums,
- ConstantPoolGen cpool)
+ public ArrayElementValueGen(final int type, final ElementValue[] datums,
+ final ConstantPoolGen cpool)
{
super(type, cpool);
if (type != ARRAY) {
@@ -74,8 +74,8 @@ public class ArrayElementValueGen extend
* @param value
* @param cpool
*/
- public ArrayElementValueGen(ArrayElementValue value, ConstantPoolGen cpool,
- boolean copyPoolEntries)
+ public ArrayElementValueGen(final ArrayElementValue value, final ConstantPoolGen cpool,
+ final boolean copyPoolEntries)
{
super(ARRAY, cpool);
evalues = new ArrayList<>();
@@ -86,7 +86,7 @@ public class ArrayElementValueGen extend
}
@Override
- public void dump(DataOutputStream dos) throws IOException
+ public void dump(final DataOutputStream dos) throws IOException
{
dos.writeByte(super.getElementValueType()); // u1 type of value (ARRAY == '[')
dos.writeShort(evalues.size());
@@ -120,7 +120,7 @@ public class ArrayElementValueGen extend
return evalues.size();
}
- public void addElement(ElementValueGen gen)
+ public void addElement(final ElementValueGen gen)
{
evalues.add(gen);
}
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArrayInstruction.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArrayInstruction.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArrayInstruction.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArrayInstruction.java Wed Jun 1 04:25:27 2016
@@ -38,7 +38,7 @@ public abstract class ArrayInstruction e
/**
* @param opcode of instruction
*/
- protected ArrayInstruction(short opcode) {
+ protected ArrayInstruction(final short opcode) {
super(opcode, (short) 1);
}
@@ -52,7 +52,7 @@ public abstract class ArrayInstruction e
/** @return type associated with the instruction
*/
@Override
- public Type getType( ConstantPoolGen cp ) {
+ public Type getType( final ConstantPoolGen cp ) {
final short _opcode = super.getOpcode();
switch (_opcode) {
case org.apache.commons.bcel6.Const.IALOAD:
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArrayType.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArrayType.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArrayType.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ArrayType.java Wed Jun 1 04:25:27 2016
@@ -35,7 +35,7 @@ public final class ArrayType extends Ref
*
* @param type array type, e.g. T_INT
*/
- public ArrayType(byte type, int dimensions) {
+ public ArrayType(final byte type, final int dimensions) {
this(BasicType.getType(type), dimensions);
}
@@ -45,7 +45,7 @@ public final class ArrayType extends Ref
*
* @param class_name complete name of class (java.lang.String, e.g.)
*/
- public ArrayType(String class_name, int dimensions) {
+ public ArrayType(final String class_name, final int dimensions) {
this(ObjectType.getInstance(class_name), dimensions);
}
@@ -55,7 +55,7 @@ public final class ArrayType extends Ref
*
* @param type type of array (may be an array itself)
*/
- public ArrayType(Type type, int dimensions) {
+ public ArrayType(final Type type, final int dimensions) {
super(Const.T_ARRAY, "<dummy>");
if ((dimensions < 1) || (dimensions > Const.MAX_BYTE)) {
throw new ClassGenException("Invalid number of dimensions: " + dimensions);
@@ -119,7 +119,7 @@ public final class ArrayType extends Ref
/** @return true if both type objects refer to the same array type.
*/
@Override
- public boolean equals( Object _type ) {
+ public boolean equals( final Object _type ) {
if (_type instanceof ArrayType) {
ArrayType array = (ArrayType) _type;
return (array.dimensions == dimensions) && array.basic_type.equals(basic_type);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BALOAD.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BALOAD.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BALOAD.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BALOAD.java Wed Jun 1 04:25:27 2016
@@ -41,7 +41,7 @@ public class BALOAD extends ArrayInstruc
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitStackProducer(this);
v.visitExceptionThrower(this);
v.visitTypedInstruction(this);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BASTORE.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BASTORE.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BASTORE.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BASTORE.java Wed Jun 1 04:25:27 2016
@@ -41,7 +41,7 @@ public class BASTORE extends ArrayInstru
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitStackConsumer(this);
v.visitExceptionThrower(this);
v.visitTypedInstruction(this);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BIPUSH.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BIPUSH.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BIPUSH.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BIPUSH.java Wed Jun 1 04:25:27 2016
@@ -44,7 +44,7 @@ public class BIPUSH extends Instruction
/** Push byte on stack
*/
- public BIPUSH(byte b) {
+ public BIPUSH(final byte b) {
super(org.apache.commons.bcel6.Const.BIPUSH, (short) 2);
this.b = b;
}
@@ -54,7 +54,7 @@ public class BIPUSH extends Instruction
* Dump instruction as byte code to stream out.
*/
@Override
- public void dump( DataOutputStream out ) throws IOException {
+ public void dump( final DataOutputStream out ) throws IOException {
super.dump(out);
out.writeByte(b);
}
@@ -64,7 +64,7 @@ public class BIPUSH extends Instruction
* @return mnemonic for instruction
*/
@Override
- public String toString( boolean verbose ) {
+ public String toString( final boolean verbose ) {
return super.toString(verbose) + " " + b;
}
@@ -73,7 +73,7 @@ public class BIPUSH extends Instruction
* Read needed data (e.g. index) from file.
*/
@Override
- protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+ protected void initFromFile( final ByteSequence bytes, final boolean wide ) throws IOException {
super.setLength(2);
b = bytes.readByte();
}
@@ -88,7 +88,7 @@ public class BIPUSH extends Instruction
/** @return Type.BYTE
*/
@Override
- public Type getType( ConstantPoolGen cp ) {
+ public Type getType( final ConstantPoolGen cp ) {
return Type.BYTE;
}
@@ -102,7 +102,7 @@ public class BIPUSH extends Instruction
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitPushInstruction(this);
v.visitStackProducer(this);
v.visitTypedInstruction(this);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BREAKPOINT.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BREAKPOINT.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BREAKPOINT.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BREAKPOINT.java Wed Jun 1 04:25:27 2016
@@ -38,7 +38,7 @@ public class BREAKPOINT extends Instruct
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitBREAKPOINT(this);
}
}
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BasicType.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BasicType.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BasicType.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BasicType.java Wed Jun 1 04:25:27 2016
@@ -32,7 +32,7 @@ public final class BasicType extends Typ
* @param type one of T_INT, T_BOOLEAN, ..., T_VOID
* @see Const
*/
- BasicType(byte type) {
+ BasicType(final byte type) {
super(type, Const.getShortTypeName(type));
if ((type < Const.T_BOOLEAN) || (type > Const.T_VOID)) {
throw new ClassGenException("Invalid type: " + type);
@@ -41,7 +41,7 @@ public final class BasicType extends Typ
// @since 6.0 no longer final
- public static BasicType getType( byte type ) {
+ public static BasicType getType( final byte type ) {
switch (type) {
case Const.T_VOID:
return VOID;
@@ -78,7 +78,7 @@ public final class BasicType extends Typ
/** @return true if both type objects refer to the same type
*/
@Override
- public boolean equals( Object _type ) {
+ public boolean equals( final Object _type ) {
return (_type instanceof BasicType) ? ((BasicType) _type).getType() == this.getType() : false;
}
}
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BranchHandle.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BranchHandle.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BranchHandle.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BranchHandle.java Wed Jun 1 04:25:27 2016
@@ -30,7 +30,7 @@ package org.apache.commons.bcel6.generic
*/
public final class BranchHandle extends InstructionHandle {
- private BranchHandle(BranchInstruction i) {
+ private BranchHandle(final BranchInstruction i) {
super(i);
}
@@ -39,7 +39,7 @@ public final class BranchHandle extends
private static BranchHandle bh_list = null; // List of reusable handles
- static BranchHandle getBranchHandle( BranchInstruction i ) {
+ static BranchHandle getBranchHandle( final BranchInstruction i ) {
if (bh_list == null) {
return new BranchHandle(i);
}
@@ -75,7 +75,7 @@ public final class BranchHandle extends
@Override
- void setPosition( int pos ) {
+ void setPosition( final int pos ) {
// Original code: i_position = bi.position = pos;
getBI().setPosition(pos);
super.setPosition(pos);
@@ -83,7 +83,7 @@ public final class BranchHandle extends
@Override
- protected int updatePosition( int offset, int max_offset ) {
+ protected int updatePosition( final int offset, final int max_offset ) {
int x = getBI().updatePosition(offset, max_offset);
super.setPosition(getBI().getPosition());
return x;
@@ -93,7 +93,7 @@ public final class BranchHandle extends
/**
* Pass new target to instruction.
*/
- public void setTarget( InstructionHandle ih ) {
+ public void setTarget( final InstructionHandle ih ) {
getBI().setTarget(ih);
}
@@ -101,7 +101,7 @@ public final class BranchHandle extends
/**
* Update target of instruction.
*/
- public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
+ public void updateTarget( final InstructionHandle old_ih, final InstructionHandle new_ih ) {
getBI().updateTarget(old_ih, new_ih);
}
@@ -118,7 +118,7 @@ public final class BranchHandle extends
* Set new contents. Old instruction is disposed and may not be used anymore.
*/
@Override // This is only done in order to apply the additional type check; could be merged with super impl.
- public void setInstruction( Instruction i ) { // TODO could be package-protected?
+ public void setInstruction( final Instruction i ) { // TODO could be package-protected?
super.setInstruction(i);
if (!(i instanceof BranchInstruction)) {
throw new ClassGenException("Assigning " + i
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BranchInstruction.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BranchInstruction.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BranchInstruction.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/BranchInstruction.java Wed Jun 1 04:25:27 2016
@@ -63,7 +63,7 @@ public abstract class BranchInstruction
* @param opcode Instruction opcode
* @param target instruction to branch to
*/
- protected BranchInstruction(short opcode, InstructionHandle target) {
+ protected BranchInstruction(final short opcode, final InstructionHandle target) {
super(opcode, (short) 3);
setTarget(target);
}
@@ -74,7 +74,7 @@ public abstract class BranchInstruction
* @param out Output stream
*/
@Override
- public void dump( DataOutputStream out ) throws IOException {
+ public void dump( final DataOutputStream out ) throws IOException {
out.writeByte(super.getOpcode());
index = getTargetOffset();
if (!isValidShort(index)) {
@@ -88,7 +88,7 @@ public abstract class BranchInstruction
* @param _target branch target
* @return the offset to `target' relative to this instruction
*/
- protected int getTargetOffset( InstructionHandle _target ) {
+ protected int getTargetOffset( final InstructionHandle _target ) {
if (_target == null) {
throw new ClassGenException("Target of " + super.toString(true)
+ " is invalid null handle");
@@ -120,7 +120,7 @@ public abstract class BranchInstruction
* @param max_offset the maximum offset that may be caused by these instructions
* @return additional offset caused by possible change of this instruction's length
*/
- protected int updatePosition( int offset, int max_offset ) {
+ protected int updatePosition( final int offset, final int max_offset ) {
position += offset;
return 0;
}
@@ -138,7 +138,7 @@ public abstract class BranchInstruction
* @return mnemonic for instruction
*/
@Override
- public String toString( boolean verbose ) {
+ public String toString( final boolean verbose ) {
String s = super.toString(verbose);
String t = "null";
if (verbose) {
@@ -175,7 +175,7 @@ public abstract class BranchInstruction
* @see InstructionList
*/
@Override
- protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+ protected void initFromFile( final ByteSequence bytes, final boolean wide ) throws IOException {
super.setLength(3);
index = bytes.readShort();
}
@@ -201,7 +201,7 @@ public abstract class BranchInstruction
* Set branch target
* @param target branch target
*/
- public void setTarget( InstructionHandle target ) {
+ public void setTarget( final InstructionHandle target ) {
notifyTarget(this.target, target, this);
this.target = target;
}
@@ -210,8 +210,8 @@ public abstract class BranchInstruction
/**
* Used by BranchInstruction, LocalVariableGen, CodeExceptionGen, LineNumberGen
*/
- static void notifyTarget( InstructionHandle old_ih, InstructionHandle new_ih,
- InstructionTargeter t ) {
+ static void notifyTarget( final InstructionHandle old_ih, final InstructionHandle new_ih,
+ final InstructionTargeter t ) {
if (old_ih != null) {
old_ih.removeTargeter(t);
}
@@ -226,7 +226,7 @@ public abstract class BranchInstruction
* @param new_ih new target
*/
@Override
- public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
+ public void updateTarget( final InstructionHandle old_ih, final InstructionHandle new_ih ) {
if (target == old_ih) {
setTarget(new_ih);
} else {
@@ -239,7 +239,7 @@ public abstract class BranchInstruction
* @return true, if ih is target of this instruction
*/
@Override
- public boolean containsTarget( InstructionHandle ih ) {
+ public boolean containsTarget( final InstructionHandle ih ) {
return target == ih;
}
@@ -269,7 +269,7 @@ public abstract class BranchInstruction
* @return the new position
* @since 6.0
*/
- protected void setPosition(int position) {
+ protected void setPosition(final int position) {
this.position = position;
}
@@ -278,7 +278,7 @@ public abstract class BranchInstruction
* @param index the index to set
* @since 6.0
*/
- protected void setIndex(int index) {
+ protected void setIndex(final int index) {
this.index = index;
}
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CALOAD.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CALOAD.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CALOAD.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CALOAD.java Wed Jun 1 04:25:27 2016
@@ -41,7 +41,7 @@ public class CALOAD extends ArrayInstruc
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitStackProducer(this);
v.visitExceptionThrower(this);
v.visitTypedInstruction(this);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CASTORE.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CASTORE.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CASTORE.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CASTORE.java Wed Jun 1 04:25:27 2016
@@ -41,7 +41,7 @@ public class CASTORE extends ArrayInstru
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitStackConsumer(this);
v.visitExceptionThrower(this);
v.visitTypedInstruction(this);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CHECKCAST.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CHECKCAST.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CHECKCAST.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CHECKCAST.java Wed Jun 1 04:25:27 2016
@@ -39,7 +39,7 @@ public class CHECKCAST extends CPInstruc
/** Check whether object is of given type
* @param index index to class in constant pool
*/
- public CHECKCAST(int index) {
+ public CHECKCAST(final int index) {
super(org.apache.commons.bcel6.Const.CHECKCAST, index);
}
@@ -54,7 +54,7 @@ public class CHECKCAST extends CPInstruc
@Override
- public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
+ public ObjectType getLoadClassType( final ConstantPoolGen cpg ) {
Type t = getType(cpg);
if (t instanceof ArrayType) {
t = ((ArrayType) t).getBasicType();
@@ -72,7 +72,7 @@ public class CHECKCAST extends CPInstruc
* @param v Visitor object
*/
@Override
- public void accept( Visitor v ) {
+ public void accept( final Visitor v ) {
v.visitLoadClass(this);
v.visitExceptionThrower(this);
v.visitStackProducer(this);
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CPInstruction.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CPInstruction.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CPInstruction.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/CPInstruction.java Wed Jun 1 04:25:27 2016
@@ -56,7 +56,7 @@ public abstract class CPInstruction exte
/**
* @param index to constant pool
*/
- protected CPInstruction(short opcode, int index) {
+ protected CPInstruction(final short opcode, final int index) {
super(opcode, (short) 3);
setIndex(index);
}
@@ -67,7 +67,7 @@ public abstract class CPInstruction exte
* @param out Output stream
*/
@Override
- public void dump( DataOutputStream out ) throws IOException {
+ public void dump( final DataOutputStream out ) throws IOException {
out.writeByte(super.getOpcode());
out.writeShort(index);
}
@@ -83,7 +83,7 @@ public abstract class CPInstruction exte
* @return mnemonic for instruction
*/
@Override
- public String toString( boolean verbose ) {
+ public String toString( final boolean verbose ) {
return super.toString(verbose) + " " + index;
}
@@ -92,7 +92,7 @@ public abstract class CPInstruction exte
* @return mnemonic for instruction with symbolic references resolved
*/
@Override
- public String toString( ConstantPool cp ) {
+ public String toString( final ConstantPool cp ) {
Constant c = cp.getConstant(index);
String str = cp.constantToString(c);
if (c instanceof ConstantClass) {
@@ -108,7 +108,7 @@ public abstract class CPInstruction exte
* @param wide wide prefix?
*/
@Override
- protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+ protected void initFromFile( final ByteSequence bytes, final boolean wide ) throws IOException {
setIndex(bytes.readUnsignedShort());
super.setLength(3);
}
@@ -128,7 +128,7 @@ public abstract class CPInstruction exte
* @param index in constant pool.
*/
@Override
- public void setIndex( int index ) { // TODO could be package-protected?
+ public void setIndex( final int index ) { // TODO could be package-protected?
if (index < 0) {
throw new ClassGenException("Negative index value: " + index);
}
@@ -139,7 +139,7 @@ public abstract class CPInstruction exte
/** @return type related with this instruction.
*/
@Override
- public Type getType( ConstantPoolGen cpg ) {
+ public Type getType( final ConstantPoolGen cpg ) {
ConstantPool cp = cpg.getConstantPool();
String name = cp.getConstantString(index, org.apache.commons.bcel6.Const.CONSTANT_Class);
if (!name.startsWith("[")) {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ClassElementValueGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ClassElementValueGen.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ClassElementValueGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ClassElementValueGen.java Wed Jun 1 04:25:27 2016
@@ -34,13 +34,13 @@ public class ClassElementValueGen extend
// For 'class' this points to the class entry in the cpool
private int idx;
- protected ClassElementValueGen(int typeIdx, ConstantPoolGen cpool)
+ protected ClassElementValueGen(final int typeIdx, final ConstantPoolGen cpool)
{
super(ElementValueGen.CLASS, cpool);
this.idx = typeIdx;
}
- public ClassElementValueGen(ObjectType t, ConstantPoolGen cpool)
+ public ClassElementValueGen(final ObjectType t, final ConstantPoolGen cpool)
{
super(ElementValueGen.CLASS, cpool);
// this.idx = cpool.addClass(t);
@@ -58,8 +58,8 @@ public class ClassElementValueGen extend
getConstantPool().getConstantPool());
}
- public ClassElementValueGen(ClassElementValue value, ConstantPoolGen cpool,
- boolean copyPoolEntries)
+ public ClassElementValueGen(final ClassElementValue value, final ConstantPoolGen cpool,
+ final boolean copyPoolEntries)
{
super(CLASS, cpool);
if (copyPoolEntries)
@@ -95,7 +95,7 @@ public class ClassElementValueGen extend
}
@Override
- public void dump(DataOutputStream dos) throws IOException
+ public void dump(final DataOutputStream dos) throws IOException
{
dos.writeByte(super.getElementValueType()); // u1 kind of value
dos.writeShort(idx);