public class POJOPropertyBuilder extends BeanPropertyDefinition implements Comparable<POJOPropertyBuilder>
Modifier and Type | Field and Description |
---|---|
protected AnnotationIntrospector |
_annotationIntrospector |
protected com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.Linked<AnnotatedParameter> |
_ctorParameters |
protected com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.Linked<AnnotatedField> |
_fields |
protected boolean |
_forSerialization
Whether property is being composed for serialization
(true) or deserialization (false)
|
protected com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.Linked<AnnotatedMethod> |
_getters |
protected PropertyName |
_internalName
Original internal name, derived from accessor, of this
property.
|
protected PropertyName |
_name
External name of logical property; may change with
renaming (by new instance being constructed using
a new name)
|
protected com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.Linked<AnnotatedMethod> |
_setters |
Modifier | Constructor and Description |
---|---|
|
POJOPropertyBuilder(POJOPropertyBuilder src,
PropertyName newName) |
|
POJOPropertyBuilder(PropertyName internalName,
AnnotationIntrospector ai,
boolean forSerialization) |
protected |
POJOPropertyBuilder(PropertyName internalName,
PropertyName name,
AnnotationIntrospector annotationIntrospector,
boolean forSerialization) |
|
POJOPropertyBuilder(String simpleInternalName,
AnnotationIntrospector annotationIntrospector,
boolean forSerialization)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected String |
_findDescription() |
protected Integer |
_findIndex() |
protected Boolean |
_findRequired() |
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 |
addCtor(AnnotatedParameter a,
String name,
boolean visible,
boolean ignored)
Deprecated.
Since 2.4 call method that takes additional 'explName' argument, to indicate
whether name of property was provided by annotation (and not derived from accessor name);
this method simply passes 'true' for it.
|
void |
addCtor(AnnotatedParameter a,
String name,
boolean explName,
boolean visible,
boolean ignored)
Deprecated.
|
void |
addField(AnnotatedField a,
PropertyName name,
boolean explName,
boolean visible,
boolean ignored) |
void |
addField(AnnotatedField a,
String name,
boolean visible,
boolean ignored)
Deprecated.
Since 2.4 call method that takes additional 'explName' argument, to indicate
whether name of property was provided by annotation (and not derived from accessor name);
this method simply passes 'true' for it.
|
void |
addField(AnnotatedField a,
String name,
boolean explName,
boolean visible,
boolean ignored)
Deprecated.
|
void |
addGetter(AnnotatedMethod a,
PropertyName name,
boolean explName,
boolean visible,
boolean ignored) |
void |
addGetter(AnnotatedMethod a,
String name,
boolean visible,
boolean ignored)
Deprecated.
Since 2.4 call method that takes additional 'explName' argument, to indicate
whether name of property was provided by annotation (and not derived from accessor name);
this method simply passes 'true' for it.
|
void |
addGetter(AnnotatedMethod a,
String name,
boolean explName,
boolean visible,
boolean ignored)
Deprecated.
|
void |
addSetter(AnnotatedMethod a,
PropertyName name,
boolean explName,
boolean visible,
boolean ignored) |
void |
addSetter(AnnotatedMethod a,
String name,
boolean visible,
boolean ignored)
Deprecated.
Since 2.4 call method that takes additional 'explName' argument, to indicate
whether name of property was provided by annotation (and not derived from accessor name);
this method simply passes 'true' for it.
|
void |
addSetter(AnnotatedMethod a,
String name,
boolean explName,
boolean visible,
boolean ignored)
Deprecated.
|
boolean |
anyIgnorals() |
boolean |
anyVisible() |
int |
compareTo(POJOPropertyBuilder other) |
boolean |
couldSerialize() |
Collection<POJOPropertyBuilder> |
explode(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. |
Set<PropertyName> |
findExplicitNames()
Method called to find out set of explicit names for accessors
bound together due to implicit name.
|
String |
findNewName()
Deprecated.
|
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.
|
Class<?>[] |
findViews()
Method used to find View-inclusion definitions for the property.
|
protected <T> T |
fromMemberAnnotations(com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.WithMember<T> func)
Helper method used for finding annotation values, from accessors
relevant to current usage (deserialization, serialization)
|
AnnotatedMember |
getAccessor()
Method used to find accessor (getter, field to access) to use for accessing
value of the property.
|
AnnotatedParameter |
getConstructorParameter() |
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()
Method for accessing additional metadata.
|
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 |
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 |
removeIgnored()
Method called to remove all entries that are marked as
ignored.
|
void |
removeNonVisible(boolean force) |
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 |
withName(String newName)
Deprecated.
|
POJOPropertyBuilder |
withSimpleName(String newSimpleName)
Alternate "mutant factory" that will only change simple name, but
leave other optional parts (like namespace) as is.
|
couldDeserialize, isRequired
protected final boolean _forSerialization
protected final AnnotationIntrospector _annotationIntrospector
protected final PropertyName _name
protected final PropertyName _internalName
protected com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.Linked<AnnotatedField> _fields
protected com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.Linked<AnnotatedParameter> _ctorParameters
protected com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.Linked<AnnotatedMethod> _getters
protected com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.Linked<AnnotatedMethod> _setters
public POJOPropertyBuilder(PropertyName internalName, AnnotationIntrospector ai, boolean forSerialization)
protected POJOPropertyBuilder(PropertyName internalName, PropertyName name, AnnotationIntrospector annotationIntrospector, boolean forSerialization)
@Deprecated public POJOPropertyBuilder(String simpleInternalName, AnnotationIntrospector annotationIntrospector, boolean forSerialization)
public POJOPropertyBuilder(POJOPropertyBuilder src, PropertyName newName)
@Deprecated public POJOPropertyBuilder withName(String newName)
withName
in class BeanPropertyDefinition
public POJOPropertyBuilder withName(PropertyName newName)
BeanPropertyDefinition
BeanPropertyDefinition.getName()
would return newName
.withName
in class BeanPropertyDefinition
public POJOPropertyBuilder withSimpleName(String newSimpleName)
BeanPropertyDefinition
withSimpleName
in class BeanPropertyDefinition
public int compareTo(POJOPropertyBuilder other)
compareTo
in interface Comparable<POJOPropertyBuilder>
public String getName()
BeanPropertyDefinition
getName
in interface Named
getName
in class BeanPropertyDefinition
public PropertyName getFullName()
getFullName
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 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 boolean couldSerialize()
couldSerialize
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 AnnotatedMember getAccessor()
BeanPropertyDefinition
getAccessor
in class BeanPropertyDefinition
public AnnotatedMember getMutator()
BeanPropertyDefinition
getMutator
in class BeanPropertyDefinition
public AnnotatedMember getNonConstructorMutator()
getNonConstructorMutator
in class BeanPropertyDefinition
public AnnotatedMember getPrimaryMember()
BeanPropertyDefinition
getPrimaryMember
in class BeanPropertyDefinition
public Class<?>[] findViews()
BeanPropertyDefinition
findViews
in class BeanPropertyDefinition
public AnnotationIntrospector.ReferenceProperty findReferenceType()
BeanPropertyDefinition
findReferenceType
in class BeanPropertyDefinition
public boolean isTypeId()
BeanPropertyDefinition
isTypeId
in class BeanPropertyDefinition
public PropertyMetadata getMetadata()
BeanPropertyDefinition
getMetadata
in class BeanPropertyDefinition
protected Boolean _findRequired()
protected String _findDescription()
protected Integer _findIndex()
public ObjectIdInfo findObjectIdInfo()
BeanPropertyDefinition
findObjectIdInfo
in class BeanPropertyDefinition
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)
@Deprecated public void addField(AnnotatedField a, String name, boolean visible, boolean ignored)
@Deprecated public void addField(AnnotatedField a, String name, boolean explName, boolean visible, boolean ignored)
@Deprecated public void addCtor(AnnotatedParameter a, String name, boolean visible, boolean ignored)
@Deprecated public void addCtor(AnnotatedParameter a, String name, boolean explName, boolean visible, boolean ignored)
@Deprecated public void addGetter(AnnotatedMethod a, String name, boolean visible, boolean ignored)
@Deprecated public void addGetter(AnnotatedMethod a, String name, boolean explName, boolean visible, boolean ignored)
@Deprecated public void addSetter(AnnotatedMethod a, String name, boolean visible, boolean ignored)
@Deprecated public void addSetter(AnnotatedMethod a, String name, boolean explName, boolean visible, boolean ignored)
public void removeIgnored()
public void removeNonVisible(boolean force)
public void trimByVisibility()
public void mergeAnnotations(boolean forSerialization)
public boolean anyVisible()
public boolean anyIgnorals()
@Deprecated public String findNewName()
findExplicitNames()
insteadpublic Set<PropertyName> findExplicitNames()
public Collection<POJOPropertyBuilder> explode(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.protected <T> T fromMemberAnnotations(com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.WithMember<T> func)
Copyright © 2014 FasterXML. All Rights Reserved.