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 2163575f Renname example classes to be camel cased 2163575f is described below commit 2163575fabf69246c3d2b282e1607498fb04851e Author: Gary David Gregory (Code signing key) <ggreg...@apache.org> AuthorDate: Sat Oct 22 14:33:20 2022 -0400 Renname example classes to be camel cased --- src/examples/{helloify.java => Helloify.java} | 2 +- src/examples/{id.java => Id.java} | 4 ++-- src/examples/{listclass.java => ListClass.java} | 18 +++++++++--------- src/examples/{maxstack.java => MaxStack.java} | 2 +- src/examples/{patchclass.java => PatchClass.java} | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/examples/helloify.java b/src/examples/Helloify.java similarity index 99% rename from src/examples/helloify.java rename to src/examples/Helloify.java index 26b6ae26..81e6e120 100644 --- a/src/examples/helloify.java +++ b/src/examples/Helloify.java @@ -36,7 +36,7 @@ import org.apache.bcel.generic.PUSH; * Read class file(s) and patch all of its methods, so that they print "hello" and their name and signature before doing * anything else. */ -public final class helloify { +public final class Helloify { private static String className; private static ConstantPoolGen cp; diff --git a/src/examples/id.java b/src/examples/Id.java similarity index 96% rename from src/examples/id.java rename to src/examples/Id.java index 419321c2..1e1d24c3 100644 --- a/src/examples/id.java +++ b/src/examples/Id.java @@ -31,12 +31,12 @@ import org.apache.bcel.generic.MethodGen; * Try to: * * <pre> - * % java id <someclass> % java listclass -code <someclass> > foo % java listclass -code <someclass>.clazz > bar % + * % java Id <someclass> % java listclass -code <someclass> > foo % java listclass -code <someclass>.clazz > bar % * diff foo bar | more * * <pre> */ -public class id { +public class Id { public static void main(final String[] argv) throws Exception { JavaClass clazz; diff --git a/src/examples/listclass.java b/src/examples/ListClass.java similarity index 95% rename from src/examples/listclass.java rename to src/examples/ListClass.java index 1707fd37..8c6d398a 100644 --- a/src/examples/listclass.java +++ b/src/examples/ListClass.java @@ -36,7 +36,7 @@ import org.apache.bcel.classfile.Method; * Read class file(s) and display its contents. The command line usage is: * * <pre> - * java listclass [-constants] [-code] [-brief] [-dependencies] [-nocontents] [-recurse] class... [-exclude <list>] + * java ListClass [-constants] [-code] [-brief] [-dependencies] [-nocontents] [-recurse] class... [-exclude <list>] * </pre> * * where @@ -60,30 +60,30 @@ import org.apache.bcel.classfile.Method; * interested in dependency information.</li> * </ul> * <p> - * Here's a couple examples of how I typically use listclass: + * Here's a couple examples of how I typically use ListClass: * </p> * * <pre> - * java listclass -code MyClass + * java ListClass -code MyClass * </pre> * * Print information about the class and the byte code of the methods * * <pre> - * java listclass -nocontents -dependencies MyClass + * java ListClass -nocontents -dependencies MyClass * </pre> * * Print a list of all classes which MyClass depends on. * * <pre> - * java listclass -nocontents -recurse MyClass -exclude java. javax. sun. + * java ListClass -nocontents -recurse MyClass -exclude java. javax. sun. * </pre> * * Print a recursive listing of all classes which MyClass depends on. Do not analyze classes beginning with "java.", * "javax.", or "sun.". * * <pre> - * java listclass -nocontents -dependencies -recurse MyClass -exclude java.javax. sun. + * java ListClass -nocontents -dependencies -recurse MyClass -exclude java.javax. sun. * </pre> * <p> * Print a recursive listing of dependency information for MyClass and its dependents. Do not analyze classes beginning @@ -92,7 +92,7 @@ import org.apache.bcel.classfile.Method; * * <a href="mailto:twhee...@objectspace.com">Thomas Wheeler</A> */ -public class listclass { +public class ListClass { public static String[] getClassDependencies(final ConstantPool pool) { final String[] tempArray = new String[pool.getLength()]; @@ -169,7 +169,7 @@ public class listclass { if (fileName.isEmpty()) { System.err.println("list: No input files specified"); } else { - final listclass listClass = new listclass(code, constants, verbose, classdep, nocontents, recurse, excludeName); + final ListClass listClass = new ListClass(code, constants, verbose, classdep, nocontents, recurse, excludeName); for (final String element : fileName) { name = element; @@ -216,7 +216,7 @@ public class listclass { List<String> excludeName; - public listclass(final boolean code, final boolean constants, final boolean verbose, final boolean classDep, final boolean noContents, + public ListClass(final boolean code, final boolean constants, final boolean verbose, final boolean classDep, final boolean noContents, final boolean recurse, final List<String> excludeName) { this.code = code; this.constants = constants; diff --git a/src/examples/maxstack.java b/src/examples/MaxStack.java similarity index 98% rename from src/examples/maxstack.java rename to src/examples/MaxStack.java index 3c39832a..c1b679d6 100644 --- a/src/examples/maxstack.java +++ b/src/examples/MaxStack.java @@ -26,7 +26,7 @@ import org.apache.bcel.generic.MethodGen; * Read class file(s) and examine all of its methods, determining the maximum stack depth used by analyzing control * flow. */ -public final class maxstack { +public final class MaxStack { public static void main(final String[] argv) throws Exception { for (final String className : argv) { diff --git a/src/examples/patchclass.java b/src/examples/PatchClass.java similarity index 97% rename from src/examples/patchclass.java rename to src/examples/PatchClass.java index 5df79fc6..9ff3a237 100644 --- a/src/examples/patchclass.java +++ b/src/examples/PatchClass.java @@ -23,9 +23,9 @@ import org.apache.bcel.classfile.JavaClass; /** * Patch all Utf8 constants in the given class file <em>file</em>.class and save the result in _<em>file</em>.class. * - * Usage: patch <oldstring> <newstring> files + * Usage: PatchClass <oldstring> <newstring> files */ -public class patchclass { +public class PatchClass { public static void main(final String[] argv) throws Exception { final String[] fileName = new String[argv.length];