Package org.codehaus.staxmate.in
Class SMFilter
java.lang.Object
org.codehaus.staxmate.in.SMFilter
- Direct Known Subclasses:
SimpleFilter
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 -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
accept
(SMEvent evt, SMInputCursor caller) Methods iterators call to check whether specified event should be return, or filtered out.
-
Constructor Details
-
SMFilter
public SMFilter()
-
-
Method Details
-
accept
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:
XMLStreamException
-