logWriter.println("==> Send VirtualMachine::AllClasses command...");
CommandPacket packet = new CommandPacket(
JDWPCommands.VirtualMachineCommandSet.CommandSetID,
JDWPCommands.VirtualMachineCommandSet.AllClassesCommand);
ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
checkReplyPacket(reply, "VirtualMachine::AllClasses command");
byte refTypeTag;
String refTypeTagName;
long typeID;
String signature;
int status;
String msgLine;
boolean flagForHelloWorld = false;
int classes = reply.getNextValueAsInt();
logWriter.println("==> Number of reference types = " + classes);
assertTrue(classes > 0);
int printBound_1 = classes;
int printBound_2 = 0;
if ( classes > 50 ) {
printBound_1 = 5;
printBound_2 = classes - 5;
}
for (int i = 0; i < classes; i++) {
boolean infoIsPrinted = false;
refTypeTag = reply.getNextValueAsByte();
try {
refTypeTagName = JDWPConstants.TypeTag.getName(refTypeTag);
} catch ( Throwable thrown ) {
refTypeTagName = "UnknownTagName";
}
msgLine = "\n" + i + ". " + refTypeTagName;
typeID = reply.getNextValueAsReferenceTypeID();
signature = reply.getNextValueAsString();
msgLine = msgLine + ": " + signature;
status = reply.getNextValueAsInt();
msgLine = msgLine + " " + JDWPConstants.ClassStatus.getName(status);
if ( (i < printBound_1) || (i >= printBound_2) ) {
logWriter.println(msgLine);
logWriter.println("\treferenceTypeID = " + typeID);
logWriter.println("\trefTypeTag = " + refTypeTagName