Top Description Fields Constructors Methods
tools.jackson.databind.util

public Class SimpleBeanPropertyDefinition

extends BeanPropertyDefinition
Class Inheritance
Imports
java.util.Collections, .Iterator, .List, com.fasterxml.jackson.annotation.JsonInclude, tools.jackson.databind.*, tools.jackson.databind.cfg.MapperConfig, tools.jackson.databind.introspect.*, tools.jackson.databind.type.TypeFactory

Simple immutable BeanPropertyDefinition implementation that can be wrapped around a AnnotatedMember that is a simple accessor (getter) or mutator (setter, constructor parameter) (or both, for fields).

Field Summary

Modifier and TypeField and Description
protected final MapperConfig<?>
protected final PropertyName
protected final JsonInclude.Value
protected final AnnotatedMember
_member

Member that defines logical property.

protected final PropertyMetadata
Inherited from tools.jackson.databind.introspect.BeanPropertyDefinition:
EMPTY_INCLUDE

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static SimpleBeanPropertyDefinition
public static SimpleBeanPropertyDefinition
public static SimpleBeanPropertyDefinition
construct(MapperConfig<?> config, AnnotatedMember member, PropertyName name, PropertyMetadata metadata, JsonInclude.Include inclusion)

Method called to create instance for virtual properties.

public static SimpleBeanPropertyDefinition
public List<PropertyName>
findAliases()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.findAliases.

Method for finding all aliases of the property, if any.

public JsonInclude.Value
findInclusion()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.findInclusion.

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

public AnnotatedParameter
public Iterator<AnnotatedParameter>
getConstructorParameters()

Overrides tools.jackson.databind.introspect.BeanPropertyDefinition.getConstructorParameters.

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

public AnnotatedField
public PropertyName
public AnnotatedMethod
public String
getInternalName()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getInternalName.

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

public PropertyMetadata
getMetadata()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getMetadata.

We will indicate that property is optional, since there is nothing to indicate whether it might be required.

public String
public AnnotatedMember
getPrimaryMember()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.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 JavaType
public Class<?>
public AnnotatedMethod
public PropertyName
getWrapperName()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getWrapperName.

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

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
isExplicitlyIncluded()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.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()

Overrides tools.jackson.databind.introspect.BeanPropertyDefinition.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 BeanPropertyDefinition
public BeanPropertyDefinition
public BeanPropertyDefinition
withName(PropertyName newName)

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.withName.

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 BeanPropertyDefinition
withSimpleName(String newName)

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.withSimpleName.

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

Inherited from tools.jackson.databind.introspect.BeanPropertyDefinition:
couldDeserializecouldSerializefindObjectIdInfofindReferenceNamefindReferenceTypefindViewsgetAccessorgetMutatorgetNonConstructorMutatorisRequiredisTypeId

Field Detail

_configback to summary
protected final MapperConfig<?> _config
_fullNameback to summary
protected final PropertyName _fullName
_inclusionback to summary
protected final JsonInclude.Value _inclusion
_memberback to summary
protected final AnnotatedMember _member

Member that defines logical property. Assumption is that it should be a 'simple' accessor; meaning a zero-argument getter, single-argument setter or constructor parameter.

Note

for "virtual" properties, this is null.

_metadataback to summary
protected final PropertyMetadata _metadata

Constructor Detail

SimpleBeanPropertyDefinitionback to summary
protected SimpleBeanPropertyDefinition(MapperConfig<?> config, AnnotatedMember member, PropertyName fullName, PropertyMetadata metadata, JsonInclude.Value inclusion)

Method Detail

constructback to summary
public static SimpleBeanPropertyDefinition construct(MapperConfig<?> config, AnnotatedMember member)
constructback to summary
public static SimpleBeanPropertyDefinition construct(MapperConfig<?> config, AnnotatedMember member, PropertyName name)
constructback to summary
public static SimpleBeanPropertyDefinition construct(MapperConfig<?> config, AnnotatedMember member, PropertyName name, PropertyMetadata metadata, JsonInclude.Include inclusion)

Method called to create instance for virtual properties.

constructback to summary
public static SimpleBeanPropertyDefinition construct(MapperConfig<?> config, AnnotatedMember member, PropertyName name, PropertyMetadata metadata, JsonInclude.Value inclusion)
Since
2.7
findAliasesback to summary
public List<PropertyName> findAliases()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.findAliases.

Doc from tools.jackson.databind.introspect.BeanPropertyDefinition.findAliases.

Method for finding all aliases of the property, if any.

Annotations
@Override
findInclusionback to summary
public JsonInclude.Value findInclusion()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.findInclusion.

Doc from tools.jackson.databind.introspect.BeanPropertyDefinition.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)

Annotations
@Override
getConstructorParameterback to summary
public AnnotatedParameter getConstructorParameter()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getConstructorParameter.

Annotations
@Override
getConstructorParametersback to summary
public Iterator<AnnotatedParameter> getConstructorParameters()

Overrides tools.jackson.databind.introspect.BeanPropertyDefinition.getConstructorParameters.

Doc from tools.jackson.databind.introspect.BeanPropertyDefinition.getConstructorParameters.

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

Annotations
@Override
getFieldback to summary
public AnnotatedField getField()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getField.

Annotations
@Override
getFullNameback to summary
public PropertyName getFullName()

Implements tools.jackson.databind.util.FullyNamed.getFullName.

Annotations
@Override
getGetterback to summary
public AnnotatedMethod getGetter()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getGetter.

Annotations
@Override
getInternalNameback to summary
public String getInternalName()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getInternalName.

Doc from tools.jackson.databind.introspect.BeanPropertyDefinition.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.

Annotations
@Override
getMetadataback to summary
public PropertyMetadata getMetadata()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getMetadata.

We will indicate that property is optional, since there is nothing to indicate whether it might be required.

Annotations
@Override
getNameback to summary
public String getName()

Implements tools.jackson.core.util.Named.getName.

Annotations
@Override
getPrimaryMemberback to summary
public AnnotatedMember getPrimaryMember()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getPrimaryMember.

Doc from tools.jackson.databind.introspect.BeanPropertyDefinition.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

Annotations
@Override
getPrimaryTypeback to summary
public JavaType getPrimaryType()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getPrimaryType.

Annotations
@Override
getRawPrimaryTypeback to summary
public Class<?> getRawPrimaryType()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getRawPrimaryType.

Annotations
@Override
getSetterback to summary
public AnnotatedMethod getSetter()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getSetter.

Annotations
@Override
getWrapperNameback to summary
public PropertyName getWrapperName()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.getWrapperName.

Doc from tools.jackson.databind.introspect.BeanPropertyDefinition.getWrapperName.

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

Annotations
@Override
hasConstructorParameterback to summary
public boolean hasConstructorParameter()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.hasConstructorParameter.

Annotations
@Override
hasFieldback to summary
public boolean hasField()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.hasField.

Annotations
@Override
hasGetterback to summary
public boolean hasGetter()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.hasGetter.

Annotations
@Override
hasNameback to summary
public boolean hasName(PropertyName name)

Overrides default tools.jackson.databind.util.FullyNamed.hasName.

Annotations
@Override
hasSetterback to summary
public boolean hasSetter()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.hasSetter.

Annotations
@Override
isExplicitlyIncludedback to summary
public boolean isExplicitlyIncluded()

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.isExplicitlyIncluded.

Doc from tools.jackson.databind.introspect.BeanPropertyDefinition.isExplicitlyIncluded.

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

Annotations
@Override
isExplicitlyNamedback to summary
public boolean isExplicitlyNamed()

Overrides tools.jackson.databind.introspect.BeanPropertyDefinition.isExplicitlyNamed.

Doc from tools.jackson.databind.introspect.BeanPropertyDefinition.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.

Annotations
@Override
withInclusionback to summary
public BeanPropertyDefinition withInclusion(JsonInclude.Value inclusion)
Since
2.5
withMetadataback to summary
public BeanPropertyDefinition withMetadata(PropertyMetadata metadata)
Since
2.5
withNameback to summary
public BeanPropertyDefinition withName(PropertyName newName)

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.withName.

Doc from tools.jackson.databind.introspect.BeanPropertyDefinition.withName.

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.

Annotations
@Override
withSimpleNameback to summary
public BeanPropertyDefinition withSimpleName(String newName)

Implements abstract tools.jackson.databind.introspect.BeanPropertyDefinition.withSimpleName.

Doc from tools.jackson.databind.introspect.BeanPropertyDefinition.withSimpleName.

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

Annotations
@Override