Package 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.
-
-
Constructor Summary
Constructors Constructor Description SMFilter()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract boolean
accept(SMEvent evt, SMInputCursor caller)
Methods iterators call to check whether specified event should be return, or filtered out.
-
-
-
Method Detail
-
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
-
-