public
void
addCountFilter(
int
count)
throws
InvalidRequestStateException
{
checkDisabled();
if
(
this
.fCountFilters ==
null
) {
this
.fCountFilters =
new
ArrayList();
}
this
.fCountFilters.add(
new
Integer(count));
}
public
void
addThreadFilter(ThreadReference threadFilter)
throws
ObjectCollectedException, VMMismatchException, InvalidRequestStateException
{
checkVM(threadFilter);
checkDisabled();
if
(threadFilter.isCollected())
throw
new
ObjectCollectedException();
if
(
this
.fThreadFilters ==
null
) {
this
.fThreadFilters =
new
ArrayList();
}
this
.fThreadFilters.add(threadFilter);
}
public
void
addClassFilter(ReferenceType filter)
throws
VMMismatchException, InvalidRequestStateException
{
checkVM(filter);
checkDisabled();
if
(
this
.fClassFilterRefs ==
null
) {
this
.fClassFilterRefs =
new
ArrayList();
}
this
.fClassFilterRefs.add(filter);
}
public
void
addClassFilter(String filter)
throws
InvalidRequestStateException
{
checkDisabled();
if
(
this
.fClassFilters ==
null
) {
this
.fClassFilters =
new
ArrayList();
}
this
.fClassFilters.add(filter);
}
public
void
addClassExclusionFilter(String filter)
throws
InvalidRequestStateException
{
checkDisabled();
if
(
this
.fClassExclusionFilters ==
null
) {
this
.fClassExclusionFilters =
new
ArrayList();
}
this
.fClassExclusionFilters.add(filter);
}
public
void
addLocationFilter(LocationImpl location)
throws
VMMismatchException
{
checkDisabled();
checkVM(location);
if
(
this
.fLocationFilters ==
null
) {
this
.fLocationFilters =
new
ArrayList();
}
this
.fLocationFilters.add(location);
}
public
void
addExceptionFilter(ReferenceTypeImpl refType,
boolean
notifyCaught,
boolean
notifyUncaught)
throws
VMMismatchException
{
checkDisabled();
if
(refType !=
null
) {
checkVM(refType);
}
if
(
this
.fExceptionFilters ==
null
) {
this
.fExceptionFilters =
new
ArrayList();
}
ExceptionFilter filter =
new
ExceptionFilter();
filter.fException = refType;
filter.fNotifyCaught = notifyCaught;
filter.fNotifyUncaught = notifyUncaught;
this
.fExceptionFilters.add(filter);
}
public
void
addFieldFilter(FieldImpl field)
throws
VMMismatchException
{
checkDisabled();
checkVM(field);
if
(
this
.fFieldFilters ==
null
) {
this
.fFieldFilters =
new
ArrayList();
}
this
.fFieldFilters.add(field);
}
public
void
addStepFilter(ThreadReferenceImpl thread,
int
size,
int
depth)
throws
VMMismatchException
{
checkDisabled();
checkVM(thread);
if
(
this
.fThreadStepFilters ==
null
) {
this
.fThreadStepFilters =
new
ArrayList();
}
ThreadStepFilter filter =
new
ThreadStepFilter();
filter.fThread = thread;
filter.fThreadStepSize = size;
filter.fThreadStepDepth = depth;
this
.fThreadStepFilters.add(filter);
}
public
void
addInstanceFilter(ObjectReference instance)
{
checkDisabled();
checkVM(instance);
if
(
this
.fInstanceFilters ==
null
) {
this
.fInstanceFilters =
new
ArrayList();
}
this
.fInstanceFilters.add(instance);
}
public
void
addSourceNameFilter(String pattern)
{
checkDisabled();
if
(
this
.fSourceNameFilters ==
null
) {
this
.fSourceNameFilters =
new
ArrayList();
}
this
.fSourceNameFilters.add(pattern);
}