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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected BufferingParser.Eventprotected Deque<BufferingParser.Event>protected org.codehaus.plexus.util.xml.pull.XmlPullParserFields 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
ConstructorsConstructorDescriptionBufferingParser(org.codehaus.plexus.util.xml.pull.XmlPullParser xmlPullParser) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaccept()protected BufferingParser.Eventbooleanbypass()voidbypass(boolean bypass) voiddefineEntityReplacementText(String entityName, String replacementText) intgetAttributeName(int index) getAttributeNamespace(int index) getAttributePrefix(int index) getAttributeType(int index) getAttributeValue(int index) getAttributeValue(String namespace, String name) intintgetDepth()intbooleangetFeature(String name) intgetName()getNamespace(String prefix) intgetNamespaceCount(int depth) getNamespacePrefix(int pos) getNamespaceUri(int pos) getProperty(String name) getText()char[]getTextCharacters(int[] holderForStartAndLength) booleanisAttributeDefault(int index) booleanbooleanintnext()intnextTag()nextText()intprotected static StringnullSafeAppend(String originalValue, String charSegment) protected voidpushEvent(BufferingParser.Event event) voidvoidsetFeature(String name, boolean state) voidsetInput(InputStream inputStream, String inputEncoding) voidvoidsetProperty(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:
setFeaturein interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getFeature
- Specified by:
getFeaturein 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:
setPropertyin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getProperty
- Specified by:
getPropertyin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
setInput
- Specified by:
setInputin 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:
setInputin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getInputEncoding
- Specified by:
getInputEncodingin 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:
defineEntityReplacementTextin 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:
getNamespaceCountin 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:
getNamespacePrefixin 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:
getNamespaceUriin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getNamespace
- Specified by:
getNamespacein interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getDepth
public int getDepth()- Specified by:
getDepthin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getPositionDescription
- Specified by:
getPositionDescriptionin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumberin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumberin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
isWhitespace
public boolean isWhitespace() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException- Specified by:
isWhitespacein interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getText
- Specified by:
getTextin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getTextCharacters
public char[] getTextCharacters(int[] holderForStartAndLength) - Specified by:
getTextCharactersin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getNamespace
- Specified by:
getNamespacein interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getName
- Specified by:
getNamein interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getPrefix
- Specified by:
getPrefixin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
isEmptyElementTag
public boolean isEmptyElementTag() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException- Specified by:
isEmptyElementTagin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
getAttributeCount
public int getAttributeCount()- Specified by:
getAttributeCountin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getAttributeNamespace
- Specified by:
getAttributeNamespacein interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getAttributeName
- Specified by:
getAttributeNamein interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getAttributePrefix
- Specified by:
getAttributePrefixin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getAttributeType
- Specified by:
getAttributeTypein interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
isAttributeDefault
public boolean isAttributeDefault(int index) - Specified by:
isAttributeDefaultin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getAttributeValue
- Specified by:
getAttributeValuein interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser
-
getAttributeValue
- Specified by:
getAttributeValuein 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:
requirein interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionIOException
-
getEventType
public int getEventType() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException- Specified by:
getEventTypein interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
next
- Specified by:
nextin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionIOException
-
nextToken
- Specified by:
nextTokenin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionIOException
-
nextTag
- Specified by:
nextTagin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionIOException
-
nextText
public String nextText() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException- Specified by:
nextTextin interfaceorg.codehaus.plexus.util.xml.pull.XmlPullParser- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionIOException
-
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.XmlPullParserExceptionIOException
-
bypass
public void bypass(boolean bypass) -
bypass
public boolean bypass() -
nullSafeAppend
-