public class EnumReader extends ValueReader
Map
for efficient conversion from id (gotten with Enum.toString()
to value.
In future we could consider alternatively allowing use of
Enum.name()
for id.
Modifier and Type | Field and Description |
---|---|
protected Object[] |
_byIndex |
protected Map<String,Object> |
_byName |
Constructor and Description |
---|
EnumReader(Object[] byIndex,
Map<String,Object> byName) |
Modifier and Type | Method and Description |
---|---|
Object |
read(JSONReader reader,
JsonParser p) |
Object |
readNext(JSONReader reader,
JsonParser p) |
_tokenDesc, _tokenDesc
protected final Object[] _byIndex
public Object readNext(JSONReader reader, JsonParser p) throws IOException
readNext
in class ValueReader
IOException
public Object read(JSONReader reader, JsonParser p) throws IOException
read
in class ValueReader
IOException
Copyright © 2014–2015 FasterXML. All rights reserved.