public class ArrayReader extends ValueReader
Modifier and Type | Field and Description |
---|---|
protected Class<?> |
_elementType |
protected ValueReader |
_valueReader |
_valueType
Constructor and Description |
---|
ArrayReader(Class<?> arrayType,
Class<?> elementType,
ValueReader vr) |
Modifier and Type | Method and Description |
---|---|
Object |
read(JSONReader r,
JsonParser p)
Method called to deserialize value of type supported by this reader, using
given parser.
|
Object |
readNext(JSONReader r,
JsonParser p)
Method called to deserialize value of type supported by this reader, using
given parser.
|
_tokenDesc, _tokenDesc, valueType
protected final Class<?> _elementType
protected final ValueReader _valueReader
public ArrayReader(Class<?> arrayType, Class<?> elementType, ValueReader vr)
public Object readNext(JSONReader r, JsonParser p) throws IOException
ValueReader
Default implementation simply calls `p.nextToken()` first, then calls
{#link ValueReader.read(JSONReader, JsonParser)
, but some implementations
may decide to implement this differently to use (slightly) more efficient
accessor in JsonParser
, like JsonParser.nextIntValue(int)
.
readNext
in class ValueReader
r
- Context object that allows calling other read methods for contained
values of different types (for example for collection readers).p
- Underlying parser used for reading decoded token streamIOException
public Object read(JSONReader r, JsonParser p) throws IOException
ValueReader
read
in class ValueReader
r
- Context object that allows calling other read methods for contained
values of different types (for example for collection readers).p
- Underlying parser used for reading decoded token streamIOException
Copyright © 2020 FasterXML. All rights reserved.