Class BufferingParser
java.lang.Object
org.apache.maven.model.transform.pull.BufferingParser
- All Implemented Interfaces:
org.codehaus.plexus.util.xml.pull.XmlPullParser
- Direct Known Subclasses:
NodeBufferingParser
public class BufferingParser
extends Object
implements org.codehaus.plexus.util.xml.pull.XmlPullParser
An xml pull parser filter base implementation.
- Since:
- 4.0.0
- Author:
- Guillaume Nodet
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected BufferingParser.Event
protected Deque<BufferingParser.Event>
protected org.codehaus.plexus.util.xml.pull.XmlPullParser
Fields inherited from interface org.codehaus.plexus.util.xml.pull.XmlPullParser
CDSECT, COMMENT, DOCDECL, END_DOCUMENT, END_TAG, ENTITY_REF, FEATURE_PROCESS_DOCDECL, FEATURE_PROCESS_NAMESPACES, FEATURE_REPORT_NAMESPACE_ATTRIBUTES, FEATURE_VALIDATION, IGNORABLE_WHITESPACE, NO_NAMESPACE, PROCESSING_INSTRUCTION, START_DOCUMENT, START_TAG, TEXT, TYPES
-
Constructor Summary
ConstructorDescriptionBufferingParser
(org.codehaus.plexus.util.xml.pull.XmlPullParser xmlPullParser) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
accept()
protected BufferingParser.Event
boolean
bypass()
void
bypass
(boolean bypass) void
defineEntityReplacementText
(String entityName, String replacementText) int
getAttributeName
(int index) getAttributeNamespace
(int index) getAttributePrefix
(int index) getAttributeType
(int index) getAttributeValue
(int index) getAttributeValue
(String namespace, String name) int
int
getDepth()
int
boolean
getFeature
(String name) int
getName()
getNamespace
(String prefix) int
getNamespaceCount
(int depth) getNamespacePrefix
(int pos) getNamespaceUri
(int pos) getProperty
(String name) getText()
char[]
getTextCharacters
(int[] holderForStartAndLength) boolean
isAttributeDefault
(int index) boolean
boolean
int
next()
int
nextTag()
nextText()
int
protected static String
nullSafeAppend
(String originalValue, String charSegment) protected void
pushEvent
(BufferingParser.Event event) void
void
setFeature
(String name, boolean state) void
setInput
(InputStream inputStream, String inputEncoding) void
void
setProperty
(String name, Object value)
-
Field Details
-
xmlPullParser
protected org.codehaus.plexus.util.xml.pull.XmlPullParser xmlPullParser -
events
-
current
-
bypass
protected boolean bypass
-
-
Constructor Details
-
BufferingParser
public BufferingParser(org.codehaus.plexus.util.xml.pull.XmlPullParser xmlPullParser)
-
-
Method Details
-
setFeature
public void setFeature(String name, boolean state) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException - Specified by:
setFeature
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getFeature
- Specified by:
getFeature
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
setProperty
public void setProperty(String name, Object value) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException - Specified by:
setProperty
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getProperty
- Specified by:
getProperty
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
setInput
- Specified by:
setInput
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
setInput
public void setInput(InputStream inputStream, String inputEncoding) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException - Specified by:
setInput
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getInputEncoding
- Specified by:
getInputEncoding
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
defineEntityReplacementText
public void defineEntityReplacementText(String entityName, String replacementText) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException - Specified by:
defineEntityReplacementText
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getNamespaceCount
public int getNamespaceCount(int depth) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException - Specified by:
getNamespaceCount
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getNamespacePrefix
public String getNamespacePrefix(int pos) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException - Specified by:
getNamespacePrefix
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getNamespaceUri
public String getNamespaceUri(int pos) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException - Specified by:
getNamespaceUri
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getNamespace
- Specified by:
getNamespace
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getDepth
public int getDepth()- Specified by:
getDepth
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getPositionDescription
- Specified by:
getPositionDescription
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumber
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumber
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
isWhitespace
public boolean isWhitespace() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException- Specified by:
isWhitespace
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getText
- Specified by:
getText
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getTextCharacters
public char[] getTextCharacters(int[] holderForStartAndLength) - Specified by:
getTextCharacters
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getNamespace
- Specified by:
getNamespace
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getName
- Specified by:
getName
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getPrefix
- Specified by:
getPrefix
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
isEmptyElementTag
public boolean isEmptyElementTag() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException- Specified by:
isEmptyElementTag
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getAttributeCount
public int getAttributeCount()- Specified by:
getAttributeCount
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getAttributeNamespace
- Specified by:
getAttributeNamespace
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getAttributeName
- Specified by:
getAttributeName
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getAttributePrefix
- Specified by:
getAttributePrefix
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getAttributeType
- Specified by:
getAttributeType
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
isAttributeDefault
public boolean isAttributeDefault(int index) - Specified by:
isAttributeDefault
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getAttributeValue
- Specified by:
getAttributeValue
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getAttributeValue
- Specified by:
getAttributeValue
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
require
public void require(int type, String namespace, String name) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException - Specified by:
require
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
IOException
-
getEventType
public int getEventType() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException- Specified by:
getEventType
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
next
- Specified by:
next
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
IOException
-
nextToken
- Specified by:
nextToken
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
IOException
-
nextTag
- Specified by:
nextTag
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
IOException
-
nextText
public String nextText() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException- Specified by:
nextText
in interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
IOException
-
bufferEvent
protected BufferingParser.Event bufferEvent() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
pushEvent
-
accept
protected boolean accept() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
IOException
-
bypass
public void bypass(boolean bypass) -
bypass
public boolean bypass() -
nullSafeAppend
-