public class BeanReader extends ValueReader
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
_aliasMapping
Mapping of aliased names to primary names (direct linkage unfortunately
impractical due to implementation limits).
|
protected Constructor<?> |
_defaultCtor |
protected Set<String> |
_ignorableNames |
protected Constructor<?> |
_longCtor |
protected Map<String,BeanPropertyReader> |
_propsByName |
protected Constructor<?> |
_stringCtor |
_valueType
Constructor and Description |
---|
BeanReader(Class<?> type,
Map<String,BeanPropertyReader> props,
Constructor<?> defaultCtor,
Constructor<?> stringCtor,
Constructor<?> longCtor)
Deprecated.
|
BeanReader(Class<?> type,
Map<String,BeanPropertyReader> props,
Constructor<?> defaultCtor,
Constructor<?> stringCtor,
Constructor<?> longCtor,
Set<String> ignorableNames,
Map<String,String> aliasMapping)
Constructors used for deserialization use case
|
Modifier and Type | Method and Description |
---|---|
protected IOException |
_reportProblem(JsonParser p) |
protected Object |
create() |
protected Object |
create(long l) |
protected Object |
create(String str) |
BeanPropertyReader |
findProperty(String name) |
protected void |
handleUnknown(JSONReader reader,
JsonParser parser,
String fieldName) |
Map<String,BeanPropertyReader> |
propertiesByName() |
Object |
read(JSONReader r,
JsonParser p)
Method used for deserialization; will read an instance of the bean
type 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 Map<String,BeanPropertyReader> _propsByName
protected final Map<String,String> _aliasMapping
protected final Constructor<?> _defaultCtor
protected final Constructor<?> _stringCtor
protected final Constructor<?> _longCtor
public BeanReader(Class<?> type, Map<String,BeanPropertyReader> props, Constructor<?> defaultCtor, Constructor<?> stringCtor, Constructor<?> longCtor, Set<String> ignorableNames, Map<String,String> aliasMapping)
@Deprecated public BeanReader(Class<?> type, Map<String,BeanPropertyReader> props, Constructor<?> defaultCtor, Constructor<?> stringCtor, Constructor<?> longCtor)
public Map<String,BeanPropertyReader> propertiesByName()
public BeanPropertyReader findProperty(String name)
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
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
protected void handleUnknown(JSONReader reader, JsonParser parser, String fieldName) throws IOException
IOException
protected IOException _reportProblem(JsonParser p)
Copyright © 2020 FasterXML. All rights reserved.