Module com.sun.xml.bind.osgi
Interface XmlVisitor.TextPredictor
-
- All Known Implementing Classes:
UnmarshallingContext
- Enclosing interface:
- XmlVisitor
public static interface XmlVisitor.TextPredictor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
expectText()
Returns true if the visitor is expecting a text event as the next event.
-
-
-
Method Detail
-
expectText
boolean expectText()
Returns true if the visitor is expecting a text event as the next event.This is primarily intended to be used for optimization to avoid buffering characters unnecessarily. If this method returns false and the connector sees whitespace it can safely skip it.
If this method returns true, all the whitespaces are considered significant and thus need to be reported as a
XmlVisitor.text(java.lang.CharSequence)
event. Furthermore, if the element has no children (like<foo/>
), then it has to be reported an emptyXmlVisitor.text(java.lang.CharSequence)
event.
-
-