53 |
import gnu.classpath.jdwp.event.filters.InstanceOnlyFilter; |
import gnu.classpath.jdwp.event.filters.InstanceOnlyFilter; |
54 |
import gnu.classpath.jdwp.event.filters.LocationOnlyFilter; |
import gnu.classpath.jdwp.event.filters.LocationOnlyFilter; |
55 |
import gnu.classpath.jdwp.event.filters.StepFilter; |
import gnu.classpath.jdwp.event.filters.StepFilter; |
56 |
import gnu.classpath.jdwp.event.filters.ThreadFilter; |
import gnu.classpath.jdwp.event.filters.ThreadOnlyFilter; |
57 |
import gnu.classpath.jdwp.exception.JdwpException; |
import gnu.classpath.jdwp.exception.JdwpException; |
58 |
import gnu.classpath.jdwp.exception.JdwpInternalErrorException; |
import gnu.classpath.jdwp.exception.JdwpInternalErrorException; |
59 |
import gnu.classpath.jdwp.exception.NotImplementedException; |
import gnu.classpath.jdwp.exception.NotImplementedException; |
66 |
import java.io.DataOutputStream; |
import java.io.DataOutputStream; |
67 |
import java.io.IOException; |
import java.io.IOException; |
68 |
import java.nio.ByteBuffer; |
import java.nio.ByteBuffer; |
|
import java.util.Iterator; |
|
69 |
|
|
70 |
/** |
/** |
71 |
* A class representing the EventRequest Command Set. |
* A class representing the EventRequest Command Set. |
120 |
byte modKind = bb.get(); |
byte modKind = bb.get(); |
121 |
switch (modKind) |
switch (modKind) |
122 |
{ |
{ |
123 |
case 1: |
case JdwpConstants.ModKind.COUNT: |
124 |
filter = new CountFilter(bb.getInt()); |
filter = new CountFilter(bb.getInt()); |
125 |
break; |
break; |
126 |
case 2: |
case JdwpConstants.ModKind.CONDITIONAL: |
127 |
filter = new ConditionalFilter(idMan.readObjectId(bb)); |
filter = new ConditionalFilter(idMan.readObjectId(bb)); |
128 |
break; |
break; |
129 |
case 3: |
case JdwpConstants.ModKind.THREAD_ONLY: |
130 |
filter = new ThreadFilter((ThreadId) idMan.readObjectId(bb)); |
filter = new ThreadOnlyFilter((ThreadId) idMan.readObjectId(bb)); |
131 |
break; |
break; |
132 |
case 4: |
case JdwpConstants.ModKind.CLASS_ONLY: |
133 |
filter = new ClassOnlyFilter(idMan.readReferenceTypeId(bb)); |
filter = new ClassOnlyFilter(idMan.readReferenceTypeId(bb)); |
134 |
break; |
break; |
135 |
case 5: |
case JdwpConstants.ModKind.CLASS_MATCH: |
136 |
filter = new ClassMatchFilter(JdwpString.readString(bb)); |
filter = new ClassMatchFilter(JdwpString.readString(bb)); |
137 |
break; |
break; |
138 |
case 6: |
case JdwpConstants.ModKind.CLASS_EXCLUDE: |
139 |
filter = new ClassExcludeFilter(JdwpString.readString(bb)); |
filter = new ClassExcludeFilter(JdwpString.readString(bb)); |
140 |
break; |
break; |
141 |
case 7: |
case JdwpConstants.ModKind.LOCATION_ONLY: |
142 |
filter = new LocationOnlyFilter(new Location(bb)); |
filter = new LocationOnlyFilter(new Location(bb)); |
143 |
break; |
break; |
144 |
case 8: |
case JdwpConstants.ModKind.EXCEPTION_ONLY: |
145 |
long id = bb.getLong(); |
long id = bb.getLong(); |
146 |
if (id == 0) |
if (id == 0) |
147 |
refId = null; |
refId = null; |
151 |
boolean unCaught = (bb.get() == 0) ? false : true; |
boolean unCaught = (bb.get() == 0) ? false : true; |
152 |
filter = new ExceptionOnlyFilter(refId, caught, unCaught); |
filter = new ExceptionOnlyFilter(refId, caught, unCaught); |
153 |
break; |
break; |
154 |
case 9: |
case JdwpConstants.ModKind.FIELD_ONLY: |
155 |
refId = idMan.readReferenceTypeId(bb); |
refId = idMan.readReferenceTypeId(bb); |
156 |
ReferenceTypeId fieldId = idMan.readReferenceTypeId(bb); |
ReferenceTypeId fieldId = idMan.readReferenceTypeId(bb); |
157 |
filter = new FieldOnlyFilter(refId, fieldId); |
filter = new FieldOnlyFilter(refId, fieldId); |
158 |
break; |
break; |
159 |
case 10: |
case JdwpConstants.ModKind.STEP: |
160 |
ObjectId tid = idMan.readObjectId(bb); |
ThreadId tid = (ThreadId) idMan.readObjectId(bb); |
161 |
int size = bb.getInt(); |
int size = bb.getInt(); |
162 |
int depth = bb.getInt(); |
int depth = bb.getInt(); |
163 |
filter = new StepFilter(tid, size, depth); |
filter = new StepFilter(tid, size, depth); |
164 |
break; |
break; |
165 |
case 11: |
case JdwpConstants.ModKind.INSTANCE_ONLY: |
166 |
ObjectId oid = idMan.readObjectId(bb); |
ObjectId oid = idMan.readObjectId(bb); |
167 |
filter = new InstanceOnlyFilter(oid.getObject()); |
filter = new InstanceOnlyFilter(oid); |
168 |
break; |
break; |
169 |
default: |
default: |
170 |
throw new NotImplementedException("modKind " + modKind |
throw new NotImplementedException("modKind " + modKind |