Author: sebb
Date: Mon Aug 10 10:26:46 2015
New Revision: 1695011
URL: http://svn.apache.org/r1695011
Log:
Use static reference to static methods
Modified:
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java
Modified:
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java
URL:
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java?rev=1695011&r1=1695010&r2=1695011&view=diff
==============================================================================
---
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java
(original)
+++
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java
Mon Aug 10 10:26:46 2015
@@ -54,9 +54,9 @@ public class TestArrayAccess02Creator ex
InstructionList il = new InstructionList();
MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new
String[] { }, "<init>",
"org.apache.commons.bcel6.verifier.tests.TestArrayAccess02", il, _cp);
- InstructionHandle ih_0 = il.append(_factory.createLoad(Type.OBJECT, 0));
+ InstructionHandle ih_0 =
il.append(InstructionFactory.createLoad(Type.OBJECT, 0));
il.append(_factory.createInvoke("java.lang.Object", "<init>", Type.VOID,
Type.NO_ARGS, Constants.INVOKESPECIAL));
- InstructionHandle ih_4 = il.append(_factory.createReturn(Type.VOID));
+ InstructionHandle ih_4 =
il.append(InstructionFactory.createReturn(Type.VOID));
method.setMaxStack();
method.setMaxLocals();
_cg.addMethod(method.getMethod());
@@ -69,17 +69,17 @@ public class TestArrayAccess02Creator ex
InstructionHandle ih_0 = il.append(new PUSH(_cp, 1));
il.append(_factory.createNewArray(new
ObjectType("org.apache.commons.bcel6.verifier.tests.TestArrayAccess02"),
(short) 1));
- il.append(_factory.createStore(Type.OBJECT, 0));
+ il.append(InstructionFactory.createStore(Type.OBJECT, 0));
InstructionHandle ih_5 = il.append(new PUSH(_cp, 1));
il.append(_factory.createNewArray(Type.STRING, (short) 1));
- il.append(_factory.createStore(Type.OBJECT, 1));
- InstructionHandle ih_10 = il.append(_factory.createLoad(Type.OBJECT, 1));
+ il.append(InstructionFactory.createStore(Type.OBJECT, 1));
+ InstructionHandle ih_10 =
il.append(InstructionFactory.createLoad(Type.OBJECT, 1));
il.append(new PUSH(_cp, 0));
il.append(_factory.createNew("org.apache.commons.bcel6.verifier.tests.TestArrayAccess02"));
il.append(InstructionConstants.DUP);
il.append(_factory.createInvoke("org.apache.commons.bcel6.verifier.tests.TestArrayAccess02",
"<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
il.append(InstructionConstants.AASTORE);
- InstructionHandle ih_20 = il.append(_factory.createReturn(Type.VOID));
+ InstructionHandle ih_20 =
il.append(InstructionFactory.createReturn(Type.VOID));
method.setMaxStack();
method.setMaxLocals();
_cg.addMethod(method.getMethod());
Modified:
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java
URL:
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java?rev=1695011&r1=1695010&r2=1695011&view=diff
==============================================================================
---
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java
(original)
+++
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java
Mon Aug 10 10:26:46 2015
@@ -54,9 +54,9 @@ public class TestArrayAccess03Creator ex
InstructionList il = new InstructionList();
MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new
String[] { }, "<init>",
"org.apache.commons.bcel6.verifier.tests.TestArrayAccess03", il, _cp);
- InstructionHandle ih_0 = il.append(_factory.createLoad(Type.OBJECT, 0));
+ InstructionHandle ih_0 =
il.append(InstructionFactory.createLoad(Type.OBJECT, 0));
il.append(_factory.createInvoke("java.lang.Object", "<init>", Type.VOID,
Type.NO_ARGS, Constants.INVOKESPECIAL));
- InstructionHandle ih_4 = il.append(_factory.createReturn(Type.VOID));
+ InstructionHandle ih_4 =
il.append(InstructionFactory.createReturn(Type.VOID));
method.setMaxStack();
method.setMaxLocals();
_cg.addMethod(method.getMethod());
@@ -69,14 +69,14 @@ public class TestArrayAccess03Creator ex
InstructionHandle ih_0 = il.append(new PUSH(_cp, 1));
il.append(_factory.createNewArray(new
ObjectType("org.apache.commons.bcel6.verifier.tests.TestArrayAccess03"),
(short) 1));
- il.append(_factory.createStore(Type.OBJECT, 1));
- InstructionHandle ih_5 = il.append(_factory.createLoad(Type.OBJECT, 0));
+ il.append(InstructionFactory.createStore(Type.OBJECT, 1));
+ InstructionHandle ih_5 =
il.append(InstructionFactory.createLoad(Type.OBJECT, 0));
il.append(new PUSH(_cp, 0));
il.append(_factory.createNew("org.apache.commons.bcel6.verifier.tests.TestArrayAccess03"));
il.append(InstructionConstants.DUP);
il.append(_factory.createInvoke("org.apache.commons.bcel6.verifier.tests.TestArrayAccess03",
"<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
il.append(InstructionConstants.AASTORE);
- InstructionHandle ih_15 = il.append(_factory.createReturn(Type.VOID));
+ InstructionHandle ih_15 =
il.append(InstructionFactory.createReturn(Type.VOID));
method.setMaxStack();
method.setMaxLocals();
_cg.addMethod(method.getMethod());
Modified:
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java
URL:
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java?rev=1695011&r1=1695010&r2=1695011&view=diff
==============================================================================
---
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java
(original)
+++
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java
Mon Aug 10 10:26:46 2015
@@ -52,9 +52,9 @@ public class TestArrayAccess04Creator ex
InstructionList il = new InstructionList();
MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new
String[] { }, "<init>",
"org.apache.commons.bcel6.verifier.tests.TestArrayAccess04", il, _cp);
- InstructionHandle ih_0 = il.append(_factory.createLoad(Type.OBJECT, 0));
+ InstructionHandle ih_0 =
il.append(InstructionFactory.createLoad(Type.OBJECT, 0));
il.append(_factory.createInvoke("java.lang.Object", "<init>", Type.VOID,
Type.NO_ARGS, Constants.INVOKESPECIAL));
- InstructionHandle ih_4 = il.append(_factory.createReturn(Type.VOID));
+ InstructionHandle ih_4 =
il.append(InstructionFactory.createReturn(Type.VOID));
method.setMaxStack();
method.setMaxLocals();
_cg.addMethod(method.getMethod());
@@ -67,14 +67,14 @@ public class TestArrayAccess04Creator ex
InstructionHandle ih_0 = il.append(new PUSH(_cp, 1));
il.append(_factory.createNewArray(Type.OBJECT, (short) 1));
- il.append(_factory.createStore(Type.OBJECT, 1));
+ il.append(InstructionFactory.createStore(Type.OBJECT, 1));
InstructionHandle ih_5 = il.append(new PUSH(_cp, 1));
- il.append(_factory.createStore(Type.INT, 2));
- InstructionHandle ih_7 = il.append(_factory.createLoad(Type.OBJECT, 1));
+ il.append(InstructionFactory.createStore(Type.INT, 2));
+ InstructionHandle ih_7 =
il.append(InstructionFactory.createLoad(Type.OBJECT, 1));
il.append(new PUSH(_cp, 0));
- il.append(_factory.createLoad(Type.INT, 2));
+ il.append(InstructionFactory.createLoad(Type.INT, 2));
il.append(InstructionConstants.AASTORE);
- InstructionHandle ih_11 = il.append(_factory.createReturn(Type.VOID));
+ InstructionHandle ih_11 =
il.append(InstructionFactory.createReturn(Type.VOID));
method.setMaxStack();
method.setMaxLocals();
_cg.addMethod(method.getMethod());
Modified:
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java
URL:
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java?rev=1695011&r1=1695010&r2=1695011&view=diff
==============================================================================
---
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java
(original)
+++
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java
Mon Aug 10 10:26:46 2015
@@ -52,9 +52,9 @@ public class TestReturn01Creator extends
InstructionList il = new InstructionList();
MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new
String[] { }, "<init>",
"org.apache.commons.bcel6.verifier.tests.TestReturn01", il, _cp);
- InstructionHandle ih_0 = il.append(_factory.createLoad(Type.OBJECT, 0));
+ InstructionHandle ih_0 =
il.append(InstructionFactory.createLoad(Type.OBJECT, 0));
il.append(_factory.createInvoke("java.lang.Object", "<init>", Type.VOID,
Type.NO_ARGS, Constants.INVOKESPECIAL));
- InstructionHandle ih_4 = il.append(_factory.createReturn(Type.VOID));
+ InstructionHandle ih_4 =
il.append(InstructionFactory.createReturn(Type.VOID));
method.setMaxStack();
method.setMaxLocals();
_cg.addMethod(method.getMethod());
@@ -69,7 +69,7 @@ public class TestReturn01Creator extends
il.append(InstructionConstants.DUP);
il.append(_factory.createInvoke("java.lang.Object", "<init>", Type.VOID,
Type.NO_ARGS, Constants.INVOKESPECIAL));
il.append(InstructionConstants.NOP);
- InstructionHandle ih_8 = il.append(_factory.createReturn(Type.OBJECT));
+ InstructionHandle ih_8 =
il.append(InstructionFactory.createReturn(Type.OBJECT));
method.setMaxStack();
method.setMaxLocals();
_cg.addMethod(method.getMethod());
Modified:
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java
URL:
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java?rev=1695011&r1=1695010&r2=1695011&view=diff
==============================================================================
---
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java
(original)
+++
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java
Mon Aug 10 10:26:46 2015
@@ -52,9 +52,9 @@ public class TestReturn03Creator extends
InstructionList il = new InstructionList();
MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new
String[] { }, "<init>",
"org.apache.commons.bcel6.verifier.tests.TestReturn03", il, _cp);
- InstructionHandle ih_0 = il.append(_factory.createLoad(Type.OBJECT, 0));
+ InstructionHandle ih_0 =
il.append(InstructionFactory.createLoad(Type.OBJECT, 0));
il.append(_factory.createInvoke("java.lang.Object", "<init>", Type.VOID,
Type.NO_ARGS, Constants.INVOKESPECIAL));
- InstructionHandle ih_4 = il.append(_factory.createReturn(Type.VOID));
+ InstructionHandle ih_4 =
il.append(InstructionFactory.createReturn(Type.VOID));
method.setMaxStack();
method.setMaxLocals();
_cg.addMethod(method.getMethod());
@@ -66,7 +66,7 @@ public class TestReturn03Creator extends
MethodGen method = new MethodGen(ACC_PUBLIC | ACC_STATIC, Type.INT,
Type.NO_ARGS, new String[] { }, "test3",
"org.apache.commons.bcel6.verifier.tests.TestReturn03", il, _cp);
InstructionHandle ih_0 = il.append(InstructionConstants.ACONST_NULL);
- il.append(_factory.createReturn(Type.OBJECT));
+ il.append(InstructionFactory.createReturn(Type.OBJECT));
method.setMaxStack();
method.setMaxLocals();
_cg.addMethod(method.getMethod());