java.util.Map
for efficient conversion from id (gotten with java.lang.Enum#toString()
to value.
In future we could consider alternatively allowing use of
java. for id.
| Modifier and Type | Field and Description |
|---|---|
| protected final Object[] | |
| protected final Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private Object | |
| private String | |
| public Object | read(JSONReader
Context object that allows calling other read methods for contained
values of different types (for example for collection readers). reader, JsonParser Underlying parser used for reading decoded token stream p)Implements abstract com. Method called to deserialize value of type supported by this reader, using given parser. |
| public Object | readNext(JSONReader
Context object that allows calling other read methods for contained
values of different types (for example for collection readers). reader, JsonParser Underlying parser used for reading decoded token stream p)Overrides com. Method called to deserialize value of type supported by this reader, using given parser. |
| _byIndex | back to summary |
|---|---|
| protected final Object[] _byIndex | |
| _byName | back to summary |
|---|---|
| protected final Map<String, Object> _byName | |
| EnumReader | back to summary |
|---|---|
| public EnumReader(Class<?> enumType, Object[] byIndex, Map<String, Object> byName) | |
| _enum | back to summary |
|---|---|
| private Object _enum(String id) throws IOException | |
| desc | back to summary |
|---|---|
| private String desc() | |
| read | back to summary |
|---|---|
| public Object read(JSONReader reader, JsonParser p) throws IOException Implements abstract com. Doc from com. Method called to deserialize value of type supported by this reader, using given parser. Parser is already positioned to the (first) token of the value to read.
| |
| readNext | back to summary |
|---|---|
| public Object readNext(JSONReader reader, JsonParser p) throws IOException Overrides com. Doc from com. Method called to deserialize value of type supported by this reader, using given parser. Parser is not yet positioned to the (first) token of the value to read and needs to be advanced.
Default implementation simply calls `p.nextToken()` first, then calls
{#link
| |