aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/examples/Mini/ASTExpr.java4
-rw-r--r--src/examples/Mini/ASTFunDecl.java4
-rw-r--r--src/examples/Mini/ASTProgram.java8
-rw-r--r--src/examples/Mini/Environment.java2
-rw-r--r--src/examples/Mini/MiniParserTokenManager.java4
-rw-r--r--src/examples/Mini/TokenMgrError.java2
-rw-r--r--src/examples/Peephole.java2
-rw-r--r--src/main/java/org/apache/bcel/classfile/ConstantPool.java2
-rw-r--r--src/main/java/org/apache/bcel/classfile/JavaClass.java2
-rw-r--r--src/main/java/org/apache/bcel/classfile/Signature.java4
-rw-r--r--src/main/java/org/apache/bcel/classfile/Utility.java4
-rw-r--r--src/main/java/org/apache/bcel/generic/InstructionFactory.java10
-rw-r--r--src/main/java/org/apache/bcel/util/ClassPath.java2
-rw-r--r--src/main/java/org/apache/bcel/util/InstructionFinder.java6
-rw-r--r--src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java2
-rw-r--r--src/site/xdoc/manual.xml2
16 files changed, 30 insertions, 30 deletions
diff --git a/src/examples/Mini/ASTExpr.java b/src/examples/Mini/ASTExpr.java
index 3ce7b6c9..e1d401be 100644
--- a/src/examples/Mini/ASTExpr.java
+++ b/src/examples/Mini/ASTExpr.java
@@ -192,11 +192,11 @@ implements MiniParserConstants, MiniParserTreeConstants, org.apache.bcel.Constan
return type;
}
- private static final String toBool(String i) {
+ private static String toBool(String i) {
return "(" + i + " != 0)";
}
- private static final String toInt(String i) {
+ private static String toInt(String i) {
return "((" + i + ")? 1 : 0)";
}
diff --git a/src/examples/Mini/ASTFunDecl.java b/src/examples/Mini/ASTFunDecl.java
index 38efb057..b506f90c 100644
--- a/src/examples/Mini/ASTFunDecl.java
+++ b/src/examples/Mini/ASTFunDecl.java
@@ -316,7 +316,7 @@ implements MiniParserTreeConstants, org.apache.bcel.Constants {
*
* where the IF_ICMP__ now branches to the target of the previous IFEQ instruction.
*/
- private static final void optimizeIFs(InstructionList il) {
+ private static void optimizeIFs(InstructionList il) {
InstructionFinder f = new InstructionFinder(il);
String pat = "IF_ICMP ICONST_1 GOTO ICONST_0 IFEQ Instruction";
@@ -403,7 +403,7 @@ implements MiniParserTreeConstants, org.apache.bcel.Constants {
static final void reset() { size = max_size = 0; }
- private static final String getVarDecls() {
+ private static String getVarDecls() {
StringBuffer buf = new StringBuffer(" int ");
for(int i=0; i < max_size; i++) {
diff --git a/src/examples/Mini/ASTProgram.java b/src/examples/Mini/ASTProgram.java
index 36efa98b..b6d240fb 100644
--- a/src/examples/Mini/ASTProgram.java
+++ b/src/examples/Mini/ASTProgram.java
@@ -188,11 +188,11 @@ implements MiniParserConstants, MiniParserTreeConstants, org.apache.bcel.Constan
out.println(" private static BufferedReader _in = new BufferedReader" +
"(new InputStreamReader(System.in));\n");
- out.println(" private static final int _readInt() throws IOException {\n" +
+ out.println(" private static int _readInt() throws IOException {\n" +
" System.out.print(\"Please enter a number> \");\n" +
" return Integer.parseInt(_in.readLine());\n }\n");
- out.println(" private static final int _writeInt(int n) {\n" +
+ out.println(" private static int _writeInt(int n) {\n" +
" System.out.println(\"Result: \" + n);\n return 0;\n }\n");
for(int i=0; i < fun_decls.length; i++) {
@@ -238,7 +238,7 @@ implements MiniParserConstants, MiniParserTreeConstants, org.apache.bcel.Constan
"(Ljava/lang/String;)I")));
il.append(InstructionConstants.IRETURN);
- /* private static final int _readInt() throws IOException
+ /* private static int _readInt() throws IOException
*/
method = new MethodGen(ACC_STATIC | ACC_PRIVATE | ACC_FINAL,
Type.INT, Type.NO_ARGS, null,
@@ -249,7 +249,7 @@ implements MiniParserConstants, MiniParserTreeConstants, org.apache.bcel.Constan
method.setMaxStack(2);
class_gen.addMethod(method.getMethod());
- /* private static final int _writeInt(int i) throws IOException
+ /* private static int _writeInt(int i) throws IOException
*/
Type[] args = { Type.INT };
String[] argv = { "i" } ;
diff --git a/src/examples/Mini/Environment.java b/src/examples/Mini/Environment.java
index 6eee111b..23766f38 100644
--- a/src/examples/Mini/Environment.java
+++ b/src/examples/Mini/Environment.java
@@ -138,7 +138,7 @@ public class Environment implements Cloneable {
} catch(ArrayIndexOutOfBoundsException e) {}
}
- private static final int lookup(Vector<EnvEntry> v, String key)
+ private static int lookup(Vector<EnvEntry> v, String key)
throws ArrayIndexOutOfBoundsException
{
int len = v.size();
diff --git a/src/examples/Mini/MiniParserTokenManager.java b/src/examples/Mini/MiniParserTokenManager.java
index d5fbe75d..bb23ca2e 100644
--- a/src/examples/Mini/MiniParserTokenManager.java
+++ b/src/examples/Mini/MiniParserTokenManager.java
@@ -132,7 +132,7 @@ static private int jjMoveNfa_1(int startState, int curPos)
catch(java.io.IOException e) { return curPos; }
}
}
-private static final int jjStopStringLiteralDfa_0(int pos, long active0)
+private static int jjStopStringLiteralDfa_0(int pos, long active0)
{
switch (pos)
{
@@ -180,7 +180,7 @@ private static final int jjStopStringLiteralDfa_0(int pos, long active0)
return -1;
}
}
-private static final int jjStartNfa_0(int pos, long active0)
+private static int jjStartNfa_0(int pos, long active0)
{
return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
}
diff --git a/src/examples/Mini/TokenMgrError.java b/src/examples/Mini/TokenMgrError.java
index 4fa9d93d..7039d090 100644
--- a/src/examples/Mini/TokenMgrError.java
+++ b/src/examples/Mini/TokenMgrError.java
@@ -111,7 +111,7 @@ public class TokenMgrError extends Error
* curchar : the offending character
* Note: You can customize the lexical error message by modifying this method.
*/
- private static final String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
+ private static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
return("Lexical error at line " +
errorLine + ", column " +
errorColumn + ". Encountered: " +
diff --git a/src/examples/Peephole.java b/src/examples/Peephole.java
index e6de8201..c01571fa 100644
--- a/src/examples/Peephole.java
+++ b/src/examples/Peephole.java
@@ -61,7 +61,7 @@ public class Peephole {
} catch(Exception e) { e.printStackTrace(); }
}
- private static final Method removeNOPs(MethodGen mg) {
+ private static Method removeNOPs(MethodGen mg) {
InstructionList il = mg.getInstructionList();
InstructionFinder f = new InstructionFinder(il);
String pat = "NOP+"; // Find at least one NOP
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantPool.java b/src/main/java/org/apache/bcel/classfile/ConstantPool.java
index b21ccc29..73ba98b0 100644
--- a/src/main/java/org/apache/bcel/classfile/ConstantPool.java
+++ b/src/main/java/org/apache/bcel/classfile/ConstantPool.java
@@ -150,7 +150,7 @@ public class ConstantPool implements Cloneable, Node, Serializable {
}
- private static final String escape( String str ) {
+ private static String escape( String str ) {
int len = str.length();
StringBuilder buf = new StringBuilder(len + 5);
char[] ch = str.toCharArray();
diff --git a/src/main/java/org/apache/bcel/classfile/JavaClass.java b/src/main/java/org/apache/bcel/classfile/JavaClass.java
index efa9a4bc..8d29fded 100644
--- a/src/main/java/org/apache/bcel/classfile/JavaClass.java
+++ b/src/main/java/org/apache/bcel/classfile/JavaClass.java
@@ -670,7 +670,7 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl
}
- private static final String indent( Object obj ) {
+ private static String indent( Object obj ) {
StringTokenizer tok = new StringTokenizer(obj.toString(), "\n");
StringBuilder buf = new StringBuilder();
while (tok.hasMoreTokens()) {
diff --git a/src/main/java/org/apache/bcel/classfile/Signature.java b/src/main/java/org/apache/bcel/classfile/Signature.java
index 19c2c178..adc6c10c 100644
--- a/src/main/java/org/apache/bcel/classfile/Signature.java
+++ b/src/main/java/org/apache/bcel/classfile/Signature.java
@@ -153,7 +153,7 @@ public final class Signature extends Attribute {
}
- private static final void matchIdent( MyByteArrayInputStream in, StringBuffer buf ) {
+ private static void matchIdent( MyByteArrayInputStream in, StringBuffer buf ) {
int ch;
if ((ch = in.read()) == -1) {
throw new RuntimeException("Illegal signature: " + in.getData()
@@ -196,7 +196,7 @@ public final class Signature extends Attribute {
}
- private static final void matchGJIdent( MyByteArrayInputStream in, StringBuffer buf ) {
+ private static void matchGJIdent( MyByteArrayInputStream in, StringBuffer buf ) {
int ch;
matchIdent(in, buf);
ch = in.read();
diff --git a/src/main/java/org/apache/bcel/classfile/Utility.java b/src/main/java/org/apache/bcel/classfile/Utility.java
index 79606fe2..44669dd0 100644
--- a/src/main/java/org/apache/bcel/classfile/Utility.java
+++ b/src/main/java/org/apache/bcel/classfile/Utility.java
@@ -724,7 +724,7 @@ public abstract class Utility {
// Guess what this does
- private static final int pow2( int n ) {
+ private static int pow2( int n ) {
return 1 << n;
}
@@ -1036,7 +1036,7 @@ public abstract class Utility {
* Convert (signed) byte to (unsigned) short value, i.e., all negative
* values become positive.
*/
- private static final short byteToShort( byte b ) {
+ private static short byteToShort( byte b ) {
return (b < 0) ? (short) (256 + b) : (short) b;
}
diff --git a/src/main/java/org/apache/bcel/generic/InstructionFactory.java b/src/main/java/org/apache/bcel/generic/InstructionFactory.java
index dc335ba5..0033c269 100644
--- a/src/main/java/org/apache/bcel/generic/InstructionFactory.java
+++ b/src/main/java/org/apache/bcel/generic/InstructionFactory.java
@@ -192,7 +192,7 @@ public class InstructionFactory implements InstructionConstants, java.io.Seriali
};
- private static final boolean isString( Type type ) {
+ private static boolean isString( Type type ) {
return ((type instanceof ObjectType) && ((ObjectType) type).getClassName().equals(
"java.lang.String"));
}
@@ -283,7 +283,7 @@ public class InstructionFactory implements InstructionConstants, java.io.Seriali
}
- private static final ArithmeticInstruction createBinaryIntOp( char first, String op ) {
+ private static ArithmeticInstruction createBinaryIntOp( char first, String op ) {
switch (first) {
case '-':
return ISUB;
@@ -313,7 +313,7 @@ public class InstructionFactory implements InstructionConstants, java.io.Seriali
}
- private static final ArithmeticInstruction createBinaryLongOp( char first, String op ) {
+ private static ArithmeticInstruction createBinaryLongOp( char first, String op ) {
switch (first) {
case '-':
return LSUB;
@@ -343,7 +343,7 @@ public class InstructionFactory implements InstructionConstants, java.io.Seriali
}
- private static final ArithmeticInstruction createBinaryFloatOp( char op ) {
+ private static ArithmeticInstruction createBinaryFloatOp( char op ) {
switch (op) {
case '-':
return FSUB;
@@ -361,7 +361,7 @@ public class InstructionFactory implements InstructionConstants, java.io.Seriali
}
- private static final ArithmeticInstruction createBinaryDoubleOp( char op ) {
+ private static ArithmeticInstruction createBinaryDoubleOp( char op ) {
switch (op) {
case '-':
return DSUB;
diff --git a/src/main/java/org/apache/bcel/util/ClassPath.java b/src/main/java/org/apache/bcel/util/ClassPath.java
index 8097eea2..a69fb7eb 100644
--- a/src/main/java/org/apache/bcel/util/ClassPath.java
+++ b/src/main/java/org/apache/bcel/util/ClassPath.java
@@ -136,7 +136,7 @@ public class ClassPath implements Serializable {
}
- private static final void getPathComponents( String path, List<String> list ) {
+ private static void getPathComponents( String path, List<String> list ) {
if (path != null) {
StringTokenizer tok = new StringTokenizer(path, File.pathSeparator);
while (tok.hasMoreTokens()) {
diff --git a/src/main/java/org/apache/bcel/util/InstructionFinder.java b/src/main/java/org/apache/bcel/util/InstructionFinder.java
index a34170dd..58edd02f 100644
--- a/src/main/java/org/apache/bcel/util/InstructionFinder.java
+++ b/src/main/java/org/apache/bcel/util/InstructionFinder.java
@@ -115,7 +115,7 @@ public class InstructionFinder {
* instruction pattern in lower case
* @return encoded string for a pattern such as "BranchInstruction".
*/
- private static final String mapName( String pattern ) {
+ private static String mapName( String pattern ) {
String result = map.get(pattern);
if (result != null) {
return result;
@@ -138,7 +138,7 @@ public class InstructionFinder {
* The pattern to compile
* @return translated regular expression string
*/
- private static final String compilePattern( String pattern ) {
+ private static String compilePattern( String pattern ) {
//Bug: 38787 - Instructions are assumed to be english, to avoid odd Locale issues
String lower = pattern.toLowerCase(Locale.ENGLISH);
StringBuilder buf = new StringBuilder();
@@ -286,7 +286,7 @@ public class InstructionFinder {
/**
* Convert opcode number to char.
*/
- private static final char makeChar( short opcode ) {
+ private static char makeChar( short opcode ) {
return (char) (opcode + OFFSET);
}
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 b8edab40..986e450b 100644
--- a/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
+++ b/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
@@ -1316,7 +1316,7 @@ public final class Pass2Verifier extends PassVerifier implements Constants{
* This method returns true if and only if the supplied String
* represents a valid Java class name.
*/
- private static final boolean validClassName(String name){
+ private static boolean validClassName(String name){
/*
* TODO: implement.
* Are there any restrictions?
diff --git a/src/site/xdoc/manual.xml b/src/site/xdoc/manual.xml
index ed76ff20..288b275f 100644
--- a/src/site/xdoc/manual.xml
+++ b/src/site/xdoc/manual.xml
@@ -1607,7 +1607,7 @@ public class Peephole {
} catch(Exception e) { e.printStackTrace(); }
}
- private static final Method removeNOPs(MethodGen mg) {
+ private static Method removeNOPs(MethodGen mg) {
InstructionList il = mg.getInstructionList();
InstructionFinder f = new InstructionFinder(il);
String pat = "NOP+"; // Find at least one NOP