Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.introspect

public abstract Class BeanPropertyDefinition

extends Object
implements Named
Class Inheritance
All Implemented Interfaces
com.fasterxml.jackson.databind.util.Named
Known Direct Subclasses
com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder, com.fasterxml.jackson.databind.util.SimpleBeanPropertyDefinition
Imports
java.util.Iterator, com.fasterxml.jackson.annotation.JsonInclude, com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.util.ClassUtil, .Named

Simple value classes that contain definitions of properties, used during introspection of properties to use for serialization and deserialization purposes. These instances are created before actual BeanProperty instances are created, i.e. they are used earlier in the process flow, and are typically use to construct actual BeanProperty instances.

Field Summary

Modifier and TypeField and Description
protected static final JsonInclude.Value

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public abstract JsonInclude.Value
findInclusion()

Method used to check if this property has specific inclusion override associated with it or not.

public ObjectIdInfo
findObjectIdInfo()

Method used to check whether this logical property indicates that value POJOs should be written using additional Object Identifier (or, when multiple references exist, all but first AS Object Identifier).

public String
public AnnotationIntrospector.ReferenceProperty
findReferenceType()

Method used to find whether property is part of a bi-directional reference.

public Class<?>[]
findViews()

Method used to find View-inclusion definitions for the property.

public AnnotatedMember
getAccessor()

Method used to find accessor (getter, field to access) to use for accessing value of the property.

public abstract AnnotatedParameter
public Iterator<AnnotatedParameter>
getConstructorParameters()

Additional method that may be called instead of getConstructorParameter() to get access to all constructor parameters, not just the highest priority one.

public abstract AnnotatedField
public abstract PropertyName
public abstract AnnotatedMethod
public abstract String
getInternalName()

Accessor that can be used to determine implicit name from underlying element(s) before possible renaming.

public abstract PropertyMetadata
getMetadata()

Method for accessing additional metadata.

public AnnotatedMember
getMutator()

Method used to find mutator (constructor parameter, setter, field) to use for changing value of the property.

public abstract String
getName()

Redeclares com.fasterxml.jackson.databind.util.Named.getName.

Accessor for name used for external representation (in JSON).
public AnnotatedMember
public abstract AnnotatedMember
getPrimaryMember()

Method used to find the property member (getter, setter, field) that has the highest precedence in current context (getter method when serializing, if available, and so forth), if any.

public abstract JavaType
public abstract Class<?>
public abstract AnnotatedMethod
public abstract PropertyName
getWrapperName()

Accessor for finding wrapper name to use for property (if any).

public abstract boolean
public abstract boolean
public abstract boolean
public boolean
public abstract boolean
public abstract boolean

Returns:

True if property was explicitly included (usually by having one of components being annotated); false if inclusion was purely due to naming or visibility definitions (that is, implicit)
isExplicitlyIncluded
()

Accessor that can be called to check whether property was included due to an explicit marker (usually annotation), or just by naming convention.

public boolean
isExplicitlyNamed()

Accessor that can be called to check whether property name was due to an explicit marker (usually annotation), or just by naming convention or use of "use-default-name" marker (annotation).

public boolean
isRequired()

Method used to check if this property is expected to have a value; and if none found, should either be considered invalid (and most likely fail deserialization), or handled by other means (by providing default value)

public boolean
isTypeId()

Method used to check whether this logical property has a marker to indicate it should be used as the type id for polymorphic type handling.

public abstract BeanPropertyDefinition
withName(PropertyName newName)

Method that can be used to create a definition with same settings as this one, but with different (external) name; that is, one for which getName() would return newName.

public abstract BeanPropertyDefinition
withSimpleName(String newSimpleName)

Alternate "mutant factory" that will only change simple name, but leave other optional parts (like namespace) as is.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTY_INCLUDEback to summary
protected static final JsonInclude.Value EMPTY_INCLUDE

Constructor Detail

BeanPropertyDefinitionback to summary
public BeanPropertyDefinition()

Method Detail

couldDeserializeback to summary
public boolean couldDeserialize()
couldSerializeback to summary
public boolean couldSerialize()
findInclusionback to summary
public abstract JsonInclude.Value findInclusion()

Method used to check if this property has specific inclusion override associated with it or not. It should NOT check for any default settings (global, per-type, or containing POJO settings)

Since
2.5
findObjectIdInfoback to summary
public ObjectIdInfo findObjectIdInfo()

Method used to check whether this logical property indicates that value POJOs should be written using additional Object Identifier (or, when multiple references exist, all but first AS Object Identifier).

findReferenceNameback to summary
public String findReferenceName()
Since
2.9
findReferenceTypeback to summary
public AnnotationIntrospector.ReferenceProperty findReferenceType()

Method used to find whether property is part of a bi-directional reference.

findViewsback to summary
public Class<?>[] findViews()

Method used to find View-inclusion definitions for the property.

getAccessorback to summary
public AnnotatedMember getAccessor()

Method used to find accessor (getter, field to access) to use for accessing value of the property. Null if no such member exists.

getConstructorParameterback to summary
public abstract AnnotatedParameter getConstructorParameter()
getConstructorParametersback to summary
public Iterator<AnnotatedParameter> getConstructorParameters()

Additional method that may be called instead of getConstructorParameter() to get access to all constructor parameters, not just the highest priority one.

Since
2.5
getFieldback to summary
public abstract AnnotatedField getField()
getFullNameback to summary
public abstract PropertyName getFullName()
getGetterback to summary
public abstract AnnotatedMethod getGetter()
getInternalNameback to summary
public abstract String getInternalName()

Accessor that can be used to determine implicit name from underlying element(s) before possible renaming. This is the "internal" name derived from accessor ("x" from "getX"), and is not based on annotations or naming strategy.

getMetadataback to summary
public abstract PropertyMetadata getMetadata()

Method for accessing additional metadata.

Note

will never return null, so de-referencing return value is safe.

Since
2.3
getMutatorback to summary
public AnnotatedMember getMutator()

Method used to find mutator (constructor parameter, setter, field) to use for changing value of the property. Null if no such member exists.

getNameback to summary
public abstract String getName()

Redeclares com.fasterxml.jackson.databind.util.Named.getName.

Accessor for name used for external representation (in JSON).

Annotations
@Override
getNonConstructorMutatorback to summary
public AnnotatedMember getNonConstructorMutator()
Since
2.3
getPrimaryMemberback to summary
public abstract AnnotatedMember getPrimaryMember()

Method used to find the property member (getter, setter, field) that has the highest precedence in current context (getter method when serializing, if available, and so forth), if any.

Note

may throw IllegalArgumentException in case problems are found trying to getter or setter info.

Note

abstract since 2.5

Since
2.1
getPrimaryTypeback to summary
public abstract JavaType getPrimaryType()
Since
2.9
getRawPrimaryTypeback to summary
public abstract Class<?> getRawPrimaryType()
Since
2.9
getSetterback to summary
public abstract AnnotatedMethod getSetter()
getWrapperNameback to summary
public abstract PropertyName getWrapperName()

Accessor for finding wrapper name to use for property (if any).

Since
2.2
hasConstructorParameterback to summary
public abstract boolean hasConstructorParameter()
hasFieldback to summary
public abstract boolean hasField()
hasGetterback to summary
public abstract boolean hasGetter()
hasNameback to summary
public boolean hasName(PropertyName name)
Since
2.6
hasSetterback to summary
public abstract boolean hasSetter()
isExplicitlyIncludedback to summary
public abstract boolean isExplicitlyIncluded()

Accessor that can be called to check whether property was included due to an explicit marker (usually annotation), or just by naming convention.

Returns:boolean

True if property was explicitly included (usually by having one of components being annotated); false if inclusion was purely due to naming or visibility definitions (that is, implicit)

isExplicitlyNamedback to summary
public boolean isExplicitlyNamed()

Accessor that can be called to check whether property name was due to an explicit marker (usually annotation), or just by naming convention or use of "use-default-name" marker (annotation).

Note that entries that return true from this method will always return true for isExplicitlyIncluded(), but not necessarily vice versa.

Since
2.4
isRequiredback to summary
public boolean isRequired()

Method used to check if this property is expected to have a value; and if none found, should either be considered invalid (and most likely fail deserialization), or handled by other means (by providing default value)

isTypeIdback to summary
public boolean isTypeId()

Method used to check whether this logical property has a marker to indicate it should be used as the type id for polymorphic type handling.

withNameback to summary
public abstract BeanPropertyDefinition withName(PropertyName newName)

Method that can be used to create a definition with same settings as this one, but with different (external) name; that is, one for which getName() would return newName.

Since
2.3
withSimpleNameback to summary
public abstract BeanPropertyDefinition withSimpleName(String newSimpleName)

Alternate "mutant factory" that will only change simple name, but leave other optional parts (like namespace) as is.

Since
2.3