java.lang.Object
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.jsontype.impl.TypeNameIdResolver
All Implemented Interfaces:
TypeIdResolver

public class TypeNameIdResolver extends TypeIdResolverBase
  • Field Details

    • _config

      protected final MapperConfig<?> _config
    • _typeToId

      protected final ConcurrentHashMap<String,String> _typeToId
      Mappings from class name to type id, used for serialization.

      Since lazily constructed will require synchronization (either internal by type, or external)

    • _idToType

      protected final Map<String,JavaType> _idToType
      Mappings from type id to JavaType, used for deserialization.

      Eagerly constructed, not modified, can use regular unsynchronized Map.

    • _caseInsensitive

      protected final boolean _caseInsensitive
      Since:
      2.11
  • Constructor Details

  • Method Details

    • construct

      public static TypeNameIdResolver construct(MapperConfig<?> config, JavaType baseType, Collection<NamedType> subtypes, boolean forSer, boolean forDeser)
    • getMechanism

      public JsonTypeInfo.Id getMechanism()
      Description copied from interface: TypeIdResolver
      Accessor for mechanism that this resolver uses for determining type id from type. Mostly informational; not required to be called or used.
    • idFromValue

      public String idFromValue(Object value)
      Description copied from interface: TypeIdResolver
      Method called to serialize type of the type of given value as a String to include in serialized JSON content.
    • idFromClass

      protected String idFromClass(Class<?> clazz)
    • idFromValueAndType

      public String idFromValueAndType(Object value, Class<?> type)
      Description copied from interface: TypeIdResolver
      Alternative method used for determining type from combination of value and type, using suggested type (that serializer provides) and possibly value of that type. Most common implementation will use suggested type as is.
    • typeFromId

      public JavaType typeFromId(DatabindContext context, String id)
      Description copied from interface: TypeIdResolver
      Method called to resolve type from given type identifier.
      Specified by:
      typeFromId in interface TypeIdResolver
      Overrides:
      typeFromId in class TypeIdResolverBase
    • _typeFromId

      protected JavaType _typeFromId(String id)
    • getDescForKnownTypeIds

      public String getDescForKnownTypeIds()
      Description copied from class: TypeIdResolverBase
      Helper method used to get a simple description of all known type ids, for use in error messages.
      Specified by:
      getDescForKnownTypeIds in interface TypeIdResolver
      Overrides:
      getDescForKnownTypeIds in class TypeIdResolverBase
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • _defaultTypeId

      protected static String _defaultTypeId(Class<?> cls)
      If no name was explicitly given for a class, we will just use non-qualified class name