aboutsummaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorEmmanuel Bourg <ebourg@apache.org>2014-04-23 12:22:36 +0000
committerEmmanuel Bourg <ebourg@apache.org>2014-04-23 12:22:36 +0000
commit9e46bf1003e2c37f004bc3436515fcf1c312fb16 (patch)
tree509320f34ae66be3ba79f95dd79f128ae2d448d6 /src/examples
parentcd745f71268f8e332d0a11dcaa3b43b7258e4a23 (diff)
downloadapache-commons-bcel-9e46bf1003e2c37f004bc3436515fcf1c312fb16.tar.gz
Removed more final modifiers from private methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/bcel/trunk@1589381 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/examples')
-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
7 files changed, 13 insertions, 13 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