public class POJOPropertyBuilder extends BeanPropertyDefinition implements java.lang.Comparable<POJOPropertyBuilder>
| Constructor and Description |
|---|
POJOPropertyBuilder(MapperConfig<?> config,
AnnotationIntrospector ai,
boolean forSerialization,
PropertyName internalName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAll(POJOPropertyBuilder src)
Method for adding all property members from specified collector into
this collector.
|
void |
addCtor(AnnotatedParameter a,
PropertyName name,
boolean explName,
boolean visible,
boolean ignored) |
void |
addField(AnnotatedField a,
PropertyName name,
boolean explName,
boolean visible,
boolean ignored) |
void |
addGetter(AnnotatedMethod a,
PropertyName name,
boolean explName,
boolean visible,
boolean ignored) |
void |
addSetter(AnnotatedMethod a,
PropertyName name,
boolean explName,
boolean visible,
boolean ignored) |
boolean |
anyIgnorals() |
boolean |
anyVisible() |
int |
compareTo(POJOPropertyBuilder other) |
boolean |
couldDeserialize() |
boolean |
couldSerialize() |
java.util.Collection<POJOPropertyBuilder> |
explode(java.util.Collection<PropertyName> newNames)
Method called when a previous call to
findExplicitNames() found
multiple distinct explicit names, and the property this builder represents
basically needs to be broken apart and replaced by a set of more than
one properties. |
JsonProperty.Access |
findAccess() |
java.util.Set<PropertyName> |
findExplicitNames()
Method called to find out set of explicit names for accessors
bound together due to implicit name.
|
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).
|
AnnotationIntrospector.ReferenceProperty |
findReferenceType()
Method used to find whether property is part of a bi-directional
reference.
|
java.lang.Class<?>[] |
findViews()
Method used to find View-inclusion definitions for the property.
|
AnnotatedParameter |
getConstructorParameter() |
java.util.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() |
java.lang.String |
getInternalName()
Accessor that can be used to determine implicit name from underlying
element(s) before possible renaming.
|
PropertyMetadata |
getMetadata()
Method for accessing additional metadata.
|
java.lang.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()
Type determined from the primary member for the property being built,
considering precedence according to whether we are processing serialization
or deserialization.
|
java.lang.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).
|
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.
|
void |
mergeAnnotations(boolean forSerialization) |
void |
removeConstructors()
Mutator that will simply drop any constructor parameters property may have.
|
void |
removeIgnored()
Method called to remove all entries that are marked as
ignored.
|
JsonProperty.Access |
removeNonVisible(boolean inferMutators)
Deprecated.
|
JsonProperty.Access |
removeNonVisible(boolean inferMutators,
POJOPropertiesCollector parent) |
java.lang.String |
toString() |
void |
trimByVisibility()
Method called to trim unnecessary entries, such as implicit
getter if there is an explict one available.
|
POJOPropertyBuilder |
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. |
POJOPropertyBuilder |
withSimpleName(java.lang.String newSimpleName)
Alternate "mutant factory" that will only change simple name, but
leave other optional parts (like namespace) as is.
|
findReferenceName, getAccessor, getMutator, getNonConstructorMutator, isRequiredpublic POJOPropertyBuilder(MapperConfig<?> config, AnnotationIntrospector ai, boolean forSerialization, PropertyName internalName)
public POJOPropertyBuilder withName(PropertyName newName)
BeanPropertyDefinitionBeanPropertyDefinition.getName() would return newName.withName in class BeanPropertyDefinitionpublic POJOPropertyBuilder withSimpleName(java.lang.String newSimpleName)
BeanPropertyDefinitionwithSimpleName in class BeanPropertyDefinitionpublic int compareTo(POJOPropertyBuilder other)
compareTo in interface java.lang.Comparable<POJOPropertyBuilder>public java.lang.String getName()
BeanPropertyDefinitiongetName in interface NamedgetName in class BeanPropertyDefinitionpublic PropertyName getFullName()
getFullName in class BeanPropertyDefinitionpublic boolean hasName(PropertyName name)
hasName in class BeanPropertyDefinitionpublic java.lang.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()
BeanPropertyDefinitiongetMetadata in class BeanPropertyDefinitionpublic JavaType getPrimaryType()
getPrimaryType in class BeanPropertyDefinitionpublic java.lang.Class<?> getRawPrimaryType()
getRawPrimaryType 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 boolean couldDeserialize()
couldDeserialize in class BeanPropertyDefinitionpublic boolean couldSerialize()
couldSerialize 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 java.util.Iterator<AnnotatedParameter> getConstructorParameters()
BeanPropertyDefinitionBeanPropertyDefinition.getConstructorParameter()
to get access to all constructor parameters, not just the highest priority one.getConstructorParameters in class BeanPropertyDefinitionpublic AnnotatedMember getPrimaryMember()
BeanPropertyDefinition
Note: may throw IllegalArgumentException in case problems are found
trying to getter or setter info.
Note: abstract since 2.5
getPrimaryMember in class BeanPropertyDefinitionpublic java.lang.Class<?>[] findViews()
BeanPropertyDefinitionfindViews in class BeanPropertyDefinitionpublic AnnotationIntrospector.ReferenceProperty findReferenceType()
BeanPropertyDefinitionfindReferenceType in class BeanPropertyDefinitionpublic boolean isTypeId()
BeanPropertyDefinitionisTypeId in class BeanPropertyDefinitionpublic ObjectIdInfo findObjectIdInfo()
BeanPropertyDefinitionfindObjectIdInfo in class BeanPropertyDefinitionpublic JsonInclude.Value findInclusion()
BeanPropertyDefinitionfindInclusion in class BeanPropertyDefinitionpublic JsonProperty.Access findAccess()
public void addField(AnnotatedField a, PropertyName name, boolean explName, boolean visible, boolean ignored)
public void addCtor(AnnotatedParameter a, PropertyName name, boolean explName, boolean visible, boolean ignored)
public void addGetter(AnnotatedMethod a, PropertyName name, boolean explName, boolean visible, boolean ignored)
public void addSetter(AnnotatedMethod a, PropertyName name, boolean explName, boolean visible, boolean ignored)
public void addAll(POJOPropertyBuilder src)
public void removeIgnored()
@Deprecated public JsonProperty.Access removeNonVisible(boolean inferMutators)
public JsonProperty.Access removeNonVisible(boolean inferMutators, POJOPropertiesCollector parent)
inferMutators - Whether mutators can be "pulled in" by visible
accessors or not.public void removeConstructors()
public void trimByVisibility()
public void mergeAnnotations(boolean forSerialization)
public boolean anyVisible()
public boolean anyIgnorals()
public java.util.Set<PropertyName> findExplicitNames()
public java.util.Collection<POJOPropertyBuilder> explode(java.util.Collection<PropertyName> newNames)
findExplicitNames() found
multiple distinct explicit names, and the property this builder represents
basically needs to be broken apart and replaced by a set of more than
one properties.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2010 - 2023 Adobe. All Rights Reserved