public ReplyPacket setCountableMethodEntry(String classRegexp, int count) {
byte eventKind = JDWPConstants.EventKind.METHOD_ENTRY;
byte suspendPolicy = JDWPConstants.SuspendPolicy.ALL;
EventMod[] mods = null;
if (classRegexp == null) {
mods = new EventMod[] { new EventMod() };
mods[0].modKind = EventMod.ModKind.Count;
mods[0].count = count;
} else {
mods = new EventMod[2];
mods[0] = new EventMod();
mods[0].modKind = EventMod.ModKind.ClassMatch;
mods[0].classPattern = classRegexp;
mods[1] = new EventMod();
mods[1].modKind = EventMod.ModKind.Count;
mods[1].count = count;
}
Event event = new Event(eventKind, suspendPolicy, mods);