Package org.codehaus.staxmate.in
Class SimpleFilter
java.lang.Object
org.codehaus.staxmate.in.SMFilter
org.codehaus.staxmate.in.SimpleFilter
- Direct Known Subclasses:
ElementFilter
Simple bit-set based filter that can be configured by specifying allowed
event types. Such filters are immutable and can be easily shared, but
can only be used if checks are strictly based on only event type.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(SMEvent evt, SMInputCursor caller) Methods iterators call to check whether specified event should be return, or filtered out.extend
(int additionalFlags, int removeFlags)
-
Field Details
-
mAllowedTypes
final int mAllowedTypes
-
-
Constructor Details
-
SimpleFilter
public SimpleFilter(int typeFlags) -
SimpleFilter
-
-
Method Details
-
extend
-
accept
Description copied from class:SMFilter
Methods iterators call to check whether specified event should be return, or filtered out.- Specified by:
accept
in classSMFilter
- 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
-