public class JacksonMetadata extends Object implements Iterable<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition>
| Constructor and Description |
|---|
JacksonMetadata(com.fasterxml.jackson.databind.ObjectMapper mapper,
Class<?> type)
Creates a new
JacksonMetadata instance for the given ObjectMapper and type. |
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition |
getDefinitionFor(PersistentProperty<?> property)
Returns the
BeanPropertyDefinition for the given PersistentProperty. |
ResourceDescription |
getFallbackDescription(ResourceMetadata ownerMetadata,
com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition definition)
Returns the fallback
ResourceDescription to be used for the given BeanPropertyDefinition. |
com.fasterxml.jackson.databind.JsonSerializer<?> |
getTypeSerializer(Class<?> type)
Returns the
JsonSerializer for the given type, or null if none available. |
boolean |
isExported(PersistentProperty<?> property)
Check if a given property for a type is available to be exported, i.e. serialized via Jackson.
|
boolean |
isReadOnly(PersistentProperty<?> property)
Returns whether the given
PersistentProperty is considered read-only by Jackson. |
boolean |
isValueType()
Returns whether the backing type is considered a Jackson value type.
|
Iterator<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic JacksonMetadata(com.fasterxml.jackson.databind.ObjectMapper mapper,
Class<?> type)
JacksonMetadata instance for the given ObjectMapper and type.mapper - must not be null.type - must not be null.public com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition getDefinitionFor(PersistentProperty<?> property)
BeanPropertyDefinition for the given PersistentProperty.property - must not be null.PersistentProperty.public ResourceDescription getFallbackDescription(ResourceMetadata ownerMetadata, com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition definition)
ResourceDescription to be used for the given BeanPropertyDefinition.ownerMetadata - must not be null.definition - must not be null.public boolean isExported(PersistentProperty<?> property)
property - must not be null.public boolean isValueType()
public boolean isReadOnly(PersistentProperty<?> property)
PersistentProperty is considered read-only by Jackson.property - must not be null.public com.fasterxml.jackson.databind.JsonSerializer<?> getTypeSerializer(Class<?> type)
JsonSerializer for the given type, or null if none available.type - must not be null.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.