Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fasterxml.jackson.databind
Class BeanDescription

    java.lang.Object
      com.fasterxml.jackson.databind.BeanDescription

Direct Known Subclasses:
  BasicBeanDescription

    public abstract class BeanDescription

extends Object

Basic container for information gathered by `ClassIntrospector` to help in constructing serializers and deserializers. Note that the main implementation type is `BasicBeanDescription`, meaning that it is safe to upcast to this type.

Field Summary
`protected JavaType` | `_type` Bean type information, including raw class and possible * generics information

Constructor Summary
`protected` | `BeanDescription(JavaType type)`

Method Summary
`abstract 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.
`abstract AnnotatedMember` | `findAnyGetter()`
`abstract AnnotatedMethod` | `findAnySetter()` Method used to locate the method of introspected class that implements `JsonAnySetter`.
`abstract Map<String,AnnotatedMember>` | `findBackReferenceProperties()` Method for locating all back-reference properties (setters, fields) bean has
`abstract 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.
`abstract JsonFormat.Value` | `findExpectedFormat(JsonFormat.Value defValue)` Method for checking what is the expected format for POJO, as defined by defaults and possible annotations.
`abstract 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.
`abstract Map<Object,AnnotatedMember>` | `findInjectables()`
`abstract AnnotatedMethod` | `findJsonValueMethod()` Method for locating the getter method that is annotated with `JsonValue` annotation, if any.
`abstract AnnotatedMethod` | `findMethod(String name, Class<?>[] paramTypes)`
`abstract 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.
`abstract JsonPOJOBuilder.Value` | `findPOJOBuilderConfig()` Method for finding configuration for POJO Builder class.
`abstract List<BeanPropertyDefinition>` | `findProperties()`
`abstract JsonInclude.Include` | `findSerializationInclusion(JsonInclude.Include defValue)`
`abstract 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)
`Class<?>` | `getBeanClass()`
`abstract Annotations` | `getClassAnnotations()` Method for accessing collection of annotations the bean class has.
`abstract AnnotatedClass` | `getClassInfo()` Method for accessing low-level information about Class this item describes.
`abstract List<AnnotatedConstructor>` | `getConstructors()`
`abstract List<AnnotatedMethod>` | `getFactoryMethods()`
`abstract Set<String>` | `getIgnoredPropertyNames()`
`abstract ObjectIdInfo` | `getObjectIdInfo()` Accessor for getting information about Object Id expected to be used for this POJO type, if any.
`JavaType` | `getType()` Method for accessing declared type of bean being introspected, including full generic type information (from declaration)
`abstract boolean` | `hasKnownClassAnnotations()` Method for checking whether class being described has any annotations recognized by registered annotation introspector.
`abstract 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".
`abstract JavaType` | `resolveType(Type jdkType)` Method for resolving given JDK type, using this bean as the generic type resolution context.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _type

    protected final JavaType _type

  Bean type information, including raw class and possible * generics information

Constructor Detail

### BeanDescription

    protected BeanDescription(JavaType type)

Method Detail

### getType

    public JavaType getType()

  Method for accessing declared type of bean being introspected, including full generic type information (from declaration)

### getBeanClass

    public Class<?> getBeanClass()

### getClassInfo

    public abstract AnnotatedClass getClassInfo()

  Method for accessing low-level information about Class this item describes.

### getObjectIdInfo

    public abstract ObjectIdInfo getObjectIdInfo()

  Accessor for getting information about Object Id expected to be used for this POJO type, if any.

### hasKnownClassAnnotations

    public abstract boolean hasKnownClassAnnotations()

  Method for checking whether class being described has any annotations recognized by registered annotation introspector.

### bindingsForBeanType

    public abstract 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.

### resolveType

    public abstract JavaType resolveType(Type jdkType)

  Method for resolving given JDK type, using this bean as the generic type resolution context.

### getClassAnnotations

    public abstract Annotations getClassAnnotations()

  Method for accessing collection of annotations the bean class has.

### findProperties

    public abstract List<BeanPropertyDefinition> findProperties()

  Returns:
    Ordered Map with logical property name as key, and matching getter method as value.

### findBackReferenceProperties

    public abstract Map<String,AnnotatedMember> findBackReferenceProperties()

  Method for locating all back-reference properties (setters, fields) bean has

### getIgnoredPropertyNames

    public abstract Set<String> getIgnoredPropertyNames()

### getConstructors

    public abstract List<AnnotatedConstructor> getConstructors()

### getFactoryMethods

    public abstract List<AnnotatedMethod> getFactoryMethods()

### findDefaultConstructor

    public abstract 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.

### findSingleArgConstructor

    public abstract 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)

  Parameters:
    `argTypes` - Type(s) of the argument that we are looking for

### findFactoryMethod

    public abstract 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.

  Parameters:
    `expArgTypes` - 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)

### findAnyGetter

    public abstract AnnotatedMember findAnyGetter()

### findAnySetter

    public abstract AnnotatedMethod findAnySetter()

  Method used to locate the method of introspected class that implements `JsonAnySetter`. 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.

### findJsonValueMethod

    public abstract AnnotatedMethod findJsonValueMethod()

  Method for locating the getter method that is annotated with `JsonValue` annotation, if any. If multiple ones are found, an error is reported by throwing `IllegalArgumentException`

### findMethod

    public abstract AnnotatedMethod findMethod(String name,
                                               Class<?>[] paramTypes)

### findSerializationInclusion

    public abstract JsonInclude.Include findSerializationInclusion(JsonInclude.Include defValue)

### findExpectedFormat

    public abstract JsonFormat.Value findExpectedFormat(JsonFormat.Value defValue)

  Method for checking what is the expected format for POJO, as defined by defaults and possible annotations. Note that this may be further refined by per-property annotations.

  Since:
    2.1s

### findInjectables

    public abstract Map<Object,AnnotatedMember> findInjectables()

### findPOJOBuilder

    public abstract 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.

### findPOJOBuilderConfig

    public abstract JsonPOJOBuilder.Value findPOJOBuilderConfig()

  Method for finding configuration for POJO Builder class.

### instantiateBean

    public abstract 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".

  Parameters:
    `fixAccess` - 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.
  Returns:
    Instance of class represented by this descriptor, if suitable default constructor was found; null otherwise.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 FasterXML. All Rights Reserved.