public class BasicBeanDescription extends BeanDescription
BeanDescription implementation used by Jackson.
Although sub-classing is a theoretical possibility there are no known use cases for that, nor is such usage tested or supported. Separation from API is mostly to isolate some implementation details here and keep API simple.
 Note that since 2.6 this class has been a thin shell around
 POJOPropertiesCollector, which handles most of actual work.
| Modifier and Type | Field and Description | 
|---|---|
| protected AnnotationIntrospector | _annotationIntrospector | 
| protected TypeBindings | _bindingsWe may need type bindings for the bean type. | 
| protected AnnotatedClass | _classInfoInformation collected about the class introspected. | 
| protected MapperConfig<?> | _config | 
| protected ObjectIdInfo | _objectIdInfoDetails of Object Id to include, if any | 
| protected POJOPropertiesCollector | _propCollectorWe will hold a reference to the collector in cases where
 information is lazily accessed and constructed; properties
 are only accessed when they are actually needed. | 
| protected List<BeanPropertyDefinition> | _propertiesProperties collected for the POJO; initialized as needed. | 
_type| Modifier | Constructor and Description | 
|---|---|
| protected  | BasicBeanDescription(MapperConfig<?> config,
                    JavaType type,
                    AnnotatedClass classDef,
                    List<BeanPropertyDefinition> props)Alternate constructor used in cases where property information is not needed,
 only class info. | 
| protected  | BasicBeanDescription(POJOPropertiesCollector coll) | 
| protected  | BasicBeanDescription(POJOPropertiesCollector coll,
                    JavaType type,
                    AnnotatedClass classDef) | 
| Modifier and Type | Method and Description | 
|---|---|
| Converter<Object,Object> | _createConverter(Object converterDef) | 
| protected PropertyName | _findCreatorPropertyName(AnnotatedParameter param) | 
| LinkedHashMap<String,AnnotatedField> | _findPropertyFields(Collection<String> ignoredProperties,
                   boolean forSerialization) | 
| protected List<BeanPropertyDefinition> | _properties() | 
| boolean | addProperty(BeanPropertyDefinition def) | 
| TypeBindings | bindingsForBeanType()Accessor for type bindings that may be needed to fully resolve
 types of member object, such as return and argument types of
 methods and constructors, and types of fields. | 
| AnnotatedMember | findAnyGetter()Method used to locate the method of introspected class that
 implements  JsonAnyGetter. | 
| AnnotatedMethod | findAnySetter()Method used to locate the method of introspected class that
 implements  JsonAnySetter. | 
| Map<String,AnnotatedMember> | findBackReferenceProperties()Method for locating all back-reference properties (setters, fields) bean has | 
| List<PropertyName> | findCreatorParameterNames()Deprecated. 
 Since 2.5, does not seem to be used at all. | 
| List<String> | findCreatorPropertyNames()Deprecated. 
 Since 2.4, use  findCreatorParameterNames()instead. | 
| AnnotatedConstructor | findDefaultConstructor()Method that will locate the no-arg constructor for this class,
 if it has one, and that constructor has not been marked as
 ignorable. | 
| Converter<Object,Object> | findDeserializationConverter()Method for finding  Converterused for serializing instances
 of this class. | 
| com.fasterxml.jackson.annotation.JsonFormat.Value | findExpectedFormat(com.fasterxml.jackson.annotation.JsonFormat.Value defValue)Method for checking what is the expected format for POJO, as
 defined by defaults and possible annotations. | 
| Method | findFactoryMethod(Class<?>... expArgTypes)Method that can be called to find if introspected class declares
 a static "valueOf" factory method that returns an instance of
 introspected type, given one of acceptable types. | 
| Map<Object,AnnotatedMember> | findInjectables() | 
| AnnotatedMethod | findJsonValueMethod()Method for locating the getter method that is annotated with
  JsonValueannotation,
 if any. | 
| AnnotatedMethod | findMethod(String name,
          Class<?>[] paramTypes) | 
| Class<?> | findPOJOBuilder()Method for checking if the POJO type has annotations to
 indicate that a builder is to be used for instantiating
 instances and handling data binding, instead of standard
 bean deserializer. | 
| JsonPOJOBuilder.Value | findPOJOBuilderConfig()Method for finding configuration for POJO Builder class. | 
| List<BeanPropertyDefinition> | findProperties() | 
| BeanPropertyDefinition | findProperty(PropertyName name) | 
| Converter<Object,Object> | findSerializationConverter()Method for finding  Converterused for serializing instances
 of this class. | 
