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 | Description |
---|---|---|
protected Object[] |
_byIndex |
|
protected Map<String,Object> |
_byName |
Constructor | Description |
---|---|
EnumReader(Object[] byIndex,
Map<String,Object> byName) |
Modifier and Type | Method | Description |
---|---|---|
Object |
read(JSONReader reader,
com.fasterxml.jackson.core.JsonParser p) |
|
Object |
readNext(JSONReader reader,
com.fasterxml.jackson.core.JsonParser p) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
_tokenDesc, _tokenDesc
protected final Object[] _byIndex
public Object readNext(JSONReader reader, com.fasterxml.jackson.core.JsonParser p) throws IOException
readNext
in class ValueReader
IOException
public Object read(JSONReader reader, com.fasterxml.jackson.core.JsonParser p) throws IOException
read
in class ValueReader
IOException
Copyright © 2018. All rights reserved.