public class YAMLParser
extends com.fasterxml.jackson.core.base.ParserBase
JsonParser implementation used to expose YAML documents
in form that allows other Jackson functionality to deal
with it.| Modifier and Type | Class and Description |
|---|---|
static class |
YAMLParser.Feature
Enumeration that defines all togglable features for YAML parsers.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
_currentAnchor
Anchor for the value that parser currently points to: in case of
structured types, value whose first token current token is.
|
protected java.lang.String |
_currentFieldName
Let's also have a local copy of the current field name
|
protected boolean |
_currentIsAlias
Flag that is set when current token was derived from an Alias
(reference to another value's anchor)
|
protected org.yaml.snakeyaml.events.Event |
_lastEvent
Keep track of the last event read, to get access to Location info
|
protected com.fasterxml.jackson.core.ObjectCodec |
_objectCodec
Codec used for data binding when (if) requested.
|
protected java.io.Reader |
_reader
Need to keep track of underlying
Reader to be able to
auto-close it (if required to) |
protected java.lang.String |
_textValue
We need to keep track of text values.
|
protected int |
_yamlFeatures |
protected org.yaml.snakeyaml.parser.ParserImpl |
_yamlParser |
_binaryValue, _byteArrayBuilder, _closed, _currInputProcessed, _currInputRow, _currInputRowStart, _expLength, _fractLength, _inputEnd, _inputPtr, _intLength, _ioContext, _nameCopied, _nameCopyBuffer, _nextToken, _numberBigDecimal, _numberBigInt, _numberDouble, _numberInt, _numberLong, _numberNegative, _numTypesValid, _parsingContext, _textBuffer, _tokenInputCol, _tokenInputRow, _tokenInputTotal, CHAR_NULL, INT_0, INT_1, INT_2, INT_3, INT_4, INT_5, INT_6, INT_7, INT_8, INT_9, INT_DECIMAL_POINT, INT_e, INT_E, INT_MINUS, INT_PLUS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_INT, NR_LONG, NR_UNKNOWN_currToken, _lastClearedToken, INT_APOSTROPHE, INT_ASTERISK, INT_b, INT_BACKSLASH, INT_COLON, INT_COMMA, INT_CR, INT_f, INT_LBRACKET, INT_LCURLY, INT_LF, INT_n, INT_QUOTE, INT_r, INT_RBRACKET, INT_RCURLY, INT_SLASH, INT_SPACE, INT_t, INT_TAB, INT_u| Constructor and Description |
|---|
YAMLParser(com.fasterxml.jackson.core.io.IOContext ctxt,
com.fasterxml.jackson.core.util.BufferRecycler br,
int parserFeatures,
int csvFeatures,
com.fasterxml.jackson.core.ObjectCodec codec,
java.io.Reader reader) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_closeInput() |
protected com.fasterxml.jackson.core.JsonToken |
_decodeNumberScalar(java.lang.String value,
int len) |
protected com.fasterxml.jackson.core.JsonToken |
_decodeScalar(org.yaml.snakeyaml.events.ScalarEvent scalar) |
protected void |
_finishString() |
protected com.fasterxml.jackson.core.JsonLocation |
_locationFor(org.yaml.snakeyaml.error.Mark m) |
protected java.lang.Boolean |
_matchYAMLBoolean(java.lang.String value,
int len) |
protected void |
_parseNumericValue(int expType) |
com.fasterxml.jackson.core.JsonParser |
configure(YAMLParser.Feature f,
boolean state)
Method for enabling or disabling specified CSV feature
(check
YAMLParser.Feature for list of features) |
com.fasterxml.jackson.core.JsonParser |
disable(YAMLParser.Feature f)
Method for disabling specified CSV feature
(check
YAMLParser.Feature for list of features) |
com.fasterxml.jackson.core.JsonParser |
enable(YAMLParser.Feature f)
Method for enabling specified CSV feature
(check
YAMLParser.Feature for list of features) |
byte[] |
getBinaryValue(com.fasterxml.jackson.core.Base64Variant variant) |
com.fasterxml.jackson.core.ObjectCodec |
getCodec() |
java.lang.String |
getCurrentAnchor()
Method that can be used to check if the current token has an
associated anchor (id to reference via Alias)
|
com.fasterxml.jackson.core.JsonLocation |
getCurrentLocation() |
java.lang.String |
getCurrentName() |
java.lang.Object |
getEmbeddedObject() |
java.lang.String |
getText() |
char[] |
getTextCharacters() |
int |
getTextLength() |
int |
getTextOffset() |
com.fasterxml.jackson.core.JsonLocation |
getTokenLocation() |
boolean |
hasTextCharacters() |
boolean |
isCurrentAlias()
Method that can be used to check whether current token was
created from YAML Alias token (reference to an anchor).
|
boolean |
isEnabled(YAMLParser.Feature f)
Method for checking whether specified CSV
YAMLParser.Feature
is enabled. |
protected boolean |
loadMore() |
com.fasterxml.jackson.core.JsonToken |
nextToken() |
void |
setCodec(com.fasterxml.jackson.core.ObjectCodec c) |
com.fasterxml.jackson.core.Version |
version() |
_decodeBase64Escape, _decodeBase64Escape, _decodeEscaped, _getByteArrayBuilder, _handleEOF, _releaseBuffers, _reportMismatchedEndMarker, close, convertNumberToBigDecimal, convertNumberToBigInteger, convertNumberToDouble, convertNumberToInt, convertNumberToLong, getBigIntegerValue, getDecimalValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getNumberType, getNumberValue, getParsingContext, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, isClosed, loadMoreGuaranteed, overrideCurrentName, reportInvalidBase64Char, reportInvalidBase64Char, reportInvalidNumber, reportOverflowInt, reportOverflowLong, reportUnexpectedNumberChar, reset, resetAsNaN, resetFloat, resetInt_constructError, _decodeBase64, _getCharDesc, _handleUnrecognizedCharacterEscape, _reportBase64EOF, _reportError, _reportInvalidBase64, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportUnexpectedChar, _throwInternal, _throwInvalidSpace, _throwUnquotedSpace, _wrapError, clearCurrentToken, getCurrentToken, getLastClearedToken, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsLong, getValueAsString, hasCurrentToken, nextValue, skipChildren_constructError, _reportUnsupportedOperation, canUseSchema, configure, disable, enable, getBinaryValue, getBooleanValue, getByteValue, getInputSource, getSchema, getShortValue, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsLong, getValueAsString, isEnabled, isExpectedStartArrayToken, nextBooleanValue, nextFieldName, nextIntValue, nextLongValue, nextTextValue, readBinaryValue, readBinaryValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, releaseBuffered, requiresCustomCodec, setSchemaprotected com.fasterxml.jackson.core.ObjectCodec _objectCodec
protected int _yamlFeatures
protected java.io.Reader _reader
Reader to be able to
auto-close it (if required to)protected org.yaml.snakeyaml.parser.ParserImpl _yamlParser
protected org.yaml.snakeyaml.events.Event _lastEvent
protected java.lang.String _textValue
protected java.lang.String _currentFieldName
protected boolean _currentIsAlias
protected java.lang.String _currentAnchor
public YAMLParser(com.fasterxml.jackson.core.io.IOContext ctxt,
com.fasterxml.jackson.core.util.BufferRecycler br,
int parserFeatures,
int csvFeatures,
com.fasterxml.jackson.core.ObjectCodec codec,
java.io.Reader reader)
public com.fasterxml.jackson.core.ObjectCodec getCodec()
getCodec in class com.fasterxml.jackson.core.JsonParserpublic void setCodec(com.fasterxml.jackson.core.ObjectCodec c)
setCodec in class com.fasterxml.jackson.core.JsonParserpublic boolean isCurrentAlias()
public java.lang.String getCurrentAnchor()
public com.fasterxml.jackson.core.Version version()
version in interface com.fasterxml.jackson.core.Versionedversion in class com.fasterxml.jackson.core.base.ParserBaseprotected boolean loadMore()
throws java.io.IOException
loadMore in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptionprotected void _finishString()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
_finishString in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected void _closeInput()
throws java.io.IOException
_closeInput in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptionpublic com.fasterxml.jackson.core.JsonParser enable(YAMLParser.Feature f)
YAMLParser.Feature for list of features)public com.fasterxml.jackson.core.JsonParser disable(YAMLParser.Feature f)
YAMLParser.Feature for list of features)public com.fasterxml.jackson.core.JsonParser configure(YAMLParser.Feature f, boolean state)
YAMLParser.Feature for list of features)public boolean isEnabled(YAMLParser.Feature f)
YAMLParser.Feature
is enabled.public com.fasterxml.jackson.core.JsonLocation getTokenLocation()
getTokenLocation in class com.fasterxml.jackson.core.base.ParserBasepublic com.fasterxml.jackson.core.JsonLocation getCurrentLocation()
getCurrentLocation in class com.fasterxml.jackson.core.base.ParserBaseprotected com.fasterxml.jackson.core.JsonLocation _locationFor(org.yaml.snakeyaml.error.Mark m)
public com.fasterxml.jackson.core.JsonToken nextToken()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
nextToken in class com.fasterxml.jackson.core.base.ParserMinimalBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected com.fasterxml.jackson.core.JsonToken _decodeScalar(org.yaml.snakeyaml.events.ScalarEvent scalar)
protected java.lang.Boolean _matchYAMLBoolean(java.lang.String value,
int len)
protected com.fasterxml.jackson.core.JsonToken _decodeNumberScalar(java.lang.String value,
int len)
public boolean hasTextCharacters()
hasTextCharacters in class com.fasterxml.jackson.core.base.ParserBasepublic java.lang.String getText()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
getText in class com.fasterxml.jackson.core.base.ParserMinimalBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic java.lang.String getCurrentName()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
getCurrentName in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic char[] getTextCharacters()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
getTextCharacters in class com.fasterxml.jackson.core.base.ParserMinimalBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic int getTextLength()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
getTextLength in class com.fasterxml.jackson.core.base.ParserMinimalBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic int getTextOffset()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
getTextOffset in class com.fasterxml.jackson.core.base.ParserMinimalBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic java.lang.Object getEmbeddedObject()
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
getEmbeddedObject in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant variant)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
getBinaryValue in class com.fasterxml.jackson.core.base.ParserMinimalBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionprotected void _parseNumericValue(int expType)
throws java.io.IOException,
com.fasterxml.jackson.core.JsonParseException
_parseNumericValue in class com.fasterxml.jackson.core.base.ParserBasejava.io.IOExceptioncom.fasterxml.jackson.core.JsonParseExceptionCopyright © 2013. All Rights Reserved.