Class ExternalTypeHandler
- java.lang.Object
-
- org.codehaus.jackson.map.deser.impl.ExternalTypeHandler
-
public class ExternalTypeHandler extends Object
Helper class that is used to flatten JSON structure when using "external type id" (seeJsonTypeInfo.As.EXTERNAL_PROPERTY). This is needed to store temporary state and buffer tokens, as the structure is rearranged a bit so that actual type deserializer can resolve type and finalize deserialization.- Since:
- 1.9
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExternalTypeHandler.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protectedExternalTypeHandler(ExternalTypeHandler h)protectedExternalTypeHandler(org.codehaus.jackson.map.deser.impl.ExternalTypeHandler.ExtTypedProperty[] properties, HashMap<String,Integer> nameToPropertyIndex, String[] typeIds, TokenBuffer[] tokens)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_deserialize(JsonParser jp, DeserializationContext ctxt, Object bean, int index)Objectcomplete(JsonParser jp, DeserializationContext ctxt, Object bean)booleanhandleToken(JsonParser jp, DeserializationContext ctxt, String propName, Object bean)Method called to ask handler to handleExternalTypeHandlerstart()
-
-
-
Constructor Detail
-
ExternalTypeHandler
protected ExternalTypeHandler(org.codehaus.jackson.map.deser.impl.ExternalTypeHandler.ExtTypedProperty[] properties, HashMap<String,Integer> nameToPropertyIndex, String[] typeIds, TokenBuffer[] tokens)
-
ExternalTypeHandler
protected ExternalTypeHandler(ExternalTypeHandler h)
-
-
Method Detail
-
start
public ExternalTypeHandler start()
-
handleToken
public boolean handleToken(JsonParser jp, DeserializationContext ctxt, String propName, Object bean) throws IOException, JsonProcessingException
Method called to ask handler to handle- Throws:
IOExceptionJsonProcessingException
-
complete
public Object complete(JsonParser jp, DeserializationContext ctxt, Object bean) throws IOException, JsonProcessingException
- Throws:
IOExceptionJsonProcessingException
-
_deserialize
protected final void _deserialize(JsonParser jp, DeserializationContext ctxt, Object bean, int index) throws IOException, JsonProcessingException
- Throws:
IOExceptionJsonProcessingException
-
-