org.apache.activemq.apollo.dto
Class ApolloTypeIdResolver

java.lang.Object
  extended by org.apache.activemq.apollo.dto.ApolloTypeIdResolver
All Implemented Interfaces:
org.codehaus.jackson.map.jsontype.TypeIdResolver

public class ApolloTypeIdResolver
extends java.lang.Object
implements org.codehaus.jackson.map.jsontype.TypeIdResolver


Field Summary
protected  java.util.HashMap<java.lang.String,org.codehaus.jackson.type.JavaType> idToType
           
protected  java.util.HashMap<java.lang.Class<?>,java.lang.String> typeToId
           
 
Constructor Summary
ApolloTypeIdResolver()
           
 
Method Summary
 org.codehaus.jackson.annotate.JsonTypeInfo.Id getMechanism()
           
 java.lang.String idFromValue(java.lang.Object value)
           
 java.lang.String idFromValueAndType(java.lang.Object value, java.lang.Class<?> aClass)
           
 void init(org.codehaus.jackson.type.JavaType baseType)
           
 org.codehaus.jackson.type.JavaType typeFromId(java.lang.String id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeToId

protected final java.util.HashMap<java.lang.Class<?>,java.lang.String> typeToId

idToType

protected final java.util.HashMap<java.lang.String,org.codehaus.jackson.type.JavaType> idToType
Constructor Detail

ApolloTypeIdResolver

public ApolloTypeIdResolver()
Method Detail

init

public void init(org.codehaus.jackson.type.JavaType baseType)
Specified by:
init in interface org.codehaus.jackson.map.jsontype.TypeIdResolver

getMechanism

public org.codehaus.jackson.annotate.JsonTypeInfo.Id getMechanism()
Specified by:
getMechanism in interface org.codehaus.jackson.map.jsontype.TypeIdResolver

idFromValue

public java.lang.String idFromValue(java.lang.Object value)
Specified by:
idFromValue in interface org.codehaus.jackson.map.jsontype.TypeIdResolver

idFromValueAndType

public java.lang.String idFromValueAndType(java.lang.Object value,
                                           java.lang.Class<?> aClass)
Specified by:
idFromValueAndType in interface org.codehaus.jackson.map.jsontype.TypeIdResolver

typeFromId

public org.codehaus.jackson.type.JavaType typeFromId(java.lang.String id)
Specified by:
typeFromId in interface org.codehaus.jackson.map.jsontype.TypeIdResolver


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.