| com.fasterxml.jackson.annotation.JsonInclude.Include | findSerializationInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include defValue)Method for determining whether null properties should be written
 out for a Bean of introspected type. | 
| com.fasterxml.jackson.annotation.JsonInclude.Include | findSerializationInclusionForContent(com.fasterxml.jackson.annotation.JsonInclude.Include defValue) | 
| Constructor<?> | findSingleArgConstructor(Class<?>... argTypes)Method that can be called to locate a single-arg constructor that
 takes specified exact type (will not accept supertype constructors) | 
| static BasicBeanDescription | forDeserialization(POJOPropertiesCollector coll)Factory method to use for constructing an instance to use for building
 deserializers. | 
| static BasicBeanDescription | forOtherUse(MapperConfig<?> config,
           JavaType type,
           AnnotatedClass ac)Factory method to use for constructing an instance to use for purposes
 other than building serializers or deserializers; will only have information
 on class, not on properties. | 
| static BasicBeanDescription | forSerialization(POJOPropertiesCollector coll)Factory method to use for constructing an instance to use for building
 serializers. | 
| Annotations | getClassAnnotations()Method for accessing collection of annotations the bean
 class has. | 
| AnnotatedClass | getClassInfo()Method for accessing low-level information about Class this
 item describes. | 
| List<AnnotatedConstructor> | getConstructors() | 
| List<AnnotatedMethod> | getFactoryMethods() | 
| Set<String> | getIgnoredPropertyNames() | 
| ObjectIdInfo | getObjectIdInfo()Accessor for getting information about Object Id expected to
 be used for this POJO type, if any. | 
| boolean | hasKnownClassAnnotations()Method for checking whether class being described has any
 annotations recognized by registered annotation introspector. | 
| boolean | hasProperty(PropertyName name) | 
| Object | instantiateBean(boolean fixAccess)Method called to create a "default instance" of the bean, currently
 only needed for obtaining default field values which may be used for
 suppressing serialization of fields that have "not changed". | 
| protected boolean | isFactoryMethod(AnnotatedMethod am) | 
| boolean | removeProperty(String propName)Method that can be used to prune unwanted properties, during
 construction of serializers and deserializers. | 
| JavaType | resolveType(Type jdkType)Method for resolving given JDK type, using this bean as the
 generic type resolution context. | 
getBeanClass, getTypeprotected final POJOPropertiesCollector _propCollector
protected final MapperConfig<?> _config
protected final AnnotationIntrospector _annotationIntrospector
protected final AnnotatedClass _classInfo
protected TypeBindings _bindings
protected List<BeanPropertyDefinition> _properties
protected ObjectIdInfo _objectIdInfo
protected BasicBeanDescription(POJOPropertiesCollector coll, JavaType type, AnnotatedClass classDef)
protected BasicBeanDescription(MapperConfig<?> config, JavaType type, AnnotatedClass classDef, List<BeanPropertyDefinition> props)
protected BasicBeanDescription(POJOPropertiesCollector coll)
public static BasicBeanDescription forDeserialization(POJOPropertiesCollector coll)
public static BasicBeanDescription forSerialization(POJOPropertiesCollector coll)
public static BasicBeanDescription forOtherUse(MapperConfig<?> config, JavaType type, AnnotatedClass ac)
protected List<BeanPropertyDefinition> _properties()
public boolean removeProperty(String propName)
public boolean addProperty(BeanPropertyDefinition def)
public boolean hasProperty(PropertyName name)
public BeanPropertyDefinition findProperty(PropertyName name)
public AnnotatedClass getClassInfo()
BeanDescriptiongetClassInfo in class BeanDescriptionpublic ObjectIdInfo getObjectIdInfo()
BeanDescriptiongetObjectIdInfo in class BeanDescriptionpublic List<BeanPropertyDefinition> findProperties()
findProperties in class BeanDescriptionpublic AnnotatedMethod findJsonValueMethod()
BeanDescriptionJsonValue annotation,
 if any. If multiple ones are found,
 an error is reported by throwing IllegalArgumentExceptionfindJsonValueMethod in class BeanDescriptionpublic Set<String> getIgnoredPropertyNames()
getIgnoredPropertyNames in class BeanDescriptionpublic boolean hasKnownClassAnnotations()
BeanDescriptionhasKnownClassAnnotations in class BeanDescriptionpublic Annotations getClassAnnotations()
BeanDescriptiongetClassAnnotations in class BeanDescriptionpublic TypeBindings bindingsForBeanType()
BeanDescriptionbindingsForBeanType in class BeanDescriptionpublic JavaType resolveType(Type jdkType)
BeanDescriptionresolveType in class BeanDescriptionpublic AnnotatedConstructor findDefaultConstructor()
BeanDescriptionfindDefaultConstructor in class BeanDescriptionpublic AnnotatedMethod findAnySetter() throws IllegalArgumentException
BeanDescriptionJsonAnySetter. If no such method exists
 null is returned. If more than one are found, an exception
 is thrown.
 Additional checks are also made to see that method signature
 is acceptable: needs to take 2 arguments, first one String or
 Object; second any can be any type.findAnySetter in class BeanDescriptionIllegalArgumentExceptionpublic Map<Object,AnnotatedMember> findInjectables()
findInjectables in class BeanDescriptionpublic List<AnnotatedConstructor> getConstructors()
getConstructors in class BeanDescriptionpublic Object instantiateBean(boolean fixAccess)
BeanDescriptioninstantiateBean in class BeanDescriptionfixAccess - If true, method is allowed to fix access to the
   default constructor (to be able to call non-public constructor);
   if false, has to use constructor as is.public AnnotatedMethod findMethod(String name, Class<?>[] paramTypes)
findMethod in class BeanDescriptionpublic com.fasterxml.jackson.annotation.JsonFormat.Value findExpectedFormat(com.fasterxml.jackson.annotation.JsonFormat.Value defValue)
BeanDescriptionfindExpectedFormat in class BeanDescriptionpublic Converter<Object,Object> findSerializationConverter()
BeanDescriptionConverter used for serializing instances
 of this class.findSerializationConverter in class BeanDescriptionpublic com.fasterxml.jackson.annotation.JsonInclude.Include findSerializationInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include defValue)
findSerializationInclusion in class BeanDescriptionpublic com.fasterxml.jackson.annotation.JsonInclude.Include findSerializationInclusionForContent(com.fasterxml.jackson.annotation.JsonInclude.Include defValue)
findSerializationInclusionForContent in class BeanDescriptionpublic AnnotatedMember findAnyGetter() throws IllegalArgumentException
JsonAnyGetter.
 If no such method exists null is returned.
 If more than one are found, an exception is thrown.findAnyGetter in class BeanDescriptionIllegalArgumentExceptionpublic Map<String,AnnotatedMember> findBackReferenceProperties()
BeanDescriptionfindBackReferenceProperties in class BeanDescriptionpublic List<AnnotatedMethod> getFactoryMethods()
getFactoryMethods in class BeanDescriptionpublic Constructor<?> findSingleArgConstructor(Class<?>... argTypes)
BeanDescriptionfindSingleArgConstructor in class BeanDescriptionargTypes - Type(s) of the argument that we are looking forpublic Method findFactoryMethod(Class<?>... expArgTypes)
BeanDescriptionfindFactoryMethod in class BeanDescriptionexpArgTypes - Types that the matching single argument factory
   method can take: will also accept super types of these types
   (ie. arg just has to be assignable from expArgType)protected boolean isFactoryMethod(AnnotatedMethod am)
@Deprecated public List<String> findCreatorPropertyNames()
findCreatorParameterNames() instead.@Deprecated public List<PropertyName> findCreatorParameterNames()
protected PropertyName _findCreatorPropertyName(AnnotatedParameter param)
public Class<?> findPOJOBuilder()
BeanDescriptionfindPOJOBuilder in class BeanDescriptionpublic JsonPOJOBuilder.Value findPOJOBuilderConfig()
BeanDescriptionfindPOJOBuilderConfig in class BeanDescriptionpublic Converter<Object,Object> findDeserializationConverter()
BeanDescriptionConverter used for serializing instances
 of this class.findDeserializationConverter in class BeanDescriptionpublic LinkedHashMap<String,AnnotatedField> _findPropertyFields(Collection<String> ignoredProperties, boolean forSerialization)
ignoredProperties - (optional) names of properties to ignore;
   any fields that would be recognized as one of these properties
   is ignored.forSerialization - If true, will collect serializable property
    fields; if false, deserializableCopyright © 2014–2015 FasterXML. All rights reserved.