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 e1bcf301 Use camel-case.
e1bcf301 is described below
commit e1bcf301059dcb1e4138d82f82e1a289fc91a837
Author: Gary Gregory <[email protected]>
AuthorDate: Sun May 1 15:16:34 2022 -0400
Use camel-case.
---
.../apache/bcel/generic/InstructionFactory.java | 14 +--
.../bcel/util/AbstractClassPathRepository.java | 8 +-
.../java/org/apache/bcel/util/AttributeHTML.java | 44 ++++-----
.../java/org/apache/bcel/util/BCELFactory.java | 104 ++++++++++-----------
.../java/org/apache/bcel/util/ClassLoader.java | 8 +-
.../org/apache/bcel/util/ClassPathRepository.java | 10 +-
6 files changed, 94 insertions(+), 94 deletions(-)
diff --git a/src/main/java/org/apache/bcel/generic/InstructionFactory.java
b/src/main/java/org/apache/bcel/generic/InstructionFactory.java
index d0dd71ad..a7d77e40 100644
--- a/src/main/java/org/apache/bcel/generic/InstructionFactory.java
+++ b/src/main/java/org/apache/bcel/generic/InstructionFactory.java
@@ -50,11 +50,11 @@ public class InstructionFactory implements
InstructionConstants {
}
// N.N. These must agree with the order of Constants.T_CHAR through T_LONG
- private static final String[] short_names = {
+ private static final String[] shortNames = {
"C", "F", "D", "B", "S", "I", "L"
};
- private static final MethodObject[] append_mos = {
+ private static final MethodObject[] appendMethodObjects = {
new MethodObject("java.lang.StringBuffer", "append",
Type.STRINGBUFFER, new Type[] {
Type.STRING
}),
@@ -529,7 +529,7 @@ public class InstructionFactory implements
InstructionConstants {
public Instruction createAppend( final Type type ) {
final byte t = type.getType();
if (isString(type)) {
- return createInvoke(append_mos[0], Const.INVOKEVIRTUAL);
+ return createInvoke(appendMethodObjects[0], Const.INVOKEVIRTUAL);
}
switch (t) {
case Const.T_BOOLEAN:
@@ -540,10 +540,10 @@ public class InstructionFactory implements
InstructionConstants {
case Const.T_SHORT:
case Const.T_INT:
case Const.T_LONG:
- return createInvoke(append_mos[t], Const.INVOKEVIRTUAL);
+ return createInvoke(appendMethodObjects[t],
Const.INVOKEVIRTUAL);
case Const.T_ARRAY:
case Const.T_OBJECT:
- return createInvoke(append_mos[1], Const.INVOKEVIRTUAL);
+ return createInvoke(appendMethodObjects[1],
Const.INVOKEVIRTUAL);
default:
throw new IllegalArgumentException("No append for this type? "
+ type);
}
@@ -561,8 +561,8 @@ public class InstructionFactory implements
InstructionConstants {
&& (src == Const.T_CHAR || src == Const.T_BYTE || src ==
Const.T_SHORT)) {
src = Const.T_INT;
}
- final String name = "org.apache.bcel.generic." + short_names[src -
Const.T_CHAR] + "2"
- + short_names[dest - Const.T_CHAR];
+ final String name = "org.apache.bcel.generic." + shortNames[src -
Const.T_CHAR] + "2"
+ + shortNames[dest - Const.T_CHAR];
Instruction i = null;
try {
i = (Instruction) java.lang.Class.forName(name).newInstance();
diff --git
a/src/main/java/org/apache/bcel/util/AbstractClassPathRepository.java
b/src/main/java/org/apache/bcel/util/AbstractClassPathRepository.java
index b118648a..b60c2884 100644
--- a/src/main/java/org/apache/bcel/util/AbstractClassPathRepository.java
+++ b/src/main/java/org/apache/bcel/util/AbstractClassPathRepository.java
@@ -33,10 +33,10 @@ import java.io.InputStream;
*/
abstract class AbstractClassPathRepository implements Repository {
- private final ClassPath _path;
+ private final ClassPath classPath;
AbstractClassPathRepository(final ClassPath classPath) {
- _path = classPath;
+ this.classPath = classPath;
}
@Override
@@ -47,7 +47,7 @@ abstract class AbstractClassPathRepository implements
Repository {
@Override
public ClassPath getClassPath() {
- return _path;
+ return classPath;
}
/**
@@ -124,7 +124,7 @@ abstract class AbstractClassPathRepository implements
Repository {
return clazz;
}
try {
- return loadClass(_path.getInputStream(className), className);
+ return loadClass(classPath.getInputStream(className), className);
} catch (final IOException e) {
throw new ClassNotFoundException("Exception while looking for
class " + className + ": " + e, e);
}
diff --git a/src/main/java/org/apache/bcel/util/AttributeHTML.java
b/src/main/java/org/apache/bcel/util/AttributeHTML.java
index 27728944..e3cc53a9 100644
--- a/src/main/java/org/apache/bcel/util/AttributeHTML.java
+++ b/src/main/java/org/apache/bcel/util/AttributeHTML.java
@@ -43,18 +43,18 @@ import org.apache.bcel.classfile.Utility;
*/
final class AttributeHTML {
- private final String class_name; // name of current class
+ private final String className; // name of current class
private final PrintWriter printWriter; // file to write to
- private int attr_count;
- private final ConstantHTML constant_html;
- private final ConstantPool constant_pool;
+ private int attrCount;
+ private final ConstantHTML constantHtml;
+ private final ConstantPool constantPool;
AttributeHTML(final String dir, final String class_name, final
ConstantPool constant_pool,
final ConstantHTML constant_html, final Charset charset) throws
IOException {
- this.class_name = class_name;
- this.constant_pool = constant_pool;
- this.constant_html = constant_html;
+ this.className = class_name;
+ this.constantPool = constant_pool;
+ this.constantHtml = constant_html;
printWriter = new PrintWriter(dir + class_name + "_attributes.html",
charset.name());
printWriter.print("<HTML><head><meta charset=\"");
printWriter.print(charset.name());
@@ -70,7 +70,7 @@ final class AttributeHTML {
private String codeLink( final int link, final int method_number ) {
- return "<A HREF=\"" + class_name + "_code.html#code" + method_number +
"@" + link
+ return "<A HREF=\"" + className + "_code.html#code" + method_number +
"@" + link
+ "\" TARGET=Code>" + link + "</A>";
}
@@ -86,13 +86,13 @@ final class AttributeHTML {
if (tag == Const.ATTR_UNKNOWN) {
return;
}
- attr_count++; // Increment number of attributes found so far
- if (attr_count % 2 == 0) {
+ attrCount++; // Increment number of attributes found so far
+ if (attrCount % 2 == 0) {
printWriter.print("<TR BGCOLOR=\"#C0C0C0\"><TD>");
} else {
printWriter.print("<TR BGCOLOR=\"#A0A0A0\"><TD>");
}
- printWriter.println("<H4><A NAME=\"" + anchor + "\">" + attr_count + "
" + Const.getAttributeName(tag)
+ printWriter.println("<H4><A NAME=\"" + anchor + "\">" + attrCount + "
" + Const.getAttributeName(tag)
+ "</A></H4>");
/* Handle different attributes
*/
@@ -102,7 +102,7 @@ final class AttributeHTML {
// Some directly printable values
printWriter.print("<UL><LI>Maximum stack size = " +
c.getMaxStack()
+ "</LI>\n<LI>Number of local variables = " +
c.getMaxLocals()
- + "</LI>\n<LI><A HREF=\"" + class_name +
"_code.html#method"
+ + "</LI>\n<LI><A HREF=\"" + className +
"_code.html#method"
+ method_number + "\" TARGET=Code>Byte
code</A></LI></UL>\n");
// Get handled exceptions and list them
final CodeException[] ce = c.getExceptionTable();
@@ -113,7 +113,7 @@ final class AttributeHTML {
final int catch_type = cex.getCatchType(); // Index in
constant pool
printWriter.print("<LI>");
if (catch_type != 0) {
-
printWriter.print(constant_html.referenceConstant(catch_type)); // Create Link
to _cp.html
+
printWriter.print(constantHtml.referenceConstant(catch_type)); // Create Link
to _cp.html
} else {
printWriter.print("Any Exception");
}
@@ -128,14 +128,14 @@ final class AttributeHTML {
case Const.ATTR_CONSTANT_VALUE:
index = ((ConstantValue) attribute).getConstantValueIndex();
// Reference _cp.html
- printWriter.print("<UL><LI><A HREF=\"" + class_name +
"_cp.html#cp" + index
+ printWriter.print("<UL><LI><A HREF=\"" + className +
"_cp.html#cp" + index
+ "\" TARGET=\"ConstantPool\">Constant value index(" +
index
+ ")</A></UL>\n");
break;
case Const.ATTR_SOURCE_FILE:
index = ((SourceFile) attribute).getSourceFileIndex();
// Reference _cp.html
- printWriter.print("<UL><LI><A HREF=\"" + class_name +
"_cp.html#cp" + index
+ printWriter.print("<UL><LI><A HREF=\"" + className +
"_cp.html#cp" + index
+ "\" TARGET=\"ConstantPool\">Source file index(" +
index + ")</A></UL>\n");
break;
case Const.ATTR_EXCEPTIONS:
@@ -143,7 +143,7 @@ final class AttributeHTML {
final int[] indices = ((ExceptionTable)
attribute).getExceptionIndexTable();
printWriter.print("<UL>");
for (final int indice : indices) {
- printWriter.print("<LI><A HREF=\"" + class_name +
"_cp.html#cp" + indice
+ printWriter.print("<LI><A HREF=\"" + className +
"_cp.html#cp" + indice
+ "\" TARGET=\"ConstantPool\">Exception class
index(" + indice
+ ")</A>\n");
}
@@ -167,16 +167,16 @@ final class AttributeHTML {
printWriter.print("<UL>");
for (final LocalVariable var : vars) {
index = var.getSignatureIndex();
- String signature = ((ConstantUtf8)
constant_pool.getConstant(index,
+ String signature = ((ConstantUtf8)
constantPool.getConstant(index,
Const.CONSTANT_Utf8)).getBytes();
signature = Utility.signatureToString(signature, false);
final int start = var.getStartPC();
final int end = start + var.getLength();
printWriter.println("<LI>" +
Class2HTML.referenceType(signature) + " <B>"
+ var.getName() + "</B> in slot %" + var.getIndex()
- + "<BR>Valid from lines " + "<A HREF=\"" +
class_name
+ + "<BR>Valid from lines " + "<A HREF=\"" +
className
+ "_code.html#code" + method_number + "@" + start
+ "\" TARGET=Code>"
- + start + "</A> to " + "<A HREF=\"" + class_name +
"_code.html#code"
+ + start + "</A> to " + "<A HREF=\"" + className +
"_code.html#code"
+ method_number + "@" + end + "\" TARGET=Code>" +
end + "</A></LI>");
}
printWriter.print("</UL>\n");
@@ -190,16 +190,16 @@ final class AttributeHTML {
final String access;
index = classe.getInnerNameIndex();
if (index > 0) {
- name = ((ConstantUtf8)
constant_pool.getConstant(index, Const.CONSTANT_Utf8))
+ name = ((ConstantUtf8) constantPool.getConstant(index,
Const.CONSTANT_Utf8))
.getBytes();
} else {
name = "<anonymous>";
}
access =
Utility.accessToString(classe.getInnerAccessFlags());
printWriter.print("<LI><FONT COLOR=\"#FF0000\">" + access
+ "</FONT> "
- +
constant_html.referenceConstant(classe.getInnerClassIndex())
+ +
constantHtml.referenceConstant(classe.getInnerClassIndex())
+ " in class "
- +
constant_html.referenceConstant(classe.getOuterClassIndex())
+ +
constantHtml.referenceConstant(classe.getOuterClassIndex())
+ " named " + name + "</LI>\n");
}
printWriter.print("</UL>\n");
diff --git a/src/main/java/org/apache/bcel/util/BCELFactory.java
b/src/main/java/org/apache/bcel/util/BCELFactory.java
index 16081bfb..c357f0b8 100644
--- a/src/main/java/org/apache/bcel/util/BCELFactory.java
+++ b/src/main/java/org/apache/bcel/util/BCELFactory.java
@@ -65,9 +65,9 @@ import org.apache.bcel.generic.Type;
class BCELFactory extends EmptyVisitor {
private static final String CONSTANT_PREFIX =
Const.class.getSimpleName()+".";
- private final MethodGen _mg;
- private final PrintWriter _out;
- private final ConstantPoolGen _cp;
+ private final MethodGen methodGen;
+ private final PrintWriter printWriter;
+ private final ConstantPoolGen constantPoolGen;
private final Map<Instruction, InstructionHandle> branch_map = new
HashMap<>();
@@ -77,9 +77,9 @@ class BCELFactory extends EmptyVisitor {
BCELFactory(final MethodGen mg, final PrintWriter out) {
- _mg = mg;
- _cp = mg.getConstantPool();
- _out = out;
+ methodGen = mg;
+ constantPoolGen = mg.getConstantPool();
+ printWriter = out;
}
@@ -98,13 +98,13 @@ class BCELFactory extends EmptyVisitor {
embed = "new ObjectType(\""+ot.getClassName()+"\")";
}
- _out.println("il.append(new PUSH(_cp, " + embed + "));");
+ printWriter.println("il.append(new PUSH(_cp, " + embed + "));");
}
public void start() {
- if (!_mg.isAbstract() && !_mg.isNative()) {
- for (InstructionHandle ih = _mg.getInstructionList().getStart();
ih != null; ih = ih
+ if (!methodGen.isAbstract() && !methodGen.isNative()) {
+ for (InstructionHandle ih =
methodGen.getInstructionList().getStart(); ih != null; ih = ih
.getNext()) {
final Instruction i = ih.getInstruction();
if (i instanceof BranchInstruction) {
@@ -112,12 +112,12 @@ class BCELFactory extends EmptyVisitor {
}
if (ih.hasTargeters()) {
if (i instanceof BranchInstruction) {
- _out.println(" InstructionHandle ih_" +
ih.getPosition() + ";");
+ printWriter.println(" InstructionHandle ih_" +
ih.getPosition() + ";");
} else {
- _out.print(" InstructionHandle ih_" +
ih.getPosition() + " = ");
+ printWriter.print(" InstructionHandle ih_" +
ih.getPosition() + " = ");
}
} else {
- _out.print(" ");
+ printWriter.print(" ");
}
if (!visitInstruction(i)) {
i.accept(this);
@@ -134,13 +134,13 @@ class BCELFactory extends EmptyVisitor {
final BranchHandle bh = (BranchHandle) branch_map.get(bi);
final int pos = bh.getPosition();
final String name = bi.getName() + "_" + pos;
- int t_pos = bh.getTarget().getPosition();
- _out.println(" " + name + ".setTarget(ih_" + t_pos + ");");
+ int targetPos = bh.getTarget().getPosition();
+ printWriter.println(" " + name + ".setTarget(ih_" + targetPos +
");");
if (bi instanceof Select) {
final InstructionHandle[] ihs = ((Select) bi).getTargets();
for (int j = 0; j < ihs.length; j++) {
- t_pos = ihs[j].getPosition();
- _out.println(" " + name + ".setTarget(" + j + ", ih_" +
t_pos + ");");
+ targetPos = ihs[j].getPosition();
+ printWriter.println(" " + name + ".setTarget(" + j + ",
ih_" + targetPos + ");");
}
}
}
@@ -148,11 +148,11 @@ class BCELFactory extends EmptyVisitor {
private void updateExceptionHandlers() {
- final CodeExceptionGen[] handlers = _mg.getExceptionHandlers();
+ final CodeExceptionGen[] handlers = methodGen.getExceptionHandlers();
for (final CodeExceptionGen h : handlers) {
final String type = h.getCatchType() == null ? "null" :
BCELifier.printType(h
.getCatchType());
- _out.println(" method.addExceptionHandler(" + "ih_" +
h.getStartPC().getPosition()
+ printWriter.println(" method.addExceptionHandler(" + "ih_" +
h.getStartPC().getPosition()
+ ", " + "ih_" + h.getEndPC().getPosition() + ", " + "ih_"
+ h.getHandlerPC().getPosition() + ", " + type + ");");
}
@@ -163,7 +163,7 @@ class BCELFactory extends EmptyVisitor {
public void visitAllocationInstruction( final AllocationInstruction i ) {
Type type;
if (i instanceof CPInstruction) {
- type = ((CPInstruction) i).getType(_cp);
+ type = ((CPInstruction) i).getType(constantPoolGen);
} else {
type = ((NEWARRAY) i).getType();
}
@@ -171,7 +171,7 @@ class BCELFactory extends EmptyVisitor {
int dim = 1;
switch (opcode) {
case Const.NEW:
- _out.println("il.append(_factory.createNew(\"" + ((ObjectType)
type).getClassName()
+ printWriter.println("il.append(_factory.createNew(\"" +
((ObjectType) type).getClassName()
+ "\"));");
break;
case Const.MULTIANEWARRAY:
@@ -182,7 +182,7 @@ class BCELFactory extends EmptyVisitor {
if (type instanceof ArrayType) {
type = ((ArrayType) type).getBasicType();
}
- _out.println("il.append(_factory.createNewArray(" +
BCELifier.printType(type)
+ printWriter.println("il.append(_factory.createNewArray(" +
BCELifier.printType(type)
+ ", (short) " + dim + "));");
break;
default:
@@ -194,9 +194,9 @@ class BCELFactory extends EmptyVisitor {
@Override
public void visitArrayInstruction( final ArrayInstruction i ) {
final short opcode = i.getOpcode();
- final Type type = i.getType(_cp);
+ final Type type = i.getType(constantPoolGen);
final String kind = opcode < Const.IASTORE ? "Load" : "Store";
- _out.println("il.append(_factory.createArray" + kind + "(" +
BCELifier.printType(type)
+ printWriter.println("il.append(_factory.createArray" + kind + "(" +
BCELifier.printType(type)
+ "));");
}
@@ -218,15 +218,15 @@ class BCELFactory extends EmptyVisitor {
}
}
args.append(" }");
- _out.print("Select " + name + " = new " +
bi.getName().toUpperCase(Locale.ENGLISH)
+ printWriter.print("Select " + name + " = new " +
bi.getName().toUpperCase(Locale.ENGLISH)
+ "(" + args + ", new InstructionHandle[] { ");
for (int i = 0; i < matchs.length; i++) {
- _out.print("null");
+ printWriter.print("null");
if (i < matchs.length - 1) {
- _out.print(", ");
+ printWriter.print(", ");
}
}
- _out.println(" }, null);");
+ printWriter.println(" }, null);");
} else {
final int t_pos = bh.getTarget().getPosition();
String target;
@@ -236,22 +236,22 @@ class BCELFactory extends EmptyVisitor {
branches.add(bi);
target = "null";
}
- _out.println(" BranchInstruction " + name + " =
_factory.createBranchInstruction("
+ printWriter.println(" BranchInstruction " + name + " =
_factory.createBranchInstruction("
+ CONSTANT_PREFIX +
bi.getName().toUpperCase(Locale.ENGLISH) + ", " + target
+ ");");
}
if (bh.hasTargeters()) {
- _out.println(" ih_" + pos + " = il.append(" + name + ");");
+ printWriter.println(" ih_" + pos + " = il.append(" + name +
");");
} else {
- _out.println(" il.append(" + name + ");");
+ printWriter.println(" il.append(" + name + ");");
}
}
@Override
public void visitCHECKCAST( final CHECKCAST i ) {
- final Type type = i.getType(_cp);
- _out.println("il.append(_factory.createCheckCast(" +
BCELifier.printType(type) + "));");
+ final Type type = i.getType(constantPoolGen);
+ printWriter.println("il.append(_factory.createCheckCast(" +
BCELifier.printType(type) + "));");
}
@@ -264,10 +264,10 @@ class BCELFactory extends EmptyVisitor {
@Override
public void visitFieldInstruction( final FieldInstruction i ) {
final short opcode = i.getOpcode();
- final String class_name = i.getClassName(_cp);
- final String field_name = i.getFieldName(_cp);
- final Type type = i.getFieldType(_cp);
- _out.println("il.append(_factory.createFieldAccess(\"" + class_name +
"\", \"" + field_name
+ final String className = i.getClassName(constantPoolGen);
+ final String fieldName = i.getFieldName(constantPoolGen);
+ final Type type = i.getFieldType(constantPoolGen);
+ printWriter.println("il.append(_factory.createFieldAccess(\"" +
className + "\", \"" + fieldName
+ "\", " + BCELifier.printType(type) + ", " + CONSTANT_PREFIX
+ Const.getOpcodeName(opcode).toUpperCase(Locale.ENGLISH) +
"));");
}
@@ -275,8 +275,8 @@ class BCELFactory extends EmptyVisitor {
@Override
public void visitINSTANCEOF( final INSTANCEOF i ) {
- final Type type = i.getType(_cp);
- _out.println("il.append(new INSTANCEOF(_cp.addClass(" +
BCELifier.printType(type) + ")));");
+ final Type type = i.getType(constantPoolGen);
+ printWriter.println("il.append(new INSTANCEOF(_cp.addClass(" +
BCELifier.printType(type) + ")));");
}
@@ -284,7 +284,7 @@ class BCELFactory extends EmptyVisitor {
final short opcode = i.getOpcode();
if (InstructionConst.getInstruction(opcode) != null
&& !(i instanceof ConstantPushInstruction) && !(i instanceof
ReturnInstruction)) { // Handled below
- _out.println("il.append(InstructionConst."
+ printWriter.println("il.append(InstructionConst."
+ i.getName().toUpperCase(Locale.ENGLISH) + ");");
return true;
}
@@ -295,11 +295,11 @@ class BCELFactory extends EmptyVisitor {
@Override
public void visitInvokeInstruction( final InvokeInstruction i ) {
final short opcode = i.getOpcode();
- final String class_name = i.getClassName(_cp);
- final String method_name = i.getMethodName(_cp);
- final Type type = i.getReturnType(_cp);
- final Type[] arg_types = i.getArgumentTypes(_cp);
- _out.println("il.append(_factory.createInvoke(\"" + class_name + "\",
\"" + method_name
+ final String className = i.getClassName(constantPoolGen);
+ final String methodName = i.getMethodName(constantPoolGen);
+ final Type type = i.getReturnType(constantPoolGen);
+ final Type[] arg_types = i.getArgumentTypes(constantPoolGen);
+ printWriter.println("il.append(_factory.createInvoke(\"" + className +
"\", \"" + methodName
+ "\", " + BCELifier.printType(type) + ", "
+ BCELifier.printArgumentTypes(arg_types) + ", " +
CONSTANT_PREFIX
+ Const.getOpcodeName(opcode).toUpperCase(Locale.ENGLISH) +
"));");
@@ -307,26 +307,26 @@ class BCELFactory extends EmptyVisitor {
@Override
public void visitLDC( final LDC i ) {
- createConstant(i.getValue(_cp));
+ createConstant(i.getValue(constantPoolGen));
}
@Override
public void visitLDC2_W( final LDC2_W i ) {
- createConstant(i.getValue(_cp));
+ createConstant(i.getValue(constantPoolGen));
}
@Override
public void visitLocalVariableInstruction( final LocalVariableInstruction
i ) {
final short opcode = i.getOpcode();
- final Type type = i.getType(_cp);
+ final Type type = i.getType(constantPoolGen);
if (opcode == Const.IINC) {
- _out.println("il.append(new IINC(" + i.getIndex() + ", " + ((IINC)
i).getIncrement()
+ printWriter.println("il.append(new IINC(" + i.getIndex() + ", " +
((IINC) i).getIncrement()
+ "));");
} else {
final String kind = opcode < Const.ISTORE ? "Load" : "Store";
- _out.println("il.append(_factory.create" + kind + "(" +
BCELifier.printType(type)
+ printWriter.println("il.append(_factory.create" + kind + "(" +
BCELifier.printType(type)
+ ", " + i.getIndex() + "));");
}
}
@@ -334,13 +334,13 @@ class BCELFactory extends EmptyVisitor {
@Override
public void visitRET( final RET i ) {
- _out.println("il.append(new RET(" + i.getIndex() + ")));");
+ printWriter.println("il.append(new RET(" + i.getIndex() + ")));");
}
@Override
public void visitReturnInstruction( final ReturnInstruction i ) {
- final Type type = i.getType(_cp);
- _out.println("il.append(_factory.createReturn(" +
BCELifier.printType(type) + "));");
+ final Type type = i.getType(constantPoolGen);
+ printWriter.println("il.append(_factory.createReturn(" +
BCELifier.printType(type) + "));");
}
}
diff --git a/src/main/java/org/apache/bcel/util/ClassLoader.java
b/src/main/java/org/apache/bcel/util/ClassLoader.java
index 191f32a5..2c54a1e2 100644
--- a/src/main/java/org/apache/bcel/util/ClassLoader.java
+++ b/src/main/java/org/apache/bcel/util/ClassLoader.java
@@ -63,7 +63,7 @@ public class ClassLoader extends java.lang.ClassLoader {
private final Hashtable<String, Class<?>> classes = new Hashtable<>();
// Hashtable is synchronized thus thread-safe
- private final String[] ignored_packages;
+ private final String[] ignoredPackages;
private Repository repository = SyntheticRepository.getInstance();
@@ -79,7 +79,7 @@ public class ClassLoader extends java.lang.ClassLoader {
*/
public ClassLoader(final java.lang.ClassLoader deferTo) {
super(deferTo);
- this.ignored_packages = DEFAULT_IGNORED_PACKAGES;
+ this.ignoredPackages = DEFAULT_IGNORED_PACKAGES;
this.repository = new ClassLoaderRepository(deferTo);
}
@@ -98,7 +98,7 @@ public class ClassLoader extends java.lang.ClassLoader {
* with the system class loader
*/
public ClassLoader(final String[] ignored_packages) {
- this.ignored_packages = ignored_packages;
+ this.ignoredPackages = ignored_packages;
}
/**
@@ -148,7 +148,7 @@ public class ClassLoader extends java.lang.ClassLoader {
/* Second try: Load system class using system class loader. You
better
* don't mess around with them.
*/
- for (final String ignored_package : ignored_packages) {
+ for (final String ignored_package : ignoredPackages) {
if (class_name.startsWith(ignored_package)) {
cl = getParent().loadClass(class_name);
break;
diff --git a/src/main/java/org/apache/bcel/util/ClassPathRepository.java
b/src/main/java/org/apache/bcel/util/ClassPathRepository.java
index 184be020..d488a7e1 100644
--- a/src/main/java/org/apache/bcel/util/ClassPathRepository.java
+++ b/src/main/java/org/apache/bcel/util/ClassPathRepository.java
@@ -30,7 +30,7 @@ import org.apache.bcel.classfile.JavaClass;
*/
public class ClassPathRepository extends AbstractClassPathRepository {
- private final Map<String, JavaClass> _loadedClasses = new HashMap<>(); //
CLASSNAME X JAVACLASS
+ private final Map<String, JavaClass> loadedClasses = new HashMap<>(); //
CLASSNAME X JAVACLASS
public ClassPathRepository(final ClassPath classPath) {
super(classPath);
@@ -41,7 +41,7 @@ public class ClassPathRepository extends
AbstractClassPathRepository {
*/
@Override
public void clear() {
- _loadedClasses.clear();
+ loadedClasses.clear();
}
/**
@@ -49,7 +49,7 @@ public class ClassPathRepository extends
AbstractClassPathRepository {
*/
@Override
public JavaClass findClass(final String className) {
- return _loadedClasses.get(className);
+ return loadedClasses.get(className);
}
/**
@@ -57,7 +57,7 @@ public class ClassPathRepository extends
AbstractClassPathRepository {
*/
@Override
public void removeClass(final JavaClass javaClass) {
- _loadedClasses.remove(javaClass.getClassName());
+ loadedClasses.remove(javaClass.getClassName());
}
/**
@@ -65,7 +65,7 @@ public class ClassPathRepository extends
AbstractClassPathRepository {
*/
@Override
public void storeClass(final JavaClass javaClass) {
- _loadedClasses.put(javaClass.getClassName(), javaClass);
+ loadedClasses.put(javaClass.getClassName(), javaClass);
javaClass.setRepository(this);
}
}