get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("<init>",
"(III)V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("<init>",
"(IIIII)V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("<init>",
"(IIIIII)V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("<init>",
"(J)V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("<init>",
"(Ljava/lang/String;)V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getDate").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getDay").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getField").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getHours").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getMinutes").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getMonth").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getSeconds").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getTime").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getTimezoneOffset").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getYear").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("hashCode").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("makeStaticCalendars").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("parse").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("readObject").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setDate").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setField").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setHours").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setMinutes").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setMonth").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setSeconds").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setTime").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setYear").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("toGMTString").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("toLocaleString").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("toString").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("writeObject").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("finalize").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getClass").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("notify").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("notifyAll").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("registerNatives").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("wait","()V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("wait","(J)V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("wait","(JI)V").get(0));
f_hidden_list.add("run");
f_hidden_list.add("print");
f_hidden_list.add("compareTo");
// f_list_visible_methods_expected is a subset of
f_list_all_methods_expected
f_list_all_methods_expected.addAll(f_list_visible_methods_expected);
// This list contains the names of the interfaces rather
// than the objects themselves.
f_list_interfaces_expected.add("java.lang.Runnable");
f_list_interfaces_expected.add("jdi.func.program.Printable");
// This list contains the names of the interfaces rather than the
objects
// This list includes the 'declared interfaces'. Hence the next
statement
f_list_all_interfaces_expected.addAll(f_list_interfaces_expected);
f_list_all_interfaces_expected.add("java.io.Serializable");
f_list_all_interfaces_expected.add("java.lang.Cloneable");
f_list_all_interfaces_expected.add("java.lang.Comparable");
}
public void TearDown()
{
}
public static void main(String args[])
{
new ClassDetailsTest().runSuite(args);
}
public ClassPrepareRequest create_class_prepare_request()
{
return fVM.eventRequestManager().createClassPrepareRequest();
}
}
Debugged Class :
package jdi.func.program;
/**
* Main class for target VM tests.
* This class is intended to be run by the target VM.
* It will use other classes in this package, and it will create and
terminate
* threads as a regular program would do.
*
* WARNING, WARNING:
* Tests in jdi.func assume the content of this class,
* as well as its behavior. So if this class or one of the types in this
* package is changed, the corresponding tests must also be changed.
(ClassDetailsTest.java)
*/
import java.util.*;
import java.io.*;
public class MainClass extends Date implements Runnable, Printable {
public static int fInt = 0;
public static float fFloat = 0.2f;
public static int fIntTemp = 0;
public static char fCharTemp = 'c';
public static boolean fBoolTemp = true;
public static double fDoubleTemp = 2.0;
public static byte fByte = 3;
public static short fShort = 4;
public static long fLong = 100000L;
public static MainClass fObject = new MainClass();
public static String fString = "Hello World";
public static Thread fThread;
public static String[] fArray = new String[] {"foo", "bar", "hop"};
public static double[] fDoubleArray =
new double[] {1, 2.2, 3.33};
public static char fEventType= ' ';
public static boolean fIsProgramReady = false;
public boolean fBool = false;
private char fChar = 'a';
public static void main(java.lang.String[] args) {
// Start the test program
ThreadGroup group = new ThreadGroup("Test ThreadGroup");
fThread = new Thread(group, fObject, "Test Thread");
fThread.start();
// Prevent this thread from dying
while (true)
try {
Thread.currentThread().sleep(1000);
} catch (InterruptedException e) {
}
}
public void print(OutputStream out) {
String string = fInt++ + ". " + fString;
System.out.println(string);
}
synchronized public void printAndSignal() {
print(System.out);
// Signal readiness by throwing an exception
try {
throw new NegativeArraySizeException();
} catch (NegativeArraySizeException exc) {
}
}
public void run() {
try {
// For simulation
simul(new String[] {"loadClass", "java.lang.Object"});
simul(new String[] {"loadClass", "java.util.Observable"});
simul(new String[] {"loadClass", "jdi.func.program.Printable"});
simul(new String[] {"loadClass", "jdi.func.program.MainClass"});
simul(new String[] {"loadClass", "jdi.func.program.MainClass[]"});
// Set a variable
Thread t= Thread.currentThread();
while (true) {
printAndSignal();
triggerEvent();
useThread(t);
}
} finally {
simul(new String[] {"threadDeath", "" + fThread.hashCode()});
}
}
private void simul(String[] action) {
//setChanged();
//notifyObservers(action);
}
/**
* Trigger an access watchpoint event for the front-end.
*/
private void triggerAccessWatchpointEvent() {
if (fObject == null)
System.out.println("fObject is null");
}
/**
* Trigger a breakpoint event for the front-end.
*/
private void triggerBreakpointEvent() {
System.out.println("Breakpoint");
}
/**
* Trigger a breakpoint event for the front-end.
*/
private void triggerBreakpointEvent2() {
System.out.println("Breakpoint");
}
/**
* Trigger a class prepare event for the front-end.
*/
private void triggerClassPrepareEvent() {
new TestClass();
}
/**
* Trigger a class Unload event for the front-end.
*/
private void triggerClassUnloadEvent() {
//<urltest2> is a class which is loaded using user defined class
loader.
//class unloading logic goes inside this class
//
System.out.println("inside trigger unload method");
urltest2 loadclass = new urltest2();
loadclass.done();
}
/**
* Trigger an event for the front-end.
*/
private void triggerEvent() {
/* Ensure we do it only once */
char eventType = fEventType;
int l_dummy_array[] = {1,2,3,4,5};
fEventType = ' ';
/* Trigger event according to the field fEventType */
switch (eventType) {
case 'a':
triggerAccessWatchpointEvent();
break;
case 'b':
triggerBreakpointEvent();
break;
case 'p':
triggerClassPrepareEvent();
break;
case 'e':
triggerExceptionEvent();
break;
case 'm':
triggerModificationWatchpointEventString();
break;
case 'f':
triggerModificationWatchpointEventFloat();
break;
case 'g':
triggerModificationWatchpointEventBool();
break;
case 'S':
triggerModificationWatchpointEventShort();
break;
case 'I':
triggerModificationWatchpointEventInt();
break;
case 'C':
triggerModificationWatchpointEventChar();
break;
case 'l':
triggerModificationWatchpointEventString();
break;
case 'D':
triggerModificationWatchpointEventDouble();
break;
case 's':
triggerThreadStartEvent();
break;
case 'n':
triggerThreadEndEvent();
break;
case 'E':
triggerMethodEntryEvent();
break;
case 'X':
triggerMethodExitEvent();
break;
case 'B':
triggerBreakpointEvent2();
break;
case 'u':
triggerClassUnloadEvent();
break;
case 'F':
triggerFrameMoveEvent();
break;
}
}
/**
* Trigger a Frame movement event
*/
public void triggerFrameMoveEvent()
{
System.out.println("First method called ..");
test_method_call1();
}
public void test_method_call1()
{
System.out.println("Second Method Called ..");
test_method_call2();
}
public void test_method_call2()
{
System.out.println("Third Method Called ..");
test_method_call3();
}
public void test_method_call3()
{
System.out.println("Third Method Called ..");
}
/**
* Trigger a method entry event .
*/
public void triggerMethodEntryEvent()
{
System.out.println("fire method entry event for this method");
}
/**
* Trigger a method exit event .
*/
public void triggerMethodExitEvent()
{
System.out.println("fire method exit event for this method");
}
/**
* Trigger an exception event for the front-end.
*/
private void triggerExceptionEvent() {
Thread t = new Thread(new Runnable() {
public void run() {
throw new Error();
}
}
, "Test Exception Event");
t.start();
}
/**
* Trigger a modification watchpoint event for the front-end.
*/
private void triggerModificationWatchpointEventString() {
fString = "Hello Universe";
};
private void triggerModificationWatchpointEventFloat() {
fFloat = 3f;
};
private void triggerModificationWatchpointEventByte() {
fByte = 4;
};
private void triggerModificationWatchpointEventShort() {
fShort = 5;
};
private void triggerModificationWatchpointEventLong() {
fLong = 200000L;
};
private void triggerModificationWatchpointEventInt() {
fIntTemp = 1;
};
private void triggerModificationWatchpointEventChar() {
fCharTemp = 'd';
};
private void triggerModificationWatchpointEventBool() {
fBoolTemp = false;
};
private void triggerModificationWatchpointEventDouble() {
fDoubleTemp = 3.0;
};
/**
* Trigger thread start and end events - wait for them to finish.
*/
private void triggerThreadEvents(String name) {
Thread t = new Thread(name);
t.start();
try {
t.join();
} catch (InterruptedException exc) {
}
}
/**
* Trigger a thread end event for the front-end.
*/
private void triggerThreadEndEvent() {
triggerThreadEvents("Test Thread End Event");
}
/**
* Trigger a thread start event for the front-end.
*/
private void triggerThreadStartEvent() {
triggerThreadEvents("Test Thread Start Event");
}
private void useThread(Thread t) {
if (t == null)
System.out.println("t is null");
}
/* For invocation tests */
private static String invoke1(int x) {
return (new Integer(x)).toString();
}
/* For invocation tests */
private static void invoke2() {
throw new IndexOutOfBoundsException();
}
/* For invocation tests */
private int invoke3(String str) {
return Integer.parseInt(str);
}
/* For invocation tests */
private long invoke4() throws java.io.EOFException {
throw new java.io.EOFException();
}
}
======================================================================
Name: rrC79099 Date: 07/16/99
All fields test in functionality test fails for 1.2.1VM in
jpda 1.0 fcs.
Test testJDIAllfields() in ClassDetailsTest in functionality testsuite
fails.
Tester class :
Tester Method : testJDIAllfields()
// ClassDetailsTest.java
package jdi.func;
import test.framework.*;
import com.sun.jdi.*;
import com.sun.jdi.event.*;
import com.sun.jdi.connect.*;
import com.sun.jdi.request.*;
import java.io.*;
import java.util.*;
import java.lang.reflect.*;
public class ClassDetailsTest extends AbstractJDITest
{
ReferenceType f_class;
ClassPrepareRequest f_cpr;
ClassPrepareEvent f_cpe;
LinkedList f_list_fields_expected;
LinkedList f_list_all_fields_expected;
LinkedList f_list_visible_fields_expected;
LinkedList f_list_methods_expected;
LinkedList f_list_all_methods_expected;
LinkedList f_list_visible_methods_expected;
LinkedList f_list_interfaces_expected;
LinkedList f_list_all_interfaces_expected;
LinkedList f_hidden_list;
public ClassDetailsTest()
{
super("ClassDetailsTest");
}
public int compareLists(LinkedList a_expected_list, List a_actual_list)
{
int l_counter_actual;
int l_counter_expected;
int l_size_counter;
int l_temp_flag;
System.out.println("Actual Size : "+a_actual_list.size());
System.out.println("Expected Size : "+a_expected_list.size());
// System.out.println("Actual List ");
// for(int i = 0; i < a_actual_list.size(); i++)
// {
// System.out.println
// (((TypeComponent)(a_actual_list.get(i))).name());
// }
// System.out.println("Expected List ");
// for(int i = 0; i < a_expected_list.size(); i++)
// {
// System.out.println(a_expected_list.get(i));
// }
l_size_counter = a_expected_list.size();
for (l_counter_actual = 0; l_counter_actual < a_actual_list.size();
l_counter_actual ++)
{
l_temp_flag = 0;
for (l_counter_expected = 0; l_counter_expected <
a_expected_list.size();
l_counter_expected ++)
{
if (a_expected_list.get(l_counter_expected).
equals( a_actual_list.get(l_counter_actual)))
{
l_size_counter --;
System.out.println("Matched : " +
a_actual_list.get
(l_counter_actual));
l_temp_flag = 1;
continue;
}
}
if (l_temp_flag == 1)
{
l_temp_flag = 0;
continue;
}
else
{
if (is_hidden_method
(a_actual_list, l_counter_actual) == true)
{
System.out.println("Matched : " +
a_actual_list.get
(l_counter_actual));
l_temp_flag = 0;
continue;
}
System.out.println("UnMatched : "
+ a_actual_list.get(l_counter_actual));
}
}
return l_size_counter;
}
public boolean is_hidden_method(List a_actual_list, int a_index)
{
int l_counter;
for(l_counter = 0; l_counter < f_hidden_list.size();
l_counter ++)
{
if(((TypeComponent)
(a_actual_list.get(a_index))).name().
equals(f_hidden_list.get(l_counter)))
{
return true;
}
}
return false;
}
public int compareNameLists(LinkedList a_expected_list, List
a_actual_list)
{
int l_counter_actual;
int l_counter_expected;
int l_size_counter;
System.out.println("ActualNameList Size : "+a_actual_list.size());
System.out.println("ExpectedNameList Size : "+a_expected_list.size());
// System.out.println("Actual List ");
// for(int i = 0; i < a_actual_list.size(); i++)
// {
// System.out.println(a_actual_list.get(i));
// }
//
// System.out.println("Expected List ");
// for(int i = 0; i < a_expected_list.size(); i++)
// {
// System.out.println(a_expected_list.get(i));
// }
l_size_counter = a_expected_list.size();
for (l_counter_actual = 0; l_counter_actual < a_actual_list.size();
l_counter_actual ++)
{
for (l_counter_expected = 0; l_counter_expected <
a_expected_list.size();
l_counter_expected ++)
{
if (a_expected_list.get
(l_counter_expected).equals
(((InterfaceType)(a_actual_list.get(l_counter_actual))).name()) ==
true)
{
l_size_counter --;
System.out.println("Matched : " +
a_actual_list.get(l_counter_actual));
continue;
}
}
}
return l_size_counter;
}
public void testJDIFieldsInClass()
{
List l_actual_list;
ClassType l_classtype;
int l_counter_actual;
int l_counter_expected;
int l_size_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.fields();
assert(l_actual_list.size() == f_list_fields_expected.size());
assert(compareLists(f_list_fields_expected, l_actual_list) == 0);
}
public void testJDIMethodsInClass()
{
List l_actual_list;
ClassType l_classtype;
int l_counter_actual;
int l_counter_expected;
int l_size_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.methods();
assert(l_actual_list.size() == f_list_methods_expected.size());
assert(compareLists
(f_list_methods_expected, l_actual_list) == 0);
}
public void testJDIInterfacesInClass()
{
ClassType l_classtype;
List l_actual_list;
int l_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.interfaces();
assert(l_actual_list.size() == f_list_interfaces_expected.size());
assert(compareNameLists(f_list_interfaces_expected, l_actual_list) ==
0);
}
public void testJDIAllInterfaces()
{
ClassType l_classtype;
List l_actual_list;
int l_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.allInterfaces();
assert(l_actual_list.size() == f_list_all_interfaces_expected.size());
assert(compareNameLists(f_list_all_interfaces_expected, l_actual_list)
== 0);
}
public void testJDIAllFields()
{
ClassType l_classtype;
List l_actual_list;
int l_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.allFields();
assert(l_actual_list.size() == f_list_all_fields_expected.size());
assert(compareLists(f_list_all_fields_expected, l_actual_list) == 0);
}
public void testJDIAllMethods()
{
ClassType l_classtype;
List l_actual_list;
int l_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.allMethods();
// System.out.println("expected (223) : " +
f_list_all_methods_expected.size()
// + f_hidden_list.size());
// System.out.println("actual (223) : " + l_actual_list.size());
//
// for(int i = 0; i < l_actual_list.size(); i++)
// {
// System.out.println(l_actual_list.get(i));
// }
assert(l_actual_list.size() ==
(f_list_all_methods_expected.size() +
f_hidden_list.size()));
assert(compareLists
(f_list_all_methods_expected, l_actual_list) == 0);
}
public void testJDIVisibleFields()
{
ClassType l_classtype;
List l_actual_list;
int l_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.visibleFields();
assert(l_actual_list.size() == f_list_visible_fields_expected.size());
assert(compareLists(f_list_visible_fields_expected, l_actual_list) ==
0);
}
public void testJDIVisibleMethods()
{
ClassType l_classtype;
List l_actual_list;
int l_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.visibleMethods();
// System.out.println("expected (224) : " +
f_list_visible_methods_expected.size());
// System.out.println("actual (224) : " + l_actual_list.size());
// for(int i = 0; i < l_actual_list.size(); i++)
// {
// System.out.println(l_actual_list.get(i));
// }
assert(l_actual_list.size() ==
f_list_visible_methods_expected.size());
assert(compareLists(f_list_visible_methods_expected, l_actual_list) ==
0);
}
public void localSetUp()
{
ClassType l_classtype;
l_classtype = getMainClass();
f_list_fields_expected = new LinkedList();
f_list_methods_expected = new LinkedList();
f_list_interfaces_expected = new LinkedList();
f_list_all_interfaces_expected = new LinkedList();
f_list_all_methods_expected = new LinkedList();
f_list_all_fields_expected = new LinkedList();
f_list_visible_fields_expected = new LinkedList();
f_list_visible_methods_expected = new LinkedList();
f_hidden_list = new LinkedList();
f_list_fields_expected.add(l_classtype.fieldByName("fInt"));
f_list_fields_expected.add(l_classtype.fieldByName("fObject"));
f_list_fields_expected.add(l_classtype.fieldByName("fString"));
f_list_fields_expected.add(l_classtype.fieldByName("fThread"));
f_list_fields_expected.add(l_classtype.fieldByName("fArray"));
f_list_fields_expected.add(l_classtype.fieldByName("fDoubleArray"));
f_list_fields_expected.add(l_classtype.fieldByName("fEventType"));
f_list_fields_expected.add(l_classtype.fieldByName("fIsProgramReady"));
f_list_fields_expected.add(l_classtype.fieldByName("fBool"));
f_list_fields_expected.add(l_classtype.fieldByName("fChar"));
f_list_fields_expected.add(l_classtype.fieldByName("fIntTemp"));
f_list_fields_expected.add(l_classtype.fieldByName("fCharTemp"));
f_list_fields_expected.add(l_classtype.fieldByName("fBoolTemp"));
f_list_fields_expected.add(l_classtype.fieldByName("fDoubleTemp"));
f_list_fields_expected.add(l_classtype.fieldByName("fByte"));
f_list_fields_expected.add(l_classtype.fieldByName("fShort"));
f_list_fields_expected.add(l_classtype.fieldByName("fLong"));
f_list_fields_expected.add(l_classtype.fieldByName("fFloat"));
//f_list_fields_expected.add(l_classtype.fieldByName(""));
//f_list_fields_expected.add(l_classtype.fieldByName(""));
//f_list_fields_expected.add(l_classtype.fieldByName(""));
//f_list_fields_expected.add(l_classtype.fieldByName(""));
//f_list_fields_expected.add(l_classtype.fieldByName(""));
//f_list_fields_expected.add(l_classtype.fieldByName(""));
f_hidden_list.add("hashCode"); // Hidden
f_hidden_list.add("clone"); // Hidden
f_hidden_list.add("equals"); // Hidden
f_hidden_list.add("toString"); // Hidden
f_hidden_list.add("<clinit>"); // Hidden
f_hidden_list.add("<clinit>"); // Hidden
f_hidden_list.add("<init>"); // Hidden
f_hidden_list.add("<init>"); // Hidden
//f_list_all_fields is a superset of f_list_fields_expected
f_list_all_fields_expected.addAll(f_list_fields_expected);
f_list_all_fields_expected.add(l_classtype.fieldByName("cal"));
f_list_all_fields_expected.add(l_classtype.fieldByName("fastTime"));
f_list_all_fields_expected.add(l_classtype.fieldByName("staticCal"));
f_list_all_fields_expected.add(l_classtype.fieldByName("utcCal"));
f_list_all_fields_expected.add(l_classtype.fieldByName("defaultCenturyStart"));
f_list_all_fields_expected.add(l_classtype.fieldByName("serialVersionUID"));
f_list_all_fields_expected.add(l_classtype.fieldByName("simpleFormatter"));
f_list_all_fields_expected.add(l_classtype.fieldByName("gmtFormatter"));
f_list_all_fields_expected.add(l_classtype.fieldByName("wtb"));
f_list_all_fields_expected.add(l_classtype.fieldByName("ttb"));
// In this case, visible fields and 'all fields' represent
// the same sets (Try hiding)
f_list_visible_fields_expected.addAll(f_list_all_fields_expected);
f_list_methods_expected.add(l_classtype.methodsByName("main").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("print").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("printAndSignal").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("run").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("simul").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerAccessWatchpointEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerBreakpointEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerBreakpointEvent2").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerClassPrepareEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerExceptionEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventInt").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventFloat").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventDouble").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventLong").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventBool").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventString").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventChar").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventShort").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventByte").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerThreadEvents").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerThreadEndEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerThreadStartEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("useThread").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("invoke1").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("invoke2").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("invoke3").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("invoke4").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerClassUnloadEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerFrameMoveEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("test_method_call1").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("test_method_call2").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("test_method_call3").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerMethodEntryEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerMethodExitEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("<init>").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("<clinit>").get(0));
f_list_visible_methods_expected.addAll(f_list_methods_expected);
f_list_visible_methods_expected.add(l_classtype.methodsByName("UTC").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("after").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("before").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("clone").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("compareTo","(Ljava/lang/Object;)I").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("compareTo","(Ljava/util/Date;)I").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("equals").
f_list_visible_methods_expected.add(l_classtype.methodsByName("<init>",
"(III)V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("<init>",
"(IIIII)V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("<init>",
"(IIIIII)V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("<init>",
"(J)V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("<init>",
"(Ljava/lang/String;)V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getDate").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getDay").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getField").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getHours").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getMinutes").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getMonth").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getSeconds").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getTime").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getTimezoneOffset").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getYear").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("hashCode").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("makeStaticCalendars").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("parse").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("readObject").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setDate").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setField").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setHours").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setMinutes").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setMonth").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setSeconds").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setTime").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("setYear").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("toGMTString").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("toLocaleString").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("toString").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("writeObject").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("finalize").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("getClass").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("notify").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("notifyAll").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("registerNatives").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("wait","()V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("wait","(J)V").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("wait","(JI)V").get(0));
f_hidden_list.add("run");
f_hidden_list.add("print");
f_hidden_list.add("compareTo");
// f_list_visible_methods_expected is a subset of
f_list_all_methods_expected
f_list_all_methods_expected.addAll(f_list_visible_methods_expected);
// This list contains the names of the interfaces rather
// than the objects themselves.
f_list_interfaces_expected.add("java.lang.Runnable");
f_list_interfaces_expected.add("jdi.func.program.Printable");
// This list contains the names of the interfaces rather than the
objects
// This list includes the 'declared interfaces'. Hence the next
statement
f_list_all_interfaces_expected.addAll(f_list_interfaces_expected);
f_list_all_interfaces_expected.add("java.io.Serializable");
f_list_all_interfaces_expected.add("java.lang.Cloneable");
f_list_all_interfaces_expected.add("java.lang.Comparable");
}
public void TearDown()
{
}
public static void main(String args[])
{
new ClassDetailsTest().runSuite(args);
}
public ClassPrepareRequest create_class_prepare_request()
{
return fVM.eventRequestManager().createClassPrepareRequest();
}
}
Debugged Class :
package jdi.func.program;
/**
* Main class for target VM tests.
* This class is intended to be run by the target VM.
* It will use other classes in this package, and it will create and
terminate
* threads as a regular program would do.
*
* WARNING, WARNING:
* Tests in jdi.func assume the content of this class,
* as well as its behavior. So if this class or one of the types in this
* package is changed, the corresponding tests must also be changed.
(ClassDetailsTest.java)
*/
import java.util.*;
import java.io.*;
public class MainClass extends Date implements Runnable, Printable {
public static int fInt = 0;
public static float fFloat = 0.2f;
public static int fIntTemp = 0;
public static char fCharTemp = 'c';
public static boolean fBoolTemp = true;
public static double fDoubleTemp = 2.0;
public static byte fByte = 3;
public static short fShort = 4;
public static long fLong = 100000L;
public static MainClass fObject = new MainClass();
public static String fString = "Hello World";
public static Thread fThread;
public static String[] fArray = new String[] {"foo", "bar", "hop"};
public static double[] fDoubleArray =
new double[] {1, 2.2, 3.33};
public static char fEventType= ' ';
public static boolean fIsProgramReady = false;
public boolean fBool = false;
private char fChar = 'a';
public static void main(java.lang.String[] args) {
// Start the test program
ThreadGroup group = new ThreadGroup("Test ThreadGroup");
fThread = new Thread(group, fObject, "Test Thread");
fThread.start();
// Prevent this thread from dying
while (true)
try {
Thread.currentThread().sleep(1000);
} catch (InterruptedException e) {
}
}
public void print(OutputStream out) {
String string = fInt++ + ". " + fString;
System.out.println(string);
}
synchronized public void printAndSignal() {
print(System.out);
// Signal readiness by throwing an exception
try {
throw new NegativeArraySizeException();
} catch (NegativeArraySizeException exc) {
}
}
public void run() {
try {
// For simulation
simul(new String[] {"loadClass", "java.lang.Object"});
simul(new String[] {"loadClass", "java.util.Observable"});
simul(new String[] {"loadClass", "jdi.func.program.Printable"});
simul(new String[] {"loadClass", "jdi.func.program.MainClass"});
simul(new String[] {"loadClass", "jdi.func.program.MainClass[]"});
// Set a variable
Thread t= Thread.currentThread();
while (true) {
printAndSignal();
triggerEvent();
useThread(t);
}
} finally {
simul(new String[] {"threadDeath", "" + fThread.hashCode()});
}
}
private void simul(String[] action) {
//setChanged();
//notifyObservers(action);
}
/**
* Trigger an access watchpoint event for the front-end.
*/
private void triggerAccessWatchpointEvent() {
if (fObject == null)
System.out.println("fObject is null");
}
/**
* Trigger a breakpoint event for the front-end.
*/
private void triggerBreakpointEvent() {
System.out.println("Breakpoint");
}
/**
* Trigger a breakpoint event for the front-end.
*/
private void triggerBreakpointEvent2() {
System.out.println("Breakpoint");
}
/**
* Trigger a class prepare event for the front-end.
*/
private void triggerClassPrepareEvent() {
new TestClass();
}
/**
* Trigger a class Unload event for the front-end.
*/
private void triggerClassUnloadEvent() {
//<urltest2> is a class which is loaded using user defined class
loader.
//class unloading logic goes inside this class
//
System.out.println("inside trigger unload method");
urltest2 loadclass = new urltest2();
loadclass.done();
}
/**
* Trigger an event for the front-end.
*/
private void triggerEvent() {
/* Ensure we do it only once */
char eventType = fEventType;
int l_dummy_array[] = {1,2,3,4,5};
fEventType = ' ';
/* Trigger event according to the field fEventType */
switch (eventType) {
case 'a':
triggerAccessWatchpointEvent();
break;
case 'b':
triggerBreakpointEvent();
break;
case 'p':
triggerClassPrepareEvent();
break;
case 'e':
triggerExceptionEvent();
break;
case 'm':
triggerModificationWatchpointEventString();
break;
case 'f':
triggerModificationWatchpointEventFloat();
break;
case 'g':
triggerModificationWatchpointEventBool();
break;
case 'S':
triggerModificationWatchpointEventShort();
break;
case 'I':
triggerModificationWatchpointEventInt();
break;
case 'C':
triggerModificationWatchpointEventChar();
break;
case 'l':
triggerModificationWatchpointEventString();
break;
case 'D':
triggerModificationWatchpointEventDouble();
break;
case 's':
triggerThreadStartEvent();
break;
case 'n':
triggerThreadEndEvent();
break;
case 'E':
triggerMethodEntryEvent();
break;
case 'X':
triggerMethodExitEvent();
break;
case 'B':
triggerBreakpointEvent2();
break;
case 'u':
triggerClassUnloadEvent();
break;
case 'F':
triggerFrameMoveEvent();
break;
}
}
/**
* Trigger a Frame movement event
*/
public void triggerFrameMoveEvent()
{
System.out.println("First method called ..");
test_method_call1();
}
public void test_method_call1()
{
System.out.println("Second Method Called ..");
test_method_call2();
}
public void test_method_call2()
{
System.out.println("Third Method Called ..");
test_method_call3();
}
public void test_method_call3()
{
System.out.println("Third Method Called ..");
}
/**
* Trigger a method entry event .
*/
public void triggerMethodEntryEvent()
{
System.out.println("fire method entry event for this method");
}
/**
* Trigger a method exit event .
*/
public void triggerMethodExitEvent()
{
System.out.println("fire method exit event for this method");
}
/**
* Trigger an exception event for the front-end.
*/
private void triggerExceptionEvent() {
Thread t = new Thread(new Runnable() {
public void run() {
throw new Error();
}
}
, "Test Exception Event");
t.start();
}
/**
* Trigger a modification watchpoint event for the front-end.
*/
private void triggerModificationWatchpointEventString() {
fString = "Hello Universe";
};
private void triggerModificationWatchpointEventFloat() {
fFloat = 3f;
};
private void triggerModificationWatchpointEventByte() {
fByte = 4;
};
private void triggerModificationWatchpointEventShort() {
fShort = 5;
};
private void triggerModificationWatchpointEventLong() {
fLong = 200000L;
};
private void triggerModificationWatchpointEventInt() {
fIntTemp = 1;
};
private void triggerModificationWatchpointEventChar() {
fCharTemp = 'd';
};
private void triggerModificationWatchpointEventBool() {
fBoolTemp = false;
};
private void triggerModificationWatchpointEventDouble() {
fDoubleTemp = 3.0;
};
/**
* Trigger thread start and end events - wait for them to finish.
*/
private void triggerThreadEvents(String name) {
Thread t = new Thread(name);
t.start();
try {
t.join();
} catch (InterruptedException exc) {
}
}
/**
* Trigger a thread end event for the front-end.
*/
private void triggerThreadEndEvent() {
triggerThreadEvents("Test Thread End Event");
}
/**
* Trigger a thread start event for the front-end.
*/
private void triggerThreadStartEvent() {
triggerThreadEvents("Test Thread Start Event");
}
private void useThread(Thread t) {
if (t == null)
System.out.println("t is null");
}
/* For invocation tests */
private static String invoke1(int x) {
return (new Integer(x)).toString();
}
/* For invocation tests */
private static void invoke2() {
throw new IndexOutOfBoundsException();
}
/* For invocation tests */
private int invoke3(String str) {
return Integer.parseInt(str);
}
/* For invocation tests */
private long invoke4() throws java.io.EOFException {
throw new java.io.EOFException();
}
}
======================================================================
Name: rrC79099 Date: 07/16/99
All fields test in functionality test fails for 1.2.1VM in
jpda 1.0 fcs.
Test testJDIAllfields() in ClassDetailsTest in functionality testsuite
fails.
Tester class :
Tester Method : testJDIAllfields()
// ClassDetailsTest.java
package jdi.func;
import test.framework.*;
import com.sun.jdi.*;
import com.sun.jdi.event.*;
import com.sun.jdi.connect.*;
import com.sun.jdi.request.*;
import java.io.*;
import java.util.*;
import java.lang.reflect.*;
public class ClassDetailsTest extends AbstractJDITest
{
ReferenceType f_class;
ClassPrepareRequest f_cpr;
ClassPrepareEvent f_cpe;
LinkedList f_list_fields_expected;
LinkedList f_list_all_fields_expected;
LinkedList f_list_visible_fields_expected;
LinkedList f_list_methods_expected;
LinkedList f_list_all_methods_expected;
LinkedList f_list_visible_methods_expected;
LinkedList f_list_interfaces_expected;
LinkedList f_list_all_interfaces_expected;
LinkedList f_hidden_list;
public ClassDetailsTest()
{
super("ClassDetailsTest");
}
public int compareLists(LinkedList a_expected_list, List a_actual_list)
{
int l_counter_actual;
int l_counter_expected;
int l_size_counter;
int l_temp_flag;
System.out.println("Actual Size : "+a_actual_list.size());
System.out.println("Expected Size : "+a_expected_list.size());
// System.out.println("Actual List ");
// for(int i = 0; i < a_actual_list.size(); i++)
// {
// System.out.println
// (((TypeComponent)(a_actual_list.get(i))).name());
// }
// System.out.println("Expected List ");
// for(int i = 0; i < a_expected_list.size(); i++)
// {
// System.out.println(a_expected_list.get(i));
// }
l_size_counter = a_expected_list.size();
for (l_counter_actual = 0; l_counter_actual < a_actual_list.size();
l_counter_actual ++)
{
l_temp_flag = 0;
for (l_counter_expected = 0; l_counter_expected <
a_expected_list.size();
l_counter_expected ++)
{
if (a_expected_list.get(l_counter_expected).
equals( a_actual_list.get(l_counter_actual)))
{
l_size_counter --;
System.out.println("Matched : " +
a_actual_list.get
(l_counter_actual));
l_temp_flag = 1;
continue;
}
}
if (l_temp_flag == 1)
{
l_temp_flag = 0;
continue;
}
else
{
if (is_hidden_method
(a_actual_list, l_counter_actual) == true)
{
System.out.println("Matched : " +
a_actual_list.get
(l_counter_actual));
l_temp_flag = 0;
continue;
}
System.out.println("UnMatched : "
+ a_actual_list.get(l_counter_actual));
}
}
return l_size_counter;
}
public boolean is_hidden_method(List a_actual_list, int a_index)
{
int l_counter;
for(l_counter = 0; l_counter < f_hidden_list.size();
l_counter ++)
{
if(((TypeComponent)
(a_actual_list.get(a_index))).name().
equals(f_hidden_list.get(l_counter)))
{
return true;
}
}
return false;
}
public int compareNameLists(LinkedList a_expected_list, List
a_actual_list)
{
int l_counter_actual;
int l_counter_expected;
int l_size_counter;
System.out.println("ActualNameList Size : "+a_actual_list.size());
System.out.println("ExpectedNameList Size : "+a_expected_list.size());
// System.out.println("Actual List ");
// for(int i = 0; i < a_actual_list.size(); i++)
// {
// System.out.println(a_actual_list.get(i));
// }
//
// System.out.println("Expected List ");
// for(int i = 0; i < a_expected_list.size(); i++)
// {
// System.out.println(a_expected_list.get(i));
// }
l_size_counter = a_expected_list.size();
for (l_counter_actual = 0; l_counter_actual < a_actual_list.size();
l_counter_actual ++)
{
for (l_counter_expected = 0; l_counter_expected <
a_expected_list.size();
l_counter_expected ++)
{
if (a_expected_list.get
(l_counter_expected).equals
(((InterfaceType)(a_actual_list.get(l_counter_actual))).name()) ==
true)
{
l_size_counter --;
System.out.println("Matched : " +
a_actual_list.get(l_counter_actual));
continue;
}
}
}
return l_size_counter;
}
public void testJDIFieldsInClass()
{
List l_actual_list;
ClassType l_classtype;
int l_counter_actual;
int l_counter_expected;
int l_size_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.fields();
assert(l_actual_list.size() == f_list_fields_expected.size());
assert(compareLists(f_list_fields_expected, l_actual_list) == 0);
}
public void testJDIMethodsInClass()
{
List l_actual_list;
ClassType l_classtype;
int l_counter_actual;
int l_counter_expected;
int l_size_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.methods();
assert(l_actual_list.size() == f_list_methods_expected.size());
assert(compareLists
(f_list_methods_expected, l_actual_list) == 0);
}
public void testJDIInterfacesInClass()
{
ClassType l_classtype;
List l_actual_list;
int l_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.interfaces();
assert(l_actual_list.size() == f_list_interfaces_expected.size());
assert(compareNameLists(f_list_interfaces_expected, l_actual_list) ==
0);
}
public void testJDIAllInterfaces()
{
ClassType l_classtype;
List l_actual_list;
int l_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.allInterfaces();
assert(l_actual_list.size() == f_list_all_interfaces_expected.size());
assert(compareNameLists(f_list_all_interfaces_expected, l_actual_list)
== 0);
}
public void testJDIAllFields()
{
ClassType l_classtype;
List l_actual_list;
int l_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.allFields();
assert(l_actual_list.size() == f_list_all_fields_expected.size());
assert(compareLists(f_list_all_fields_expected, l_actual_list) == 0);
}
public void testJDIAllMethods()
{
ClassType l_classtype;
List l_actual_list;
int l_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.allMethods();
// System.out.println("expected (223) : " +
f_list_all_methods_expected.size()
// + f_hidden_list.size());
// System.out.println("actual (223) : " + l_actual_list.size());
//
// for(int i = 0; i < l_actual_list.size(); i++)
// {
// System.out.println(l_actual_list.get(i));
// }
assert(l_actual_list.size() ==
(f_list_all_methods_expected.size() +
f_hidden_list.size()));
assert(compareLists
(f_list_all_methods_expected, l_actual_list) == 0);
}
public void testJDIVisibleFields()
{
ClassType l_classtype;
List l_actual_list;
int l_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.visibleFields();
assert(l_actual_list.size() == f_list_visible_fields_expected.size());
assert(compareLists(f_list_visible_fields_expected, l_actual_list) ==
0);
}
public void testJDIVisibleMethods()
{
ClassType l_classtype;
List l_actual_list;
int l_counter;
l_classtype = getMainClass();
l_actual_list = l_classtype.visibleMethods();
// System.out.println("expected (224) : " +
f_list_visible_methods_expected.size());
// System.out.println("actual (224) : " + l_actual_list.size());
// for(int i = 0; i < l_actual_list.size(); i++)
// {
// System.out.println(l_actual_list.get(i));
// }
assert(l_actual_list.size() ==
f_list_visible_methods_expected.size());
assert(compareLists(f_list_visible_methods_expected, l_actual_list) ==
0);
}
public void localSetUp()
{
ClassType l_classtype;
l_classtype = getMainClass();
f_list_fields_expected = new LinkedList();
f_list_methods_expected = new LinkedList();
f_list_interfaces_expected = new LinkedList();
f_list_all_interfaces_expected = new LinkedList();
f_list_all_methods_expected = new LinkedList();
f_list_all_fields_expected = new LinkedList();
f_list_visible_fields_expected = new LinkedList();
f_list_visible_methods_expected = new LinkedList();
f_hidden_list = new LinkedList();
f_list_fields_expected.add(l_classtype.fieldByName("fInt"));
f_list_fields_expected.add(l_classtype.fieldByName("fObject"));
f_list_fields_expected.add(l_classtype.fieldByName("fString"));
f_list_fields_expected.add(l_classtype.fieldByName("fThread"));
f_list_fields_expected.add(l_classtype.fieldByName("fArray"));
f_list_fields_expected.add(l_classtype.fieldByName("fDoubleArray"));
f_list_fields_expected.add(l_classtype.fieldByName("fEventType"));
f_list_fields_expected.add(l_classtype.fieldByName("fIsProgramReady"));
f_list_fields_expected.add(l_classtype.fieldByName("fBool"));
f_list_fields_expected.add(l_classtype.fieldByName("fChar"));
f_list_fields_expected.add(l_classtype.fieldByName("fIntTemp"));
f_list_fields_expected.add(l_classtype.fieldByName("fCharTemp"));
f_list_fields_expected.add(l_classtype.fieldByName("fBoolTemp"));
f_list_fields_expected.add(l_classtype.fieldByName("fDoubleTemp"));
f_list_fields_expected.add(l_classtype.fieldByName("fByte"));
f_list_fields_expected.add(l_classtype.fieldByName("fShort"));
f_list_fields_expected.add(l_classtype.fieldByName("fLong"));
f_list_fields_expected.add(l_classtype.fieldByName("fFloat"));
//f_list_fields_expected.add(l_classtype.fieldByName(""));
//f_list_fields_expected.add(l_classtype.fieldByName(""));
//f_list_fields_expected.add(l_classtype.fieldByName(""));
//f_list_fields_expected.add(l_classtype.fieldByName(""));
//f_list_fields_expected.add(l_classtype.fieldByName(""));
//f_list_fields_expected.add(l_classtype.fieldByName(""));
f_hidden_list.add("hashCode"); // Hidden
f_hidden_list.add("clone"); // Hidden
f_hidden_list.add("equals"); // Hidden
f_hidden_list.add("toString"); // Hidden
f_hidden_list.add("<clinit>"); // Hidden
f_hidden_list.add("<clinit>"); // Hidden
f_hidden_list.add("<init>"); // Hidden
f_hidden_list.add("<init>"); // Hidden
//f_list_all_fields is a superset of f_list_fields_expected
f_list_all_fields_expected.addAll(f_list_fields_expected);
f_list_all_fields_expected.add(l_classtype.fieldByName("cal"));
f_list_all_fields_expected.add(l_classtype.fieldByName("fastTime"));
f_list_all_fields_expected.add(l_classtype.fieldByName("staticCal"));
f_list_all_fields_expected.add(l_classtype.fieldByName("utcCal"));
f_list_all_fields_expected.add(l_classtype.fieldByName("defaultCenturyStart"));
f_list_all_fields_expected.add(l_classtype.fieldByName("serialVersionUID"));
f_list_all_fields_expected.add(l_classtype.fieldByName("simpleFormatter"));
f_list_all_fields_expected.add(l_classtype.fieldByName("gmtFormatter"));
f_list_all_fields_expected.add(l_classtype.fieldByName("wtb"));
f_list_all_fields_expected.add(l_classtype.fieldByName("ttb"));
// In this case, visible fields and 'all fields' represent
// the same sets (Try hiding)
f_list_visible_fields_expected.addAll(f_list_all_fields_expected);
f_list_methods_expected.add(l_classtype.methodsByName("main").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("print").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("printAndSignal").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("run").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("simul").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerAccessWatchpointEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerBreakpointEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerBreakpointEvent2").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerClassPrepareEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerExceptionEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventInt").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventFloat").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventDouble").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventLong").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventBool").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventString").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventChar").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventShort").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerModificationWatchpointEventByte").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerThreadEvents").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerThreadEndEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerThreadStartEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("useThread").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("invoke1").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("invoke2").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("invoke3").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("invoke4").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerClassUnloadEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerFrameMoveEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("test_method_call1").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("test_method_call2").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("test_method_call3").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerMethodEntryEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("triggerMethodExitEvent").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("<init>").get(0));
f_list_methods_expected.add(l_classtype.methodsByName("<clinit>").get(0));
f_list_visible_methods_expected.addAll(f_list_methods_expected);
f_list_visible_methods_expected.add(l_classtype.methodsByName("UTC").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("after").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("before").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("clone").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("compareTo","(Ljava/lang/Object;)I").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("compareTo","(Ljava/util/Date;)I").get(0));
f_list_visible_methods_expected.add(l_classtype.methodsByName("equals").