java.io.Closeable, java.lang.AutoCloseable, XContentParserJsonXContentParserpublic abstract class AbstractXContentParser extends java.lang.Object implements XContentParser
XContentParser.NumberType, XContentParser.Token| Modifier and Type | Field | Description |
|---|---|---|
static boolean |
DEFAULT_NUMBER_COERCE_POLICY |
| Constructor | Description |
|---|---|
AbstractXContentParser(NamedXContentRegistry xContentRegistry,
DeprecationHandler deprecationHandler) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
booleanValue() |
|
boolean |
booleanValueLenient() |
Deprecated.
|
java.nio.CharBuffer |
charBufferOrNull() |
|
protected abstract boolean |
doBooleanValue() |
|
protected abstract double |
doDoubleValue() |
|
protected abstract float |
doFloatValue() |
|
protected abstract int |
doIntValue() |
|
protected abstract long |
doLongValue() |
|
protected abstract short |
doShortValue() |
|
double |
doubleValue() |
|
double |
doubleValue(boolean coerce) |
|
float |
floatValue() |
|
float |
floatValue(boolean coerce) |
|
DeprecationHandler |
getDeprecationHandler() |
The callback to notify when parsing encounters a deprecated field.
|
NamedXContentRegistry |
getXContentRegistry() |
The registry used to resolve
XContentParser.namedObject(Class, String, Object). |
int |
intValue() |
|
int |
intValue(boolean coerce) |
|
boolean |
isBooleanValue() |
|
boolean |
isBooleanValueLenient() |
Deprecated.
|
abstract boolean |
isClosed() |
|
java.util.List<java.lang.Object> |
list() |
|
java.util.List<java.lang.Object> |
listOrderedMap() |
|
long |
longValue() |
|
long |
longValue(boolean coerce) |
|
java.util.Map<java.lang.String,java.lang.Object> |
map() |
|
java.util.Map<java.lang.String,java.lang.Object> |
mapOrdered() |
|
java.util.Map<java.lang.String,java.lang.String> |
mapStrings() |
|
java.util.Map<java.lang.String,java.lang.String> |
mapStringsOrdered() |
|
<T> T |
namedObject(java.lang.Class<T> categoryClass,
java.lang.String name,
java.lang.Object context) |
Parse an object by name.
|
short |
shortValue() |
|
short |
shortValue(boolean coerce) |
|
java.lang.String |
textOrNull() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbinaryValue, charBuffer, contentType, currentName, currentToken, getTokenLocation, hasTextCharacters, nextToken, numberType, numberValue, objectBytes, objectText, skipChildren, text, textCharacters, textLength, textOffsetpublic static final boolean DEFAULT_NUMBER_COERCE_POLICY
public AbstractXContentParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler)
public boolean isBooleanValue()
throws java.io.IOException
isBooleanValue in interface XContentParsertrue or false) or one of "false", "true".java.io.IOExceptionpublic boolean booleanValue()
throws java.io.IOException
booleanValue in interface XContentParserjava.io.IOException@Deprecated
public boolean isBooleanValueLenient()
throws java.io.IOException
XContentParserisBooleanValueLenient in interface XContentParserjava.io.IOException@Deprecated
public boolean booleanValueLenient()
throws java.io.IOException
booleanValueLenient in interface XContentParserjava.io.IOExceptionprotected abstract boolean doBooleanValue()
throws java.io.IOException
java.io.IOExceptionpublic short shortValue()
throws java.io.IOException
shortValue in interface XContentParserjava.io.IOExceptionpublic short shortValue(boolean coerce)
throws java.io.IOException
shortValue in interface XContentParserjava.io.IOExceptionprotected abstract short doShortValue()
throws java.io.IOException
java.io.IOExceptionpublic int intValue()
throws java.io.IOException
intValue in interface XContentParserjava.io.IOExceptionpublic int intValue(boolean coerce)
throws java.io.IOException
intValue in interface XContentParserjava.io.IOExceptionprotected abstract int doIntValue()
throws java.io.IOException
java.io.IOExceptionpublic long longValue()
throws java.io.IOException
longValue in interface XContentParserjava.io.IOExceptionpublic long longValue(boolean coerce)
throws java.io.IOException
longValue in interface XContentParserjava.io.IOExceptionprotected abstract long doLongValue()
throws java.io.IOException
java.io.IOExceptionpublic float floatValue()
throws java.io.IOException
floatValue in interface XContentParserjava.io.IOExceptionpublic float floatValue(boolean coerce)
throws java.io.IOException
floatValue in interface XContentParserjava.io.IOExceptionprotected abstract float doFloatValue()
throws java.io.IOException
java.io.IOExceptionpublic double doubleValue()
throws java.io.IOException
doubleValue in interface XContentParserjava.io.IOExceptionpublic double doubleValue(boolean coerce)
throws java.io.IOException
doubleValue in interface XContentParserjava.io.IOExceptionprotected abstract double doDoubleValue()
throws java.io.IOException
java.io.IOExceptionpublic final java.lang.String textOrNull()
throws java.io.IOException
textOrNull in interface XContentParserjava.io.IOExceptionpublic java.nio.CharBuffer charBufferOrNull()
throws java.io.IOException
charBufferOrNull in interface XContentParserjava.io.IOExceptionpublic java.util.Map<java.lang.String,java.lang.Object> map()
throws java.io.IOException
map in interface XContentParserjava.io.IOExceptionpublic java.util.Map<java.lang.String,java.lang.Object> mapOrdered()
throws java.io.IOException
mapOrdered in interface XContentParserjava.io.IOExceptionpublic java.util.Map<java.lang.String,java.lang.String> mapStrings()
throws java.io.IOException
mapStrings in interface XContentParserjava.io.IOExceptionpublic java.util.Map<java.lang.String,java.lang.String> mapStringsOrdered()
throws java.io.IOException
mapStringsOrdered in interface XContentParserjava.io.IOExceptionpublic java.util.List<java.lang.Object> list()
throws java.io.IOException
list in interface XContentParserjava.io.IOExceptionpublic java.util.List<java.lang.Object> listOrderedMap()
throws java.io.IOException
listOrderedMap in interface XContentParserjava.io.IOExceptionpublic <T> T namedObject(java.lang.Class<T> categoryClass,
java.lang.String name,
java.lang.Object context)
throws java.io.IOException
XContentParsernamedObject in interface XContentParserjava.io.IOExceptionpublic NamedXContentRegistry getXContentRegistry()
XContentParserXContentParser.namedObject(Class, String, Object). Use this when building a sub-parser from this parser.getXContentRegistry in interface XContentParserpublic abstract boolean isClosed()
isClosed in interface XContentParserpublic DeprecationHandler getDeprecationHandler()
XContentParsergetDeprecationHandler in interface XContentParser