Class Jackson2Metadata

java.lang.Object
org.springframework.data.rest.webmvc.json.Jackson2Metadata
All Implemented Interfaces:
Iterable<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition>

@Deprecated(since="5.0", forRemoval=true) public class Jackson2Metadata extends Object implements Iterable<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition>
Deprecated, for removal: This API element is subject to removal in a future version.
Value object to abstract Jackson based bean metadata of a given type.
Author:
Oliver Gierke, Greg Turnquist
  • Constructor Summary

    Constructors
    Constructor
    Description
    Jackson2Metadata(com.fasterxml.jackson.databind.ObjectMapper mapper, Class<?> type)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new Jackson2Metadata instance for the given ObjectMapper and type.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the BeanPropertyDefinition for the given PersistentProperty.
    getFallbackDescription(ResourceMetadata ownerMetadata, com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition definition)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the fallback ResourceDescription to be used for the given BeanPropertyDefinition.
    @Nullable com.fasterxml.jackson.databind.JsonSerializer<?>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the JsonSerializer for the given type, or null if none available.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Check if a given property for a type is available to be exported, i.e. serialized via Jackson.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns whether the given PersistentProperty is considered read-only by Jackson.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns whether the backing type is considered a Jackson value type.
    Iterator<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition>
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface Iterable

    forEach, spliterator
  • Constructor Details

    • Jackson2Metadata

      public Jackson2Metadata(com.fasterxml.jackson.databind.ObjectMapper mapper, Class<?> type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new Jackson2Metadata instance for the given ObjectMapper and type.
      Parameters:
      mapper - must not be null.
      type - must not be null.
  • Method Details

    • getDefinitionFor

      public @Nullable com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition getDefinitionFor(PersistentProperty<?> property)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the BeanPropertyDefinition for the given PersistentProperty.
      Parameters:
      property - must not be null.
      Returns:
      can be null in case there's no Jackson property to be exposed for the given PersistentProperty.
    • getFallbackDescription

      public ResourceDescription getFallbackDescription(ResourceMetadata ownerMetadata, com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition definition)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the fallback ResourceDescription to be used for the given BeanPropertyDefinition.
      Parameters:
      ownerMetadata - must not be null.
      definition - must not be null.
      Returns:
    • isExported

      public boolean isExported(PersistentProperty<?> property)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Check if a given property for a type is available to be exported, i.e. serialized via Jackson.
      Parameters:
      property - must not be null.
      Returns:
    • isValueType

      public boolean isValueType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns whether the backing type is considered a Jackson value type.
      Returns:
      the isValue
    • isReadOnly

      public boolean isReadOnly(PersistentProperty<?> property)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns whether the given PersistentProperty is considered read-only by Jackson.
      Parameters:
      property - must not be null.
      Returns:
    • getTypeSerializer

      public @Nullable com.fasterxml.jackson.databind.JsonSerializer<?> getTypeSerializer(Class<?> type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the JsonSerializer for the given type, or null if none available.
      Parameters:
      type - must not be null.
      Returns:
    • iterator

      public Iterator<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition> iterator()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      iterator in interface Iterable<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition>