com.markcrocker.purifier.testcases
Class CommonCases

java.lang.Object
  |
  +--javax.microedition.midlet.MIDlet
        |
        +--com.markcrocker.purifier.testcases.CommonCases
All Implemented Interfaces:
javax.microedition.lcdui.CommandListener, javax.microedition.lcdui.ItemStateListener

public class CommonCases
extends javax.microedition.midlet.MIDlet
implements javax.microedition.lcdui.CommandListener, javax.microedition.lcdui.ItemStateListener

The CommonCases class file is designed to provide a wide range of common Java structures that can be used to check the Purifier StackMapGen.generate. None of the cases in this class are intended to be any particular challenge to the Purifier, but are here just to make sure that all of the standard cases are covered.


Field Summary
(package private)  javax.microedition.lcdui.Display display
           
(package private)  javax.microedition.lcdui.TextBox Hello
           
private  long privateLongPrimative
           
private  java.lang.String privateObject
           
private  int privatePrimitive
           
private static java.lang.String privateStaticFinalObject
           
private static int privateStaticFinalPrimitive
           
private static java.lang.String privateStaticObject
           
private static int privateStaticPrimitive
           
 java.lang.String publicObject
           
 int publicPrimitive
           
 
Constructor Summary
CommonCases()
           
 
Method Summary
 void callsAPrivateMethod()
           
 void callsAPrivateMethodWithLotsOParams()
           
 void callsAPrivateStaticFinalMethod()
           
 void callsAPrivateStaticFinalMethodWithLotsOParams()
           
 void callsAPrivateStaticMethod()
           
 void callsAPrivateStaticMethodWithLotsOParams()
           
 void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
           
 void declaresA2DObjectArray()
           
 void declaresA2DPrimitiveArray()
           
 void declaresA3DObjectArray()
           
 void declaresA3DPrimitiveArray()
          Tests the multinewarry instruction.
 void declaresAnObjectArray()
           
 void declaresAPrimitiveArray(java.lang.Integer[] I)
           
 void destroyApp(boolean unconditional)
           
 void hasAnIf()
           
 void hasNestedIfs()
           
 void itemStateChanged(javax.microedition.lcdui.Item item)
           
 void nestedIfsNLotsOParams(int i, java.lang.String s, int j, java.lang.String t, int k, java.lang.String u, int l, java.lang.String v)
           
 void pauseApp()
           
private  void privateMethod()
           
private  void privateMethodNLotsOParams(int i, java.lang.String s, int j, java.lang.String t, int k, java.lang.String u, int l, java.lang.String v)
           
private static void privateStaticFinalMethod()
           
private static void privateStaticFinalMethodNLotsOParams(int i, java.lang.String s, int j, java.lang.String t, int k, java.lang.String u, int l, java.lang.String v)
           
private static void privateStaticMethod()
           
private static void privateStaticMethodNLotsOParams(int i, java.lang.String s, int j, java.lang.String t, int k, java.lang.String u, int l, java.lang.String v)
           
 void retrievesAPrimitiveArray(java.lang.Integer[] I)
           
 java.lang.String returnsAnObject()
           
 java.lang.String returnsAnObjectNHasLotsOParams(int i, java.lang.String s, int j, java.lang.String t, int k, java.lang.String u, int l, java.lang.String v)
           
 java.lang.String returnsANullNHasLotsOParams(int i, java.lang.String s, int j, java.lang.String t, int k, java.lang.String u, int l, java.lang.String v)
           
 java.lang.String returnsANullObject(java.lang.String s)
           
 int returnsAPrimitive()
           
 int[] returnsAPrimitiveArray()
           
 int returnsAPrimitiveNHasLotsOParams(int i, java.lang.String s, int j, java.lang.String t, int k, java.lang.String u, int l, java.lang.String v)
           
 void startApp()
           
 void takesAnObject(java.lang.String s)
           
 void takesAnObjectArray(java.lang.Integer[] I)
           
 void takesAPrimitive(int i)
           
 void takesAPrimitiveAndAnObject(int i, java.lang.String s)
           
 void takesAPrimitiveArray(int[] I)
           
 void takesPrimitivesAndObjects(int i, java.lang.String s, int j, java.lang.String t, int k, java.lang.String u, int l, java.lang.String v)
           
 void usesAPrivateObject()
           
 void usesAPrivatePrimitive()
           
 void usesAPrivateStaticFinalObject()
           
 void usesAPrivateStaticFinalPrimitive()
           
 void usesAPrivateStaticObject()
           
 void usesAPrivateStaticPrimitive()
           
 
Methods inherited from class javax.microedition.midlet.MIDlet
getAppProperty, notifyDestroyed, notifyPaused, resumeRequest
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

display

javax.microedition.lcdui.Display display

Hello

javax.microedition.lcdui.TextBox Hello

publicPrimitive

public int publicPrimitive

privatePrimitive

private int privatePrimitive

privateLongPrimative

private long privateLongPrimative

privateStaticPrimitive

private static int privateStaticPrimitive

privateStaticFinalPrimitive

private static final int privateStaticFinalPrimitive

publicObject

public java.lang.String publicObject

privateObject

private java.lang.String privateObject

privateStaticObject

private static java.lang.String privateStaticObject

privateStaticFinalObject

private static final java.lang.String privateStaticFinalObject
Constructor Detail

CommonCases

public CommonCases()
Method Detail

startApp

public void startApp()
              throws javax.microedition.midlet.MIDletStateChangeException
Overrides:
startApp in class javax.microedition.midlet.MIDlet

pauseApp

public void pauseApp()
Overrides:
pauseApp in class javax.microedition.midlet.MIDlet

destroyApp

public void destroyApp(boolean unconditional)
                throws javax.microedition.midlet.MIDletStateChangeException
Overrides:
destroyApp in class javax.microedition.midlet.MIDlet

itemStateChanged

public void itemStateChanged(javax.microedition.lcdui.Item item)
Specified by:
itemStateChanged in interface javax.microedition.lcdui.ItemStateListener

commandAction

public void commandAction(javax.microedition.lcdui.Command c,
                          javax.microedition.lcdui.Displayable d)
Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener

hasAnIf

public void hasAnIf()

usesAPrivatePrimitive

public void usesAPrivatePrimitive()

usesAPrivateObject

public void usesAPrivateObject()

usesAPrivateStaticPrimitive

public void usesAPrivateStaticPrimitive()

usesAPrivateStaticObject

public void usesAPrivateStaticObject()

usesAPrivateStaticFinalPrimitive

public void usesAPrivateStaticFinalPrimitive()

usesAPrivateStaticFinalObject

public void usesAPrivateStaticFinalObject()

hasNestedIfs

public void hasNestedIfs()

takesAPrimitive

public void takesAPrimitive(int i)

takesAnObject

public void takesAnObject(java.lang.String s)

takesAPrimitiveAndAnObject

public void takesAPrimitiveAndAnObject(int i,
                                       java.lang.String s)

takesAPrimitiveArray

public void takesAPrimitiveArray(int[] I)

takesAnObjectArray

public void takesAnObjectArray(java.lang.Integer[] I)

takesPrimitivesAndObjects

public void takesPrimitivesAndObjects(int i,
                                      java.lang.String s,
                                      int j,
                                      java.lang.String t,
                                      int k,
                                      java.lang.String u,
                                      int l,
                                      java.lang.String v)

nestedIfsNLotsOParams

public void nestedIfsNLotsOParams(int i,
                                  java.lang.String s,
                                  int j,
                                  java.lang.String t,
                                  int k,
                                  java.lang.String u,
                                  int l,
                                  java.lang.String v)

returnsAPrimitive

public int returnsAPrimitive()

returnsAPrimitiveNHasLotsOParams

public int returnsAPrimitiveNHasLotsOParams(int i,
                                            java.lang.String s,
                                            int j,
                                            java.lang.String t,
                                            int k,
                                            java.lang.String u,
                                            int l,
                                            java.lang.String v)

returnsAnObject

public java.lang.String returnsAnObject()

returnsAnObjectNHasLotsOParams

public java.lang.String returnsAnObjectNHasLotsOParams(int i,
                                                       java.lang.String s,
                                                       int j,
                                                       java.lang.String t,
                                                       int k,
                                                       java.lang.String u,
                                                       int l,
                                                       java.lang.String v)

returnsANullObject

public java.lang.String returnsANullObject(java.lang.String s)

returnsANullNHasLotsOParams

public java.lang.String returnsANullNHasLotsOParams(int i,
                                                    java.lang.String s,
                                                    int j,
                                                    java.lang.String t,
                                                    int k,
                                                    java.lang.String u,
                                                    int l,
                                                    java.lang.String v)

privateMethod

private void privateMethod()

privateStaticMethod

private static void privateStaticMethod()

privateStaticFinalMethod

private static final void privateStaticFinalMethod()

callsAPrivateMethod

public void callsAPrivateMethod()

callsAPrivateStaticMethod

public void callsAPrivateStaticMethod()

callsAPrivateStaticFinalMethod

public void callsAPrivateStaticFinalMethod()

privateMethodNLotsOParams

private void privateMethodNLotsOParams(int i,
                                       java.lang.String s,
                                       int j,
                                       java.lang.String t,
                                       int k,
                                       java.lang.String u,
                                       int l,
                                       java.lang.String v)

privateStaticMethodNLotsOParams

private static void privateStaticMethodNLotsOParams(int i,
                                                    java.lang.String s,
                                                    int j,
                                                    java.lang.String t,
                                                    int k,
                                                    java.lang.String u,
                                                    int l,
                                                    java.lang.String v)

privateStaticFinalMethodNLotsOParams

private static final void privateStaticFinalMethodNLotsOParams(int i,
                                                               java.lang.String s,
                                                               int j,
                                                               java.lang.String t,
                                                               int k,
                                                               java.lang.String u,
                                                               int l,
                                                               java.lang.String v)

callsAPrivateMethodWithLotsOParams

public void callsAPrivateMethodWithLotsOParams()

callsAPrivateStaticMethodWithLotsOParams

public void callsAPrivateStaticMethodWithLotsOParams()

callsAPrivateStaticFinalMethodWithLotsOParams

public void callsAPrivateStaticFinalMethodWithLotsOParams()

declaresAPrimitiveArray

public void declaresAPrimitiveArray(java.lang.Integer[] I)

returnsAPrimitiveArray

public int[] returnsAPrimitiveArray()

retrievesAPrimitiveArray

public void retrievesAPrimitiveArray(java.lang.Integer[] I)

declaresAnObjectArray

public void declaresAnObjectArray()

declaresA2DPrimitiveArray

public void declaresA2DPrimitiveArray()

declaresA2DObjectArray

public void declaresA2DObjectArray()

declaresA3DPrimitiveArray

public void declaresA3DPrimitiveArray()
Tests the multinewarry instruction.

declaresA3DObjectArray

public void declaresA3DObjectArray()