org.codehaus.staxmate.in
Class SMFilter
java.lang.Object
org.codehaus.staxmate.in.SMFilter
- Direct Known Subclasses:
- SimpleFilter
public abstract class SMFilter
- extends java.lang.Object
Simple class that defines for objects used to configure iterators so that
they will filter out "uninteresting" events.
Note: instances can do other things
too (keep track of things they iterate over) if they are stateful;
for example, collect text, or validate structure, although main purpose
is filtering.
- Author:
- Tatu Saloranta
|
Method Summary |
abstract boolean |
accept(SMEvent evt,
SMInputCursor caller)
Methods iterators call to check whether specified event should
be return, or filtered out. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SMFilter
public SMFilter()
accept
public abstract boolean accept(SMEvent evt,
SMInputCursor caller)
throws javax.xml.stream.XMLStreamException
- Methods iterators call to check whether specified event should
be return, or filtered out.
- Parameters:
evt - Enumerated (type of the) event that would be passed/filteredcaller - Iterator that is calling this filter. Note that at
this point it is possible that not all state information
of iterator have been updated; however, its stream reader
should be accessible, as well as tracked element information
PRIOR to current node (which may or may not be a start element)
- Returns:
- If true, event is to be returned; if false, it should be
filtered out.
- Throws:
javax.xml.stream.XMLStreamException