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 PropertyName |
_fullName |
protected com.fasterxml.jackson.annotation.JsonInclude.Include |
_inclusion |
protected AnnotationIntrospector |
_introspector |
protected AnnotatedMember |
_member
Member that defines logical property.
|
protected PropertyMetadata |
_metadata |
protected String |
_name
Deprecated.
Since 2.5 use
_fullName instead. |
Modifier | Constructor and Description |
---|---|
|
SimpleBeanPropertyDefinition(AnnotatedMember member)
Deprecated.
|
protected |
SimpleBeanPropertyDefinition(AnnotatedMember member,
PropertyName fullName,
AnnotationIntrospector intr,
PropertyMetadata metadata,
com.fasterxml.jackson.annotation.JsonInclude.Include inclusion) |
|
SimpleBeanPropertyDefinition(AnnotatedMember member,
String name)
Deprecated.
|
protected |
SimpleBeanPropertyDefinition(AnnotatedMember member,
String name,
AnnotationIntrospector intr)
Deprecated.
Since 2.5 Use variant that takes PropertyName
|
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,
com.fasterxml.jackson.annotation.JsonInclude.Include inclusion) |
static SimpleBeanPropertyDefinition |
construct(MapperConfig<?> config,
AnnotatedMember member,
String name)
Deprecated.
Since 2.5
|
com.fasterxml.jackson.annotation.JsonInclude.Include |
findInclusion()
Method used to check if this property has specific inclusion override
associated with it or not.
|
AnnotatedMember |
getAccessor()
Method used to find accessor (getter, field to access) to use for accessing
value of the property.
|
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.
|
AnnotatedMember |
getMutator()
Method used to find mutator (constructor parameter, setter, field) to use for
changing value of the property.
|
String |
getName()
Accessor for name used for external representation (in JSON).
|
AnnotatedMember |
getNonConstructorMutator() |
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.
|
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(com.fasterxml.jackson.annotation.JsonInclude.Include 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 |
withName(String newName)
Deprecated.
|
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, findReferenceType, findViews, isRequired, isTypeId
protected final AnnotationIntrospector _introspector
protected final AnnotatedMember _member
NOTE: for "virtual" properties, this is null.
protected final PropertyMetadata _metadata
protected final PropertyName _fullName
protected final com.fasterxml.jackson.annotation.JsonInclude.Include _inclusion
@Deprecated protected final String _name
_fullName
instead.@Deprecated public SimpleBeanPropertyDefinition(AnnotatedMember member)
@Deprecated public SimpleBeanPropertyDefinition(AnnotatedMember member, String name)
protected SimpleBeanPropertyDefinition(AnnotatedMember member, PropertyName fullName, AnnotationIntrospector intr, PropertyMetadata metadata, com.fasterxml.jackson.annotation.JsonInclude.Include inclusion)
@Deprecated protected SimpleBeanPropertyDefinition(AnnotatedMember member, String name, AnnotationIntrospector intr)
public static SimpleBeanPropertyDefinition construct(MapperConfig<?> config, AnnotatedMember member)
@Deprecated public static SimpleBeanPropertyDefinition construct(MapperConfig<?> config, AnnotatedMember member, String name)
public static SimpleBeanPropertyDefinition construct(MapperConfig<?> config, AnnotatedMember member, PropertyName name)
public static SimpleBeanPropertyDefinition construct(MapperConfig<?> config, AnnotatedMember member, PropertyName name, PropertyMetadata metadata, com.fasterxml.jackson.annotation.JsonInclude.Include inclusion)
@Deprecated public BeanPropertyDefinition withName(String newName)
public BeanPropertyDefinition withSimpleName(String newName)
BeanPropertyDefinition
withSimpleName
in class BeanPropertyDefinition
public BeanPropertyDefinition withName(PropertyName newName)
BeanPropertyDefinition
BeanPropertyDefinition.getName()
would return newName
.withName
in class BeanPropertyDefinition
public BeanPropertyDefinition withMetadata(PropertyMetadata metadata)
public BeanPropertyDefinition withInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include inclusion)
public String getName()
BeanPropertyDefinition
getName
in interface Named
getName
in class BeanPropertyDefinition
public PropertyName getFullName()
getFullName
in class BeanPropertyDefinition
public boolean hasName(PropertyName name)
hasName
in class BeanPropertyDefinition
public String getInternalName()
BeanPropertyDefinition
getInternalName
in class BeanPropertyDefinition
public PropertyName getWrapperName()
BeanPropertyDefinition
getWrapperName
in class BeanPropertyDefinition
public boolean isExplicitlyIncluded()
BeanPropertyDefinition
isExplicitlyIncluded
in class BeanPropertyDefinition
public 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 BeanPropertyDefinition
public PropertyMetadata getMetadata()
getMetadata
in class BeanPropertyDefinition
public com.fasterxml.jackson.annotation.JsonInclude.Include findInclusion()
BeanPropertyDefinition
findInclusion
in class BeanPropertyDefinition
public boolean hasGetter()
hasGetter
in class BeanPropertyDefinition
public boolean hasSetter()
hasSetter
in class BeanPropertyDefinition
public boolean hasField()
hasField
in class BeanPropertyDefinition
public boolean hasConstructorParameter()
hasConstructorParameter
in class BeanPropertyDefinition
public AnnotatedMethod getGetter()
getGetter
in class BeanPropertyDefinition
public AnnotatedMethod getSetter()
getSetter
in class BeanPropertyDefinition
public AnnotatedField getField()
getField
in class BeanPropertyDefinition
public AnnotatedParameter getConstructorParameter()
getConstructorParameter
in class BeanPropertyDefinition
public Iterator<AnnotatedParameter> getConstructorParameters()
BeanPropertyDefinition
BeanPropertyDefinition.getConstructorParameter()
to get access to all constructor parameters, not just the highest priority one.getConstructorParameters
in class BeanPropertyDefinition
public AnnotatedMember getAccessor()
getAccessor
in class BeanPropertyDefinition
public AnnotatedMember getMutator()
getMutator
in class BeanPropertyDefinition
public AnnotatedMember getNonConstructorMutator()
getNonConstructorMutator
in class BeanPropertyDefinition
public AnnotatedMember getPrimaryMember()
BeanPropertyDefinition
Note: abstract since 2.5
getPrimaryMember
in class BeanPropertyDefinition
Copyright © 2014–2015 FasterXML. All rights reserved.