public abstract class BeanPropertyDefinition extends Object implements Named
BeanProperty
instances are created, i.e. they are used earlier in the process
flow, and are typically use to construct actual
BeanProperty
instances.Modifier and Type | Field and Description |
---|---|
protected static JsonInclude.Value |
EMPTY_INCLUDE |
Constructor and Description |
---|
BeanPropertyDefinition() |
Modifier and Type | Method and Description |
---|---|
boolean |
couldDeserialize() |
boolean |
couldSerialize() |
abstract JsonInclude.Value |
findInclusion()
Method used to check if this property has specific inclusion override
associated with it or not.
|
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).
|
String |
findReferenceName() |
AnnotationIntrospector.ReferenceProperty |
findReferenceType()
Method used to find whether property is part of a bi-directional
reference.
|
Class<?>[] |
findViews()
Method used to find View-inclusion definitions for the property.
|
AnnotatedMember |
getAccessor()
Method used to find accessor (getter, field to access) to use for accessing
value of the property.
|
abstract AnnotatedParameter |
getConstructorParameter() |
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. |
abstract AnnotatedField |
getField() |
abstract PropertyName |
getFullName() |
abstract AnnotatedMethod |
getGetter() |
abstract String |
getInternalName()
Accessor that can be used to determine implicit name from underlying
element(s) before possible renaming.
|
abstract PropertyMetadata |
getMetadata()
Method for accessing additional metadata.
|
AnnotatedMember |
getMutator()
Method used to find mutator (constructor parameter, setter, field) to use for
changing value of the property.
|
abstract String |
getName()
Accessor for name used for external representation (in JSON).
|
AnnotatedMember |
getNonConstructorMutator() |
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.
|
abstract JavaType |
getPrimaryType() |
abstract Class<?> |
getRawPrimaryType() |
abstract AnnotatedMethod |
getSetter() |
abstract PropertyName |
getWrapperName()
Accessor for finding wrapper name to use for property (if any).
|
abstract boolean |
hasConstructorParameter() |
abstract boolean |
hasField() |
abstract boolean |
hasGetter() |
boolean |
hasName(PropertyName name) |
abstract boolean |
hasSetter() |
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.
|
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).
|
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)
|
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.
|
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 . |
abstract BeanPropertyDefinition |
withSimpleName(String newSimpleName)
Alternate "mutant factory" that will only change simple name, but
leave other optional parts (like namespace) as is.
|
protected static final JsonInclude.Value EMPTY_INCLUDE
public abstract BeanPropertyDefinition withName(PropertyName newName)
getName()
would return newName
.public abstract BeanPropertyDefinition withSimpleName(String newSimpleName)
public abstract String getName()
public abstract PropertyName getFullName()
public boolean hasName(PropertyName name)
public abstract String getInternalName()
public abstract PropertyName getWrapperName()
public abstract boolean isExplicitlyIncluded()
public boolean isExplicitlyNamed()
Note that entries that return true from this method will always
return true for isExplicitlyIncluded()
, but not necessarily
vice versa.
public abstract JavaType getPrimaryType()
public abstract Class<?> getRawPrimaryType()
public abstract PropertyMetadata getMetadata()
public boolean isRequired()
public boolean couldDeserialize()
public boolean couldSerialize()
public abstract boolean hasGetter()
public abstract boolean hasSetter()
public abstract boolean hasField()
public abstract boolean hasConstructorParameter()
public abstract AnnotatedMethod getGetter()
public abstract AnnotatedMethod getSetter()
public abstract AnnotatedField getField()
public abstract AnnotatedParameter getConstructorParameter()
public Iterator<AnnotatedParameter> getConstructorParameters()
getConstructorParameter()
to get access to all constructor parameters, not just the highest priority one.public AnnotatedMember getAccessor()
public AnnotatedMember getMutator()
public AnnotatedMember getNonConstructorMutator()
public abstract AnnotatedMember getPrimaryMember()
Note: may throw IllegalArgumentException
in case problems are found
trying to getter or setter info.
Note: abstract since 2.5
public Class<?>[] findViews()
public AnnotationIntrospector.ReferenceProperty findReferenceType()
public String findReferenceName()
public boolean isTypeId()
public ObjectIdInfo findObjectIdInfo()
public abstract JsonInclude.Value findInclusion()
Copyright © 2008–2021 FasterXML. All rights reserved.