com.ibm.dtfj.analyzer.util.filter
Interface ObjectFilter

All Known Implementing Classes:
AddressAccept, AddressFilter, AddressReject, ArrayAccept, ArrayFilter, ArrayReject, BaseFilter, ClassAccept, ClassFilter, ClassReject, MarkedAccept, MarkedFilter, MarkedReject, SizeAccept, SizeFilter, SizeReject

public interface ObjectFilter

Specifies the behaviour of a filter to subset the objects being iterated by ObjectIterator. These filters are designed to be added to an ObjectIterator and they are called for each object. To simplify the semantics the filtering is designed to be order independent so that all the filters are called for each object and a final decision is reached on whether to accept or reject the object. For an object to be accepted at least one of the filters must accept it and none of them must reject it.


Method Summary
 boolean acceptObject(com.ibm.dtfj.java.JavaHeap heap, com.ibm.dtfj.java.JavaObject obj)
          Is this object to be accepted as a part of the set.
 boolean rejectObject(com.ibm.dtfj.java.JavaHeap heap, com.ibm.dtfj.java.JavaObject obj)
          Is this object to be rejected from the set.
 

Method Detail

acceptObject

boolean acceptObject(com.ibm.dtfj.java.JavaHeap heap,
                     com.ibm.dtfj.java.JavaObject obj)
Is this object to be accepted as a part of the set. If so then return true from this call. Otherwise return false; objects are accepted if any filter accepts them.

Parameters:
heap - the object heap
obj - the object itself
Returns:
true to accept the object

rejectObject

boolean rejectObject(com.ibm.dtfj.java.JavaHeap heap,
                     com.ibm.dtfj.java.JavaObject obj)
Is this object to be rejected from the set. If so then return true from this call. Otherwise return false; objects are rejected if any filter accepts them.

Parameters:
heap - the object heap
obj - the object itself
Returns:
true to accept the object


© Copyright IBM Corp. 2007, 2008 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.