public abstract class AbstractXContentParser extends java.lang.Object implements XContentParser
XContentParser.NumberType, XContentParser.Token| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_NUMBER_COERCE_POLICY |
| Constructor and Description |
|---|
AbstractXContentParser(NamedXContentRegistry xContentRegistry) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanValue() |
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) |
NamedXContentRegistry |
getXContentRegistry()
The registry used to resolve
XContentParser.namedObject(Class, String, Object). |
int |
intValue() |
int |
intValue(boolean coerce) |
boolean |
isBooleanValue()
returns true if the current value is boolean in nature.
|
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() |
org.apache.lucene.util.BytesRef |
utf8BytesOrNull()
Returns a BytesRef holding UTF-8 bytes or null if a null value is
XContentParser.Token.VALUE_NULL. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbinaryValue, contentType, currentName, currentToken, getTokenLocation, hasTextCharacters, nextToken, numberType, numberValue, objectBytes, objectText, skipChildren, text, textCharacters, textLength, textOffset, utf8Bytesclosepublic static final boolean DEFAULT_NUMBER_COERCE_POLICY
public AbstractXContentParser(NamedXContentRegistry xContentRegistry)
public boolean isBooleanValue()
throws java.io.IOException
XContentParserisBooleanValue in interface XContentParserjava.io.IOExceptionpublic boolean booleanValue()
throws java.io.IOException
booleanValue 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 org.apache.lucene.util.BytesRef utf8BytesOrNull()
throws java.io.IOException
XContentParserXContentParser.Token.VALUE_NULL.
This method should be used to read text only binary content should be read through XContentParser.binaryValue()utf8BytesOrNull 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 XContentParser