public class SimpleBeanPropertyDefinition extends BeanPropertyDefinition
BeanPropertyDefinition implementation that can
be wrapped around a AnnotatedMember that is a simple
accessor (getter) or mutator (setter, constructor parameter)
(or both, for fields).| Modifier and Type | Field and Description |
|---|---|
protected AnnotationIntrospector |
_annotationIntrospector |
protected PropertyName |
_fullName |
protected JsonInclude.Value |
_inclusion |
protected AnnotatedMember |
_member
Member that defines logical property.
|
protected PropertyMetadata |
_metadata |
EMPTY_INCLUDE| Modifier | Constructor and Description |
|---|---|
protected |
SimpleBeanPropertyDefinition(AnnotationIntrospector intr,
AnnotatedMember member,
PropertyName fullName,
PropertyMetadata metadata,
JsonInclude.Value inclusion) |
| Modifier and Type | Method and Description |
|---|---|
static SimpleBeanPropertyDefinition |
construct(MapperConfig<?> config,
AnnotatedMember member) |
static SimpleBeanPropertyDefinition |
construct(MapperConfig<?> config,
AnnotatedMember member,
PropertyName name) |
static SimpleBeanPropertyDefinition |
construct(MapperConfig<?> config,
AnnotatedMember member,
PropertyName name,
PropertyMetadata metadata,
JsonInclude.Include inclusion)
Method called to create instance for virtual properties.
|
static SimpleBeanPropertyDefinition |
construct(MapperConfig<?> config,
AnnotatedMember member,
PropertyName name,
PropertyMetadata metadata,
JsonInclude.Value inclusion) |
JsonInclude.Value |
findInclusion()
Method used to check if this property has specific inclusion override
associated with it or not.
|
AnnotatedParameter |
getConstructorParameter() |
Iterator<AnnotatedParameter> |
getConstructorParameters()
Additional method that may be called instead of
BeanPropertyDefinition.getConstructorParameter()
to get access to all constructor parameters, not just the highest priority one. |
AnnotatedField |
getField() |
PropertyName |
getFullName() |
AnnotatedMethod |
getGetter() |
String |
getInternalName()
Accessor that can be used to determine implicit name from underlying
element(s) before possible renaming.
|
PropertyMetadata |
getMetadata()
We will indicate that property is optional, since there is nothing
to indicate whether it might be required.
|
String |
getName()
Accessor for name used for external representation (in JSON).
|
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.
|
JavaType |
getPrimaryType() |
Class<?> |
getRawPrimaryType() |
AnnotatedMethod |
getSetter() |
PropertyName |
getWrapperName()
Accessor for finding wrapper name to use for property (if any).
|
boolean |
hasConstructorParameter() |
boolean |
hasField() |
boolean |
hasGetter() |
boolean |
hasName(PropertyName name) |
boolean |
hasSetter() |
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.
|
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).
|
BeanPropertyDefinition |
withInclusion(JsonInclude.Value inclusion) |
BeanPropertyDefinition |
withMetadata(PropertyMetadata metadata) |
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
BeanPropertyDefinition.getName() would return newName. |
BeanPropertyDefinition |
withSimpleName(String newName)
Alternate "mutant factory" that will only change simple name, but
leave other optional parts (like namespace) as is.
|
couldDeserialize, couldSerialize, findObjectIdInfo, findReferenceName, findReferenceType, findViews, getAccessor, getMutator, getNonConstructorMutator, isRequired, isTypeIdprotected final AnnotationIntrospector _annotationIntrospector
protected final AnnotatedMember _member
NOTE: for "virtual" properties, this is null.
protected final PropertyMetadata _metadata
protected final PropertyName _fullName
protected final JsonInclude.Value _inclusion
protected SimpleBeanPropertyDefinition(AnnotationIntrospector intr, AnnotatedMember member, PropertyName fullName, PropertyMetadata metadata, JsonInclude.Value inclusion)
public static SimpleBeanPropertyDefinition construct(MapperConfig<?> config, AnnotatedMember member)
public static SimpleBeanPropertyDefinition construct(MapperConfig<?> config, AnnotatedMember member, PropertyName name)
public static SimpleBeanPropertyDefinition construct(MapperConfig<?> config, AnnotatedMember member, PropertyName name, PropertyMetadata metadata, JsonInclude.Include inclusion)
public static SimpleBeanPropertyDefinition construct(MapperConfig<?> config, AnnotatedMember member, PropertyName name, PropertyMetadata metadata, JsonInclude.Value inclusion)
public BeanPropertyDefinition withSimpleName(String newName)
BeanPropertyDefinitionwithSimpleName in class BeanPropertyDefinitionpublic BeanPropertyDefinition withName(PropertyName newName)
BeanPropertyDefinitionBeanPropertyDefinition.getName() would return newName.withName in class BeanPropertyDefinitionpublic BeanPropertyDefinition withMetadata(PropertyMetadata metadata)
public BeanPropertyDefinition withInclusion(JsonInclude.Value inclusion)
public String getName()
BeanPropertyDefinitiongetName in interface NamedgetName in class BeanPropertyDefinitionpublic PropertyName getFullName()
getFullName in class BeanPropertyDefinitionpublic boolean hasName(PropertyName name)
hasName in class BeanPropertyDefinitionpublic String getInternalName()
BeanPropertyDefinitiongetInternalName in class BeanPropertyDefinitionpublic PropertyName getWrapperName()
BeanPropertyDefinitiongetWrapperName in class BeanPropertyDefinitionpublic boolean isExplicitlyIncluded()
BeanPropertyDefinitionisExplicitlyIncluded in class BeanPropertyDefinitionpublic boolean isExplicitlyNamed()
BeanPropertyDefinition
Note that entries that return true from this method will always
return true for BeanPropertyDefinition.isExplicitlyIncluded(), but not necessarily
vice versa.
isExplicitlyNamed in class BeanPropertyDefinitionpublic PropertyMetadata getMetadata()
getMetadata in class BeanPropertyDefinitionpublic JavaType getPrimaryType()
getPrimaryType in class BeanPropertyDefinitionpublic Class<?> getRawPrimaryType()
getRawPrimaryType in class BeanPropertyDefinitionpublic JsonInclude.Value findInclusion()
BeanPropertyDefinitionfindInclusion in class BeanPropertyDefinitionpublic boolean hasGetter()
hasGetter in class BeanPropertyDefinitionpublic boolean hasSetter()
hasSetter in class BeanPropertyDefinitionpublic boolean hasField()
hasField in class BeanPropertyDefinitionpublic boolean hasConstructorParameter()
hasConstructorParameter in class BeanPropertyDefinitionpublic AnnotatedMethod getGetter()
getGetter in class BeanPropertyDefinitionpublic AnnotatedMethod getSetter()
getSetter in class BeanPropertyDefinitionpublic AnnotatedField getField()
getField in class BeanPropertyDefinitionpublic AnnotatedParameter getConstructorParameter()
getConstructorParameter in class BeanPropertyDefinitionpublic Iterator<AnnotatedParameter> getConstructorParameters()
BeanPropertyDefinitionBeanPropertyDefinition.getConstructorParameter()
to get access to all constructor parameters, not just the highest priority one.getConstructorParameters in class BeanPropertyDefinitionpublic AnnotatedMember getPrimaryMember()
BeanPropertyDefinitionNote: abstract since 2.5
getPrimaryMember in class BeanPropertyDefinitionCopyright © 2008–2020 FasterXML. All rights reserved.