This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-bcel.git
The following commit(s) were added to refs/heads/master by this push: new 6d05f3e Normalize private names and parameter names to camel-case. 6d05f3e is described below commit 6d05f3e0ee814c437ab20b5844053febea2ac15c Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu Jun 4 09:40:09 2020 -0400 Normalize private names and parameter names to camel-case. --- .../org/apache/bcel/classfile/Annotations.java | 18 +++---- .../org/apache/bcel/classfile/BootstrapMethod.java | 20 ++++---- .../org/apache/bcel/classfile/ClassParser.java | 14 ++--- src/main/java/org/apache/bcel/classfile/Code.java | 24 ++++----- .../org/apache/bcel/classfile/CodeException.java | 26 +++++----- .../org/apache/bcel/classfile/ConstantClass.java | 8 +-- .../org/apache/bcel/classfile/ConstantModule.java | 8 +-- .../org/apache/bcel/classfile/ConstantPackage.java | 8 +-- .../org/apache/bcel/classfile/ConstantPool.java | 8 +-- .../org/apache/bcel/classfile/ConstantString.java | 8 +-- .../org/apache/bcel/classfile/ConstantValue.java | 8 +-- .../org/apache/bcel/classfile/ExceptionTable.java | 16 +++--- .../org/apache/bcel/classfile/InnerClasses.java | 8 +-- .../java/org/apache/bcel/classfile/JavaClass.java | 60 +++++++++++----------- .../java/org/apache/bcel/classfile/LineNumber.java | 14 ++--- .../org/apache/bcel/classfile/LineNumberTable.java | 4 +- .../org/apache/bcel/classfile/LocalVariable.java | 42 +++++++-------- .../apache/bcel/classfile/LocalVariableTable.java | 12 ++--- .../org/apache/bcel/classfile/ModulePackages.java | 16 +++--- .../java/org/apache/bcel/classfile/NestHost.java | 16 +++--- .../java/org/apache/bcel/classfile/PMGClass.java | 26 +++++----- .../bcel/classfile/ParameterAnnotations.java | 18 +++---- .../java/org/apache/bcel/classfile/Signature.java | 4 +- .../java/org/apache/bcel/generic/MethodGen.java | 50 +++++++++--------- .../java/org/apache/bcel/generic/ObjectType.java | 10 ++-- .../bcel/verifier/statics/Pass2Verifier.java | 12 ++--- .../bcel/verifier/statics/Pass3aVerifier.java | 4 +- 27 files changed, 231 insertions(+), 231 deletions(-) diff --git a/src/main/java/org/apache/bcel/classfile/Annotations.java b/src/main/java/org/apache/bcel/classfile/Annotations.java index 0096e48..584cc5f 100644 --- a/src/main/java/org/apache/bcel/classfile/Annotations.java +++ b/src/main/java/org/apache/bcel/classfile/Annotations.java @@ -49,16 +49,16 @@ public abstract class Annotations extends Attribute { } /** - * @param annotation_type the subclass type of the annotation - * @param name_index Index pointing to the name <em>Code</em> + * @param annotationType the subclass type of the annotation + * @param nameIndex Index pointing to the name <em>Code</em> * @param length Content length in bytes * @param annotationTable the actual annotations - * @param constant_pool Array of constants + * @param constantPool Array of constants */ - public Annotations(final byte annotation_type, final int name_index, final int length, final AnnotationEntry[] annotation_table, - final ConstantPool constant_pool, final boolean isRuntimeVisible) { - super(annotation_type, name_index, length, constant_pool); - this.annotationTable = annotation_table; + public Annotations(final byte annotationType, final int nameIndex, final int length, final AnnotationEntry[] annotationTable, + final ConstantPool constantPool, final boolean isRuntimeVisible) { + super(annotationType, nameIndex, length, constantPool); + this.annotationTable = annotationTable; this.isRuntimeVisible = isRuntimeVisible; } @@ -76,8 +76,8 @@ public abstract class Annotations extends Attribute { /** * @param annotationTable the entries to set in this annotation */ - public final void setAnnotationTable(final AnnotationEntry[] annotation_table) { - this.annotationTable = annotation_table; + public final void setAnnotationTable(final AnnotationEntry[] annotationTable) { + this.annotationTable = annotationTable; } /** diff --git a/src/main/java/org/apache/bcel/classfile/BootstrapMethod.java b/src/main/java/org/apache/bcel/classfile/BootstrapMethod.java index d9a9fab..0835a65 100644 --- a/src/main/java/org/apache/bcel/classfile/BootstrapMethod.java +++ b/src/main/java/org/apache/bcel/classfile/BootstrapMethod.java @@ -72,9 +72,9 @@ public class BootstrapMethod implements Cloneable { * @param bootstrapMethodRef int index into constant_pool of CONSTANT_MethodHandle * @param bootstrapArguments int[] indices into constant_pool of CONSTANT_[type]_info */ - public BootstrapMethod(final int bootstrap_method_ref, final int[] bootstrap_arguments) { - this.bootstrapMethodRef = bootstrap_method_ref; - this.bootstrapArguments = bootstrap_arguments; + public BootstrapMethod(final int bootstrapMethodRef, final int[] bootstrapArguments) { + this.bootstrapMethodRef = bootstrapMethodRef; + this.bootstrapArguments = bootstrapArguments; } /** @@ -87,8 +87,8 @@ public class BootstrapMethod implements Cloneable { /** * @param bootstrapMethodRef int index into constant_pool of CONSTANT_MethodHandle */ - public void setBootstrapMethodRef(final int bootstrap_method_ref) { - this.bootstrapMethodRef = bootstrap_method_ref; + public void setBootstrapMethodRef(final int bootstrapMethodRef) { + this.bootstrapMethodRef = bootstrapMethodRef; } /** @@ -108,8 +108,8 @@ public class BootstrapMethod implements Cloneable { /** * @param bootstrapArguments int[] indices into constant_pool of CONSTANT_[type]_info */ - public void setBootstrapArguments(final int[] bootstrap_arguments) { - this.bootstrapArguments = bootstrap_arguments; + public void setBootstrapArguments(final int[] bootstrapArguments) { + this.bootstrapArguments = bootstrapArguments; } /** @@ -124,10 +124,10 @@ public class BootstrapMethod implements Cloneable { /** * @return Resolved string representation */ - public final String toString( final ConstantPool constant_pool ) { + public final String toString( final ConstantPool constantPool ) { final StringBuilder buf = new StringBuilder(); String bootstrap_method_name; - bootstrap_method_name = constant_pool.constantToString(bootstrapMethodRef, + bootstrap_method_name = constantPool.constantToString(bootstrapMethodRef, Const.CONSTANT_MethodHandle); buf.append(Utility.compactClassName(bootstrap_method_name, false)); final int num_bootstrap_arguments = bootstrapArguments.length; @@ -135,7 +135,7 @@ public class BootstrapMethod implements Cloneable { buf.append("\nMethod Arguments:"); for (int i = 0; i < num_bootstrap_arguments; i++) { buf.append("\n ").append(i).append(": "); - buf.append(constant_pool.constantToString(constant_pool.getConstant(bootstrapArguments[i]))); + buf.append(constantPool.constantToString(constantPool.getConstant(bootstrapArguments[i]))); } } return buf.toString(); diff --git a/src/main/java/org/apache/bcel/classfile/ClassParser.java b/src/main/java/org/apache/bcel/classfile/ClassParser.java index 7ae6a9e..a592bfe 100644 --- a/src/main/java/org/apache/bcel/classfile/ClassParser.java +++ b/src/main/java/org/apache/bcel/classfile/ClassParser.java @@ -66,8 +66,8 @@ public final class ClassParser { * @param inputStream Input stream * @param fileName File name */ - public ClassParser(final InputStream inputStream, final String file_name) { - this.fileName = file_name; + public ClassParser(final InputStream inputStream, final String fileName) { + this.fileName = fileName; fileOwned = false; final String clazz = inputStream.getClass().getName(); // Not a very clean solution ... isZip = clazz.startsWith("java.util.zip.") || clazz.startsWith("java.util.jar."); @@ -83,9 +83,9 @@ public final class ClassParser { * * @param fileName file name */ - public ClassParser(final String file_name) { + public ClassParser(final String fileName) { isZip = false; - this.fileName = file_name; + this.fileName = fileName; fileOwned = true; } @@ -95,11 +95,11 @@ public final class ClassParser { * @param zipFile zip file name * @param fileName file name */ - public ClassParser(final String zip_file, final String file_name) { + public ClassParser(final String zipFile, final String fileName) { isZip = true; fileOwned = true; - this.zipFile = zip_file; - this.fileName = file_name; + this.zipFile = zipFile; + this.fileName = fileName; } diff --git a/src/main/java/org/apache/bcel/classfile/Code.java b/src/main/java/org/apache/bcel/classfile/Code.java index fbe7cac..5e81d21 100644 --- a/src/main/java/org/apache/bcel/classfile/Code.java +++ b/src/main/java/org/apache/bcel/classfile/Code.java @@ -103,17 +103,17 @@ public final class Code extends Attribute { * @param maxStack Maximum size of stack * @param maxLocals Number of local variables * @param code Actual byte code - * @param exceptionTable Table of handled exceptions + * @param exceptionTable of handled exceptions * @param attributes Attributes of code: LineNumber or LocalVariable * @param constant_pool Array of constants */ - public Code(final int name_index, final int length, final int max_stack, final int max_locals, final byte[] code, - final CodeException[] exception_table, final Attribute[] attributes, final ConstantPool constant_pool) { + public Code(final int name_index, final int length, final int maxStack, final int maxLocals, final byte[] code, + final CodeException[] exceptionTable, final Attribute[] attributes, final ConstantPool constant_pool) { super(Const.ATTR_CODE, name_index, length, constant_pool); - this.maxStack = max_stack; - this.maxLocals = max_locals; + this.maxStack = maxStack; + this.maxLocals = maxLocals; this.code = code != null ? code : new byte[0]; - this.exceptionTable = exception_table != null ? exception_table : new CodeException[0]; + this.exceptionTable = exceptionTable != null ? exceptionTable : new CodeException[0]; this.attributes = attributes != null ? attributes : new Attribute[0]; super.setLength(calculateLength()); // Adjust length } @@ -273,8 +273,8 @@ public final class Code extends Attribute { /** * @param exceptionTable exception table */ - public void setExceptionTable( final CodeException[] exception_table ) { - this.exceptionTable = exception_table != null ? exception_table : new CodeException[0]; + public void setExceptionTable( final CodeException[] exceptionTable ) { + this.exceptionTable = exceptionTable != null ? exceptionTable : new CodeException[0]; super.setLength(calculateLength()); // Adjust length } @@ -282,16 +282,16 @@ public final class Code extends Attribute { /** * @param maxLocals maximum number of local variables */ - public void setMaxLocals( final int max_locals ) { - this.maxLocals = max_locals; + public void setMaxLocals( final int maxLocals ) { + this.maxLocals = maxLocals; } /** * @param maxStack maximum stack size */ - public void setMaxStack( final int max_stack ) { - this.maxStack = max_stack; + public void setMaxStack( final int maxStack ) { + this.maxStack = maxStack; } diff --git a/src/main/java/org/apache/bcel/classfile/CodeException.java b/src/main/java/org/apache/bcel/classfile/CodeException.java index 663be41..d223f08 100644 --- a/src/main/java/org/apache/bcel/classfile/CodeException.java +++ b/src/main/java/org/apache/bcel/classfile/CodeException.java @@ -73,11 +73,11 @@ public final class CodeException implements Cloneable, Node, Constants { * exception, otherwise it points to the exception class which is * to be caught. */ - public CodeException(final int start_pc, final int end_pc, final int handler_pc, final int catch_type) { - this.startPc = start_pc; - this.endPc = end_pc; - this.handlerPc = handler_pc; - this.catchType = catch_type; + public CodeException(final int startPc, final int endPc, final int handlerPc, final int catchType) { + this.startPc = startPc; + this.endPc = endPc; + this.handlerPc = handlerPc; + this.catchType = catchType; } @@ -144,32 +144,32 @@ public final class CodeException implements Cloneable, Node, Constants { /** * @param catchType the type of exception that is caught */ - public void setCatchType( final int catch_type ) { - this.catchType = catch_type; + public void setCatchType( final int catchType ) { + this.catchType = catchType; } /** * @param endPc end of handled block */ - public void setEndPC( final int end_pc ) { - this.endPc = end_pc; + public void setEndPC( final int endPc ) { + this.endPc = endPc; } /** * @param handlerPc where the actual code is */ - public void setHandlerPC( final int handler_pc ) { // TODO unused - this.handlerPc = handler_pc; + public void setHandlerPC( final int handlerPc ) { // TODO unused + this.handlerPc = handlerPc; } /** * @param startPc start of handled block */ - public void setStartPC( final int start_pc ) { // TODO unused - this.startPc = start_pc; + public void setStartPC( final int startPc ) { // TODO unused + this.startPc = startPc; } diff --git a/src/main/java/org/apache/bcel/classfile/ConstantClass.java b/src/main/java/org/apache/bcel/classfile/ConstantClass.java index 17642f5..f77ecc3 100644 --- a/src/main/java/org/apache/bcel/classfile/ConstantClass.java +++ b/src/main/java/org/apache/bcel/classfile/ConstantClass.java @@ -57,9 +57,9 @@ public final class ConstantClass extends Constant implements ConstantObject { * @param nameIndex Name index in constant pool. Should refer to a * ConstantUtf8. */ - public ConstantClass(final int name_index) { + public ConstantClass(final int nameIndex) { super(Const.CONSTANT_Class); - this.nameIndex = name_index; + this.nameIndex = nameIndex; } @@ -100,8 +100,8 @@ public final class ConstantClass extends Constant implements ConstantObject { /** * @param nameIndex the name index in the constant pool of this Constant Class */ - public void setNameIndex( final int name_index ) { - this.nameIndex = name_index; + public void setNameIndex( final int nameIndex ) { + this.nameIndex = nameIndex; } diff --git a/src/main/java/org/apache/bcel/classfile/ConstantModule.java b/src/main/java/org/apache/bcel/classfile/ConstantModule.java index 6515291..66cc203 100644 --- a/src/main/java/org/apache/bcel/classfile/ConstantModule.java +++ b/src/main/java/org/apache/bcel/classfile/ConstantModule.java @@ -60,9 +60,9 @@ public final class ConstantModule extends Constant implements ConstantObject { * @param nameIndex Name index in constant pool. Should refer to a * ConstantUtf8. */ - public ConstantModule(final int name_index) { + public ConstantModule(final int nameIndex) { super(Const.CONSTANT_Module); - this.nameIndex = name_index; + this.nameIndex = nameIndex; } @@ -103,8 +103,8 @@ public final class ConstantModule extends Constant implements ConstantObject { /** * @param nameIndex the name index in the constant pool of this Constant Module */ - public void setNameIndex( final int name_index ) { - this.nameIndex = name_index; + public void setNameIndex( final int nameIndex ) { + this.nameIndex = nameIndex; } diff --git a/src/main/java/org/apache/bcel/classfile/ConstantPackage.java b/src/main/java/org/apache/bcel/classfile/ConstantPackage.java index d1b7345..3f94c74 100644 --- a/src/main/java/org/apache/bcel/classfile/ConstantPackage.java +++ b/src/main/java/org/apache/bcel/classfile/ConstantPackage.java @@ -60,9 +60,9 @@ public final class ConstantPackage extends Constant implements ConstantObject { * @param nameIndex Name index in constant pool. Should refer to a * ConstantUtf8. */ - public ConstantPackage(final int name_index) { + public ConstantPackage(final int nameIndex) { super(Const.CONSTANT_Package); - this.nameIndex = name_index; + this.nameIndex = nameIndex; } @@ -103,8 +103,8 @@ public final class ConstantPackage extends Constant implements ConstantObject { /** * @param nameIndex the name index in the constant pool of this Constant Package */ - public void setNameIndex( final int name_index ) { - this.nameIndex = name_index; + public void setNameIndex( final int nameIndex ) { + this.nameIndex = nameIndex; } diff --git a/src/main/java/org/apache/bcel/classfile/ConstantPool.java b/src/main/java/org/apache/bcel/classfile/ConstantPool.java index 2a906e9..c2926c0 100644 --- a/src/main/java/org/apache/bcel/classfile/ConstantPool.java +++ b/src/main/java/org/apache/bcel/classfile/ConstantPool.java @@ -41,8 +41,8 @@ public class ConstantPool implements Cloneable, Node { /** * @param constantPool Array of constants */ - public ConstantPool(final Constant[] constant_pool) { - this.constantPool = constant_pool; + public ConstantPool(final Constant[] constantPool) { + this.constantPool = constantPool; } /** @@ -337,8 +337,8 @@ public class ConstantPool implements Cloneable, Node { /** * @param constantPool */ - public void setConstantPool( final Constant[] constant_pool ) { - this.constantPool = constant_pool; + public void setConstantPool( final Constant[] constantPool ) { + this.constantPool = constantPool; } diff --git a/src/main/java/org/apache/bcel/classfile/ConstantString.java b/src/main/java/org/apache/bcel/classfile/ConstantString.java index 8247a95..e3458d2 100644 --- a/src/main/java/org/apache/bcel/classfile/ConstantString.java +++ b/src/main/java/org/apache/bcel/classfile/ConstantString.java @@ -56,9 +56,9 @@ public final class ConstantString extends Constant implements ConstantObject { /** * @param stringIndex Index of Constant_Utf8 in constant pool */ - public ConstantString(final int string_index) { + public ConstantString(final int stringIndex) { super(Const.CONSTANT_String); - this.stringIndex = string_index; + this.stringIndex = stringIndex; } @@ -99,8 +99,8 @@ public final class ConstantString extends Constant implements ConstantObject { /** * @param stringIndex the index into the constant of the string value */ - public void setStringIndex( final int string_index ) { - this.stringIndex = string_index; + public void setStringIndex( final int stringIndex ) { + this.stringIndex = stringIndex; } diff --git a/src/main/java/org/apache/bcel/classfile/ConstantValue.java b/src/main/java/org/apache/bcel/classfile/ConstantValue.java index db5fb68..0ca63b8 100644 --- a/src/main/java/org/apache/bcel/classfile/ConstantValue.java +++ b/src/main/java/org/apache/bcel/classfile/ConstantValue.java @@ -64,10 +64,10 @@ public final class ConstantValue extends Attribute { * @param constantValueIndex Index in constant pool * @param constant_pool Array of constants */ - public ConstantValue(final int name_index, final int length, final int constantvalue_index, + public ConstantValue(final int name_index, final int length, final int constantValueIndex, final ConstantPool constant_pool) { super(Const.ATTR_CONSTANT_VALUE, name_index, length, constant_pool); - this.constantValueIndex = constantvalue_index; + this.constantValueIndex = constantValueIndex; } @@ -108,8 +108,8 @@ public final class ConstantValue extends Attribute { /** * @param constantValueIndex the index info the constant pool of this constant value */ - public void setConstantValueIndex( final int constantvalue_index ) { - this.constantValueIndex = constantvalue_index; + public void setConstantValueIndex( final int constantValueIndex ) { + this.constantValueIndex = constantValueIndex; } diff --git a/src/main/java/org/apache/bcel/classfile/ExceptionTable.java b/src/main/java/org/apache/bcel/classfile/ExceptionTable.java index 8107d09..f267566 100644 --- a/src/main/java/org/apache/bcel/classfile/ExceptionTable.java +++ b/src/main/java/org/apache/bcel/classfile/ExceptionTable.java @@ -53,23 +53,23 @@ public final class ExceptionTable extends Attribute { * @param exceptionIndexTable Table of indices in constant pool * @param constant_pool Array of constants */ - public ExceptionTable(final int name_index, final int length, final int[] exception_index_table, + public ExceptionTable(final int name_index, final int length, final int[] exceptionIndexTable, final ConstantPool constant_pool) { super(Const.ATTR_EXCEPTIONS, name_index, length, constant_pool); - this.exceptionIndexTable = exception_index_table != null ? exception_index_table : new int[0]; + this.exceptionIndexTable = exceptionIndexTable != null ? exceptionIndexTable : new int[0]; } /** * Construct object from input stream. - * @param name_index Index in constant pool + * @param nameIndex Index in constant pool * @param length Content length in bytes * @param input Input stream - * @param constant_pool Array of constants + * @param constantPool Array of constants * @throws IOException */ - ExceptionTable(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool) throws IOException { - this(name_index, length, (int[]) null, constant_pool); + ExceptionTable(final int nameIndex, final int length, final DataInput input, final ConstantPool constantPool) throws IOException { + this(nameIndex, length, (int[]) null, constantPool); final int number_of_exceptions = input.readUnsignedShort(); exceptionIndexTable = new int[number_of_exceptions]; for (int i = 0; i < number_of_exceptions; i++) { @@ -140,8 +140,8 @@ public final class ExceptionTable extends Attribute { * @param exceptionIndexTable the list of exception indexes * Also redefines number_of_exceptions according to table length. */ - public void setExceptionIndexTable( final int[] exception_index_table ) { - this.exceptionIndexTable = exception_index_table != null ? exception_index_table : new int[0]; + public void setExceptionIndexTable( final int[] exceptionIndexTable ) { + this.exceptionIndexTable = exceptionIndexTable != null ? exceptionIndexTable : new int[0]; } diff --git a/src/main/java/org/apache/bcel/classfile/InnerClasses.java b/src/main/java/org/apache/bcel/classfile/InnerClasses.java index 8ff3cc8..cb3aadc 100644 --- a/src/main/java/org/apache/bcel/classfile/InnerClasses.java +++ b/src/main/java/org/apache/bcel/classfile/InnerClasses.java @@ -51,10 +51,10 @@ public final class InnerClasses extends Attribute { * @param innerClasses array of inner classes attributes * @param constant_pool Array of constants */ - public InnerClasses(final int name_index, final int length, final InnerClass[] inner_classes, + public InnerClasses(final int name_index, final int length, final InnerClass[] innerClasses, final ConstantPool constant_pool) { super(Const.ATTR_INNER_CLASSES, name_index, length, constant_pool); - this.innerClasses = inner_classes != null ? inner_classes : new InnerClass[0]; + this.innerClasses = innerClasses != null ? innerClasses : new InnerClass[0]; } @@ -118,8 +118,8 @@ public final class InnerClasses extends Attribute { /** * @param innerClasses the array of inner classes */ - public void setInnerClasses( final InnerClass[] inner_classes ) { - this.innerClasses = inner_classes != null ? inner_classes : new InnerClass[0]; + public void setInnerClasses( final InnerClass[] innerClasses ) { + this.innerClasses = innerClasses != null ? innerClasses : new InnerClass[0]; } diff --git a/src/main/java/org/apache/bcel/classfile/JavaClass.java b/src/main/java/org/apache/bcel/classfile/JavaClass.java index 3ed28cd..927015d 100644 --- a/src/main/java/org/apache/bcel/classfile/JavaClass.java +++ b/src/main/java/org/apache/bcel/classfile/JavaClass.java @@ -116,8 +116,8 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl * @param attributes Class attributes * @param source Read from file or generated in memory? */ - public JavaClass(final int class_name_index, final int superclass_name_index, final String file_name, final int major, - final int minor, final int access_flags, final ConstantPool constant_pool, int[] interfaces, + public JavaClass(final int classNameIndex, final int superclassNameIndex, final String fileName, final int major, + final int minor, final int access_flags, final ConstantPool constantPool, int[] interfaces, Field[] fields, Method[] methods, Attribute[] attributes, final byte source) { super(access_flags); if (interfaces == null) { @@ -132,12 +132,12 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl if (methods == null) { methods = new Method[0]; } - this.classNameIndex = class_name_index; - this.superclassNameIndex = superclass_name_index; - this.fileName = file_name; + this.classNameIndex = classNameIndex; + this.superclassNameIndex = superclassNameIndex; + this.fileName = fileName; this.major = major; this.minor = minor; - this.constantPool = constant_pool; + this.constantPool = constantPool; this.interfaces = interfaces; this.fields = fields; this.methods = methods; @@ -154,7 +154,7 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl * `ConstantClass' but we check that anyway via the * `ConstPool.getConstant' method. */ - className = constant_pool.getConstantString(class_name_index, Const.CONSTANT_Class); + className = constantPool.getConstantString(classNameIndex, Const.CONSTANT_Class); className = Utility.compactClassName(className, false); final int index = className.lastIndexOf('.'); if (index < 0) { @@ -162,9 +162,9 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl } else { packageName = className.substring(0, index); } - if (superclass_name_index > 0) { + if (superclassNameIndex > 0) { // May be zero -> class is java.lang.Object - superclassName = constant_pool.getConstantString(superclass_name_index, + superclassName = constantPool.getConstantString(superclassNameIndex, Const.CONSTANT_Class); superclassName = Utility.compactClassName(superclassName, false); } else { @@ -172,7 +172,7 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl } interfaceNames = new String[interfaces.length]; for (int i = 0; i < interfaces.length; i++) { - final String str = constant_pool.getConstantString(interfaces[i], Const.CONSTANT_Class); + final String str = constantPool.getConstantString(interfaces[i], Const.CONSTANT_Class); interfaceNames[i] = Utility.compactClassName(str, false); } } @@ -193,11 +193,11 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl * @param methods Class methods * @param attributes Class attributes */ - public JavaClass(final int class_name_index, final int superclass_name_index, final String file_name, final int major, - final int minor, final int access_flags, final ConstantPool constant_pool, final int[] interfaces, + public JavaClass(final int classNameIndex, final int superclassNameIndex, final String fileName, final int major, + final int minor, final int access_flags, final ConstantPool constantPool, final int[] interfaces, final Field[] fields, final Method[] methods, final Attribute[] attributes) { - this(class_name_index, superclass_name_index, file_name, major, minor, access_flags, - constant_pool, interfaces, fields, methods, attributes, HEAP); + this(classNameIndex, superclassNameIndex, fileName, major, minor, access_flags, + constantPool, interfaces, fields, methods, attributes, HEAP); } @@ -488,24 +488,24 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl /** * @param className . */ - public void setClassName( final String class_name ) { - this.className = class_name; + public void setClassName( final String className ) { + this.className = className; } /** * @param classNameIndex . */ - public void setClassNameIndex( final int class_name_index ) { - this.classNameIndex = class_name_index; + public void setClassNameIndex( final int classNameIndex ) { + this.classNameIndex = classNameIndex; } /** * @param constantPool . */ - public void setConstantPool( final ConstantPool constant_pool ) { - this.constantPool = constant_pool; + public void setConstantPool( final ConstantPool constantPool ) { + this.constantPool = constantPool; } @@ -520,16 +520,16 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl /** * Set File name of class, aka SourceFile attribute value */ - public void setFileName( final String file_name ) { - this.fileName = file_name; + public void setFileName( final String fileName ) { + this.fileName = fileName; } /** * @param interfaceNames . */ - public void setInterfaceNames( final String[] interface_names ) { - this.interfaceNames = interface_names; + public void setInterfaceNames( final String[] interfaceNames ) { + this.interfaceNames = interfaceNames; } @@ -568,24 +568,24 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl /** * Set absolute path to file this class was read from. */ - public void setSourceFileName( final String source_file_name ) { - this.sourceFileName = source_file_name; + public void setSourceFileName( final String sourceFileName ) { + this.sourceFileName = sourceFileName; } /** * @param superclassName . */ - public void setSuperclassName( final String superclass_name ) { - this.superclassName = superclass_name; + public void setSuperclassName( final String superclassName ) { + this.superclassName = superclassName; } /** * @param superclassNameIndex . */ - public void setSuperclassNameIndex( final int superclass_name_index ) { - this.superclassNameIndex = superclass_name_index; + public void setSuperclassNameIndex( final int superclassNameIndex ) { + this.superclassNameIndex = superclassNameIndex; } diff --git a/src/main/java/org/apache/bcel/classfile/LineNumber.java b/src/main/java/org/apache/bcel/classfile/LineNumber.java index bcaab2e..b5cb9e3 100644 --- a/src/main/java/org/apache/bcel/classfile/LineNumber.java +++ b/src/main/java/org/apache/bcel/classfile/LineNumber.java @@ -61,9 +61,9 @@ public final class LineNumber implements Cloneable, Node { * @param startPc Program Counter (PC) corresponds to * @param lineNumber line number in source file */ - public LineNumber(final int start_pc, final int line_number) { - this.startPc = (short) start_pc; - this.lineNumber = (short)line_number; + public LineNumber(final int startPc, final int lineNumber) { + this.startPc = (short) startPc; + this.lineNumber = (short)lineNumber; } @@ -111,16 +111,16 @@ public final class LineNumber implements Cloneable, Node { /** * @param lineNumber the source line number */ - public void setLineNumber( final int line_number ) { - this.lineNumber = (short) line_number; + public void setLineNumber( final int lineNumber ) { + this.lineNumber = (short) lineNumber; } /** * @param startPc the pc for this line number */ - public void setStartPC( final int start_pc ) { - this.startPc = (short) start_pc; + public void setStartPC( final int startPc ) { + this.startPc = (short) startPc; } diff --git a/src/main/java/org/apache/bcel/classfile/LineNumberTable.java b/src/main/java/org/apache/bcel/classfile/LineNumberTable.java index 180160b..961430b 100644 --- a/src/main/java/org/apache/bcel/classfile/LineNumberTable.java +++ b/src/main/java/org/apache/bcel/classfile/LineNumberTable.java @@ -118,8 +118,8 @@ public final class LineNumberTable extends Attribute { /** * @param lineNumberTable the line number entries for this table */ - public void setLineNumberTable( final LineNumber[] line_number_table ) { - this.lineNumberTable = line_number_table; + public void setLineNumberTable( final LineNumber[] lineNumberTable ) { + this.lineNumberTable = lineNumberTable; } diff --git a/src/main/java/org/apache/bcel/classfile/LocalVariable.java b/src/main/java/org/apache/bcel/classfile/LocalVariable.java index b13f454..7f38878 100644 --- a/src/main/java/org/apache/bcel/classfile/LocalVariable.java +++ b/src/main/java/org/apache/bcel/classfile/LocalVariable.java @@ -83,14 +83,14 @@ public final class LocalVariable implements Cloneable, Node, Constants { * @param index Variable is `index'th local variable on the method's frame * @param constantPool Array of constants */ - public LocalVariable(final int start_pc, final int length, final int name_index, final int signature_index, final int index, - final ConstantPool constant_pool) { - this.startPc = start_pc; + public LocalVariable(final int startPc, final int length, final int nameIndex, final int signatureIndex, final int index, + final ConstantPool constantPool) { + this.startPc = startPc; this.length = length; - this.nameIndex = name_index; - this.signatureIndex = signature_index; + this.nameIndex = nameIndex; + this.signatureIndex = signatureIndex; this.index = index; - this.constantPool = constant_pool; + this.constantPool = constantPool; this.origIndex = index; } @@ -104,15 +104,15 @@ public final class LocalVariable implements Cloneable, Node, Constants { * @param constantPool Array of constants * @param origIndex Variable is `index'th local variable on the method's frame prior to any changes */ - public LocalVariable(final int start_pc, final int length, final int name_index, final int signature_index, final int index, - final ConstantPool constant_pool, final int orig_index) { - this.startPc = start_pc; + public LocalVariable(final int startPc, final int length, final int nameIndex, final int signatureIndex, final int index, + final ConstantPool constantPool, final int origIndex) { + this.startPc = startPc; this.length = length; - this.nameIndex = name_index; - this.signatureIndex = signature_index; + this.nameIndex = nameIndex; + this.signatureIndex = signatureIndex; this.index = index; - this.constantPool = constant_pool; - this.origIndex = orig_index; + this.constantPool = constantPool; + this.origIndex = origIndex; } @@ -235,8 +235,8 @@ public final class LocalVariable implements Cloneable, Node, Constants { /** * @param constantPool Constant pool to be used for this object. */ - public void setConstantPool( final ConstantPool constant_pool ) { - this.constantPool = constant_pool; + public void setConstantPool( final ConstantPool constantPool ) { + this.constantPool = constantPool; } @@ -251,16 +251,16 @@ public final class LocalVariable implements Cloneable, Node, Constants { /** * @param nameIndex the index into the constant pool for the name of this variable */ - public void setNameIndex( final int name_index ) { // TODO unused - this.nameIndex = name_index; + public void setNameIndex( final int nameIndex ) { // TODO unused + this.nameIndex = nameIndex; } /** * @param signatureIndex the index into the constant pool for the signature of this variable */ - public void setSignatureIndex( final int signature_index ) { // TODO unused - this.signatureIndex = signature_index; + public void setSignatureIndex( final int signatureIndex ) { // TODO unused + this.signatureIndex = signatureIndex; } @@ -275,8 +275,8 @@ public final class LocalVariable implements Cloneable, Node, Constants { /** * @param startPc Specify range where the local variable is valid. */ - public void setStartPC( final int start_pc ) { // TODO unused - this.startPc = start_pc; + public void setStartPC( final int startPc ) { // TODO unused + this.startPc = startPc; } diff --git a/src/main/java/org/apache/bcel/classfile/LocalVariableTable.java b/src/main/java/org/apache/bcel/classfile/LocalVariableTable.java index 81d5101..2babef9 100644 --- a/src/main/java/org/apache/bcel/classfile/LocalVariableTable.java +++ b/src/main/java/org/apache/bcel/classfile/LocalVariableTable.java @@ -45,15 +45,15 @@ public class LocalVariableTable extends Attribute { /** - * @param name_index Index in constant pool to `LocalVariableTable' + * @param nameIndex Index in constant pool to `LocalVariableTable' * @param length Content length in bytes * @param localVariableTable Table of local variables - * @param constant_pool Array of constants + * @param constantPool Array of constants */ - public LocalVariableTable(final int name_index, final int length, final LocalVariable[] local_variable_table, - final ConstantPool constant_pool) { - super(Const.ATTR_LOCAL_VARIABLE_TABLE, name_index, length, constant_pool); - this.localVariableTable = local_variable_table; + public LocalVariableTable(final int nameIndex, final int length, final LocalVariable[] localVariableTable, + final ConstantPool constantPool) { + super(Const.ATTR_LOCAL_VARIABLE_TABLE, nameIndex, length, constantPool); + this.localVariableTable = localVariableTable; } diff --git a/src/main/java/org/apache/bcel/classfile/ModulePackages.java b/src/main/java/org/apache/bcel/classfile/ModulePackages.java index 03f90e2..e6aa307 100644 --- a/src/main/java/org/apache/bcel/classfile/ModulePackages.java +++ b/src/main/java/org/apache/bcel/classfile/ModulePackages.java @@ -44,15 +44,15 @@ public final class ModulePackages extends Attribute { /** - * @param name_index Index in constant pool + * @param nameIndex Index in constant pool * @param length Content length in bytes * @param packageIndexTable Table of indices in constant pool - * @param constant_pool Array of constants + * @param constantPool Array of constants */ - public ModulePackages(final int name_index, final int length, final int[] package_index_table, - final ConstantPool constant_pool) { - super(Const.ATTR_MODULE_PACKAGES, name_index, length, constant_pool); - this.packageIndexTable = package_index_table != null ? package_index_table : new int[0]; + public ModulePackages(final int nameIndex, final int length, final int[] packageIndexTable, + final ConstantPool constantPool) { + super(Const.ATTR_MODULE_PACKAGES, nameIndex, length, constantPool); + this.packageIndexTable = packageIndexTable != null ? packageIndexTable : new int[0]; } @@ -136,8 +136,8 @@ public final class ModulePackages extends Attribute { * @param packageIndexTable the list of package indexes * Also redefines number_of_packages according to table length. */ - public void setPackageIndexTable( final int[] package_index_table ) { - this.packageIndexTable = package_index_table != null ? package_index_table : new int[0]; + public void setPackageIndexTable( final int[] packageIndexTable ) { + this.packageIndexTable = packageIndexTable != null ? packageIndexTable : new int[0]; } diff --git a/src/main/java/org/apache/bcel/classfile/NestHost.java b/src/main/java/org/apache/bcel/classfile/NestHost.java index 7791566..7dc561f 100644 --- a/src/main/java/org/apache/bcel/classfile/NestHost.java +++ b/src/main/java/org/apache/bcel/classfile/NestHost.java @@ -45,15 +45,15 @@ public final class NestHost extends Attribute { /** - * @param name_index Index in constant pool + * @param nameIndex Index in constant pool * @param length Content length in bytes * @param hostClassIndex Host class index - * @param constant_pool Array of constants + * @param constantPool Array of constants */ - public NestHost(final int name_index, final int length, final int host_class_index, - final ConstantPool constant_pool) { - super(Const.ATTR_NEST_MEMBERS, name_index, length, constant_pool); - this.hostClassIndex = host_class_index; + public NestHost(final int nameIndex, final int length, final int hostClassIndex, + final ConstantPool constantPool) { + super(Const.ATTR_NEST_MEMBERS, nameIndex, length, constantPool); + this.hostClassIndex = hostClassIndex; } @@ -108,8 +108,8 @@ public final class NestHost extends Attribute { /** * @param hostClassIndex the host class index */ - public void setHostClassIndex( final int host_class_index ) { - this.hostClassIndex = host_class_index; + public void setHostClassIndex( final int hostClassIndex ) { + this.hostClassIndex = hostClassIndex; } diff --git a/src/main/java/org/apache/bcel/classfile/PMGClass.java b/src/main/java/org/apache/bcel/classfile/PMGClass.java index d384aeb..b03efd2 100644 --- a/src/main/java/org/apache/bcel/classfile/PMGClass.java +++ b/src/main/java/org/apache/bcel/classfile/PMGClass.java @@ -39,9 +39,9 @@ public final class PMGClass extends Attribute { * Initialize from another object. Note that both objects use the same * references (shallow copy). Use copy() for a physical copy. */ - public PMGClass(final PMGClass c) { - this(c.getNameIndex(), c.getLength(), c.getPMGIndex(), c.getPMGClassIndex(), c - .getConstantPool()); + public PMGClass(final PMGClass pgmClass) { + this(pgmClass.getNameIndex(), pgmClass.getLength(), pgmClass.getPMGIndex(), pgmClass.getPMGClassIndex(), + pgmClass.getConstantPool()); } @@ -64,13 +64,13 @@ public final class PMGClass extends Attribute { * @param length Content length in bytes * @param pmgIndex index in constant pool for source file name * @param pmgClassIndex Index in constant pool to CONSTANT_Utf8 - * @param constant_pool Array of constants + * @param constantPool Array of constants */ - public PMGClass(final int name_index, final int length, final int pmg_index, final int pmg_class_index, - final ConstantPool constant_pool) { - super(Const.ATTR_PMG, name_index, length, constant_pool); - this.pmgIndex = pmg_index; - this.pmgClassIndex = pmg_class_index; + public PMGClass(final int name_index, final int length, final int pmgIndex, final int pmgClassIndex, + final ConstantPool constantPool) { + super(Const.ATTR_PMG, name_index, length, constantPool); + this.pmgIndex = pmgIndex; + this.pmgClassIndex = pmgClassIndex; } @@ -112,8 +112,8 @@ public final class PMGClass extends Attribute { /** * @param pmgClassIndex */ - public void setPMGClassIndex( final int pmg_class_index ) { - this.pmgClassIndex = pmg_class_index; + public void setPMGClassIndex( final int pmgClassIndex ) { + this.pmgClassIndex = pmgClassIndex; } @@ -128,8 +128,8 @@ public final class PMGClass extends Attribute { /** * @param pmgIndex */ - public void setPMGIndex( final int pmg_index ) { - this.pmgIndex = pmg_index; + public void setPMGIndex( final int pmgIndex ) { + this.pmgIndex = pmgIndex; } diff --git a/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java b/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java index f6109a6..d538f64 100644 --- a/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java +++ b/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java @@ -51,16 +51,16 @@ public abstract class ParameterAnnotations extends Attribute { /** - * @param parameter_annotation_type the subclass type of the parameter annotation - * @param name_index Index pointing to the name <em>Code</em> + * @param parameterAnnotationType the subclass type of the parameter annotation + * @param nameIndex Index pointing to the name <em>Code</em> * @param length Content length in bytes * @param parameterAnnotationTable the actual parameter annotations - * @param constant_pool Array of constants + * @param constantPool Array of constants */ - public ParameterAnnotations(final byte parameter_annotation_type, final int name_index, final int length, - final ParameterAnnotationEntry[] parameter_annotation_table, final ConstantPool constant_pool) { - super(parameter_annotation_type, name_index, length, constant_pool); - this.parameterAnnotationTable = parameter_annotation_table; + public ParameterAnnotations(final byte parameterAnnotationType, final int nameIndex, final int length, + final ParameterAnnotationEntry[] parameterAnnotationTable, final ConstantPool constantPool) { + super(parameterAnnotationType, nameIndex, length, constantPool); + this.parameterAnnotationTable = parameterAnnotationTable; } @@ -80,8 +80,8 @@ public abstract class ParameterAnnotations extends Attribute { /** * @param parameterAnnotationTable the entries to set in this parameter annotation */ - public final void setParameterAnnotationTable(final ParameterAnnotationEntry[] parameter_annotation_table ) { - this.parameterAnnotationTable = parameter_annotation_table; + public final void setParameterAnnotationTable(final ParameterAnnotationEntry[] parameterAnnotationTable ) { + this.parameterAnnotationTable = parameterAnnotationTable; } diff --git a/src/main/java/org/apache/bcel/classfile/Signature.java b/src/main/java/org/apache/bcel/classfile/Signature.java index 9dfdeaf..6e15362 100644 --- a/src/main/java/org/apache/bcel/classfile/Signature.java +++ b/src/main/java/org/apache/bcel/classfile/Signature.java @@ -108,8 +108,8 @@ public final class Signature extends Attribute { /** * @param signatureIndex the index info the constant pool of this signature */ - public void setSignatureIndex( final int signature_index ) { - this.signatureIndex = signature_index; + public void setSignatureIndex( final int signatureIndex ) { + this.signatureIndex = signatureIndex; } diff --git a/src/main/java/org/apache/bcel/generic/MethodGen.java b/src/main/java/org/apache/bcel/generic/MethodGen.java index 87e9e0f..f744241 100644 --- a/src/main/java/org/apache/bcel/generic/MethodGen.java +++ b/src/main/java/org/apache/bcel/generic/MethodGen.java @@ -117,14 +117,14 @@ public class MethodGen extends FieldGenOrMethodGen { * abstract or native methods * @param cp constant pool */ - public MethodGen(final int access_flags, final Type return_type, final Type[] arg_types, String[] arg_names, - final String method_name, final String class_name, final InstructionList il, final ConstantPoolGen cp) { + public MethodGen(final int access_flags, final Type return_type, final Type[] argTypes, String[] argNames, + final String method_name, final String className, final InstructionList il, final ConstantPoolGen cp) { super(access_flags); setType(return_type); - setArgumentTypes(arg_types); - setArgumentNames(arg_names); + setArgumentTypes(argTypes); + setArgumentNames(argNames); setName(method_name); - setClassName(class_name); + setClassName(className); setInstructionList(il); setConstantPool(cp); final boolean abstract_ = isAbstract() || isNative(); @@ -135,32 +135,32 @@ public class MethodGen extends FieldGenOrMethodGen { // end == null => live to end of method /* Add local variables, namely the implicit `this' and the arguments */ - if (!isStatic() && (class_name != null)) { // Instance method -> `this' is local var 0 - addLocalVariable("this", ObjectType.getInstance(class_name), start, end); + if (!isStatic() && (className != null)) { // Instance method -> `this' is local var 0 + addLocalVariable("this", ObjectType.getInstance(className), start, end); } } - if (arg_types != null) { - final int size = arg_types.length; - for (final Type arg_type : arg_types) { + if (argTypes != null) { + final int size = argTypes.length; + for (final Type arg_type : argTypes) { if (Type.VOID == arg_type) { throw new ClassGenException("'void' is an illegal argument type for a method"); } } - if (arg_names != null) { // Names for variables provided? - if (size != arg_names.length) { + if (argNames != null) { // Names for variables provided? + if (size != argNames.length) { throw new ClassGenException("Mismatch in argument array lengths: " + size - + " vs. " + arg_names.length); + + " vs. " + argNames.length); } } else { // Give them dummy names - arg_names = new String[size]; + argNames = new String[size]; for (int i = 0; i < size; i++) { - arg_names[i] = "arg" + i; + argNames[i] = "arg" + i; } - setArgumentNames(arg_names); + setArgumentNames(argNames); } if (!abstract_) { for (int i = 0; i < size; i++) { - addLocalVariable(arg_names[i], arg_types[i], start, end); + addLocalVariable(argNames[i], argTypes[i], start, end); } } } @@ -174,10 +174,10 @@ public class MethodGen extends FieldGenOrMethodGen { * @param className class name containing this method * @param cp constant pool */ - public MethodGen(final Method method, final String class_name, final ConstantPoolGen cp) { + public MethodGen(final Method method, final String className, final ConstantPoolGen cp) { this(method.getAccessFlags(), Type.getReturnType(method.getSignature()), Type.getArgumentTypes(method.getSignature()), null /* may be overridden anyway */ - , method.getName(), class_name, + , method.getName(), className, ((method.getAccessFlags() & (Const.ACC_ABSTRACT | Const.ACC_NATIVE)) == 0) ? new InstructionList(getByteCodes(method)) : null, @@ -400,8 +400,8 @@ public class MethodGen extends FieldGenOrMethodGen { * @return new line number object * @see LineNumber */ - public LineNumberGen addLineNumber( final InstructionHandle ih, final int src_line ) { - final LineNumberGen l = new LineNumberGen(ih, src_line); + public LineNumberGen addLineNumber( final InstructionHandle ih, final int srcLine ) { + final LineNumberGen l = new LineNumberGen(ih, srcLine); lineNumberList.add(l); return l; } @@ -514,8 +514,8 @@ public class MethodGen extends FieldGenOrMethodGen { * * @param className (fully qualified) name of exception */ - public void addException( final String class_name ) { - throwsList.add(class_name); + public void addException( final String className ) { + throwsList.add(className); } @@ -1154,9 +1154,9 @@ public class MethodGen extends FieldGenOrMethodGen { /** @return deep copy of this method */ - public MethodGen copy( final String class_name, final ConstantPoolGen cp ) { + public MethodGen copy( final String className, final ConstantPoolGen cp ) { final Method m = ((MethodGen) clone()).getMethod(); - final MethodGen mg = new MethodGen(m, class_name, super.getConstantPool()); + final MethodGen mg = new MethodGen(m, className, super.getConstantPool()); if (super.getConstantPool() != cp) { mg.setConstantPool(cp); mg.getInstructionList().replaceConstantPool(super.getConstantPool(), cp); diff --git a/src/main/java/org/apache/bcel/generic/ObjectType.java b/src/main/java/org/apache/bcel/generic/ObjectType.java index af495a7..a92ff41 100644 --- a/src/main/java/org/apache/bcel/generic/ObjectType.java +++ b/src/main/java/org/apache/bcel/generic/ObjectType.java @@ -32,16 +32,16 @@ public class ObjectType extends ReferenceType { /** * @since 6.0 */ - public static ObjectType getInstance(final String class_name) { - return new ObjectType(class_name); + public static ObjectType getInstance(final String className) { + return new ObjectType(className); } /** * @param className fully qualified class name, e.g. java.lang.String */ - public ObjectType(final String class_name) { - super(Const.T_REFERENCE, "L" + class_name.replace('.', '/') + ";"); - this.className = class_name.replace('/', '.'); + public ObjectType(final String className) { + super(Const.T_REFERENCE, "L" + className.replace('.', '/') + ";"); + this.className = className.replace('/', '.'); } diff --git a/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java b/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java index fe79b22..3268f62 100644 --- a/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java +++ b/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java @@ -113,14 +113,14 @@ public final class Pass2Verifier extends PassVerifier implements Constants { * <B>Repository.lookupClass(myOwner.getClassname()).getMethods()[method_nr];</B>. * You should not add own information. Leave that to JustIce. */ - public LocalVariablesInfo getLocalVariablesInfo(final int method_nr) { + public LocalVariablesInfo getLocalVariablesInfo(final int methodNr) { if (this.verify() != VerificationResult.VR_OK) { return null; // It's cached, don't worry. } - if (method_nr < 0 || method_nr >= localVariablesInfos.length) { + if (methodNr < 0 || methodNr >= localVariablesInfos.length) { throw new AssertionViolatedException("Method number out of range."); } - return localVariablesInfos[method_nr]; + return localVariablesInfos[methodNr]; } /** @@ -1536,9 +1536,9 @@ public final class Pass2Verifier extends PassVerifier implements Constants { private final ConstantPool cp; /** Constructs an InnerClassDetector working on the JavaClass _jc. */ - public InnerClassDetector(final JavaClass _jc) { - jc = _jc; - cp = jc.getConstantPool(); + public InnerClassDetector(final JavaClass javaClass) { + this.jc = javaClass; + this.cp = jc.getConstantPool(); (new DescendingVisitor(jc, this)).visit(); } diff --git a/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java b/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java index 7adea37..ec17d9f 100644 --- a/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java +++ b/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java @@ -134,9 +134,9 @@ public final class Pass3aVerifier extends PassVerifier{ private Code code; /** Should only be instantiated by a Verifier. */ - public Pass3aVerifier(final Verifier owner, final int method_no) { + public Pass3aVerifier(final Verifier owner, final int methodNo) { myOwner = owner; - this.methodNo = method_no; + this.methodNo = methodNo; } /**