|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder
public class POJOPropertyBuilder
Helper class used for aggregating information about a single potential POJO property.
Field Summary | |
---|---|
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 String |
_internalName
Original internal name, derived from accessor, of this property. |
protected String |
_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
|
Constructor Summary | |
---|---|
POJOPropertyBuilder(POJOPropertyBuilder src,
String newName)
|
|
POJOPropertyBuilder(String internalName,
AnnotationIntrospector annotationIntrospector,
boolean forSerialization)
|
Method Summary | ||
---|---|---|
void |
addAll(POJOPropertyBuilder src)
Method for adding all property members from specified collector into this collector. |
|
void |
addCtor(AnnotatedParameter a,
String ename,
boolean visible,
boolean ignored)
|
|
void |
addField(AnnotatedField a,
String ename,
boolean visible,
boolean ignored)
|
|
void |
addGetter(AnnotatedMethod a,
String ename,
boolean visible,
boolean ignored)
|
|
void |
addSetter(AnnotatedMethod a,
String ename,
boolean visible,
boolean ignored)
|
|
boolean |
anyIgnorals()
|
|
boolean |
anyVisible()
|
|
int |
compareTo(POJOPropertyBuilder other)
|
|
boolean |
couldSerialize()
|
|
String |
findNewName()
Method called to check whether property represented by this collector should be renamed from the implicit name; and also verify that there are no conflicting rename definitions. |
|
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
|
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()
|
|
AnnotatedMethod |
getGetter()
|
|
String |
getInternalName()
Accessor that can be used to determine implicit name from underlying element(s) before possible renaming. |
|
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 |
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()
|
|
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 |
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. |
|
void |
mergeAnnotations(boolean forSerialization)
|
|
void |
removeIgnored()
Method called to remove all entries that are marked as ignored. |
|
void |
removeNonVisible()
|
|
String |
toString()
|
|
void |
trimByVisibility()
Method called to trim unnecessary entries, such as implicit getter if there is an explict one available. |
|
POJOPropertyBuilder |
withName(String 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 . |
Methods inherited from class com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition |
---|
couldDeserialize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final boolean _forSerialization
protected final AnnotationIntrospector _annotationIntrospector
protected final String _name
protected final String _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
Constructor Detail |
---|
public POJOPropertyBuilder(String internalName, AnnotationIntrospector annotationIntrospector, boolean forSerialization)
public POJOPropertyBuilder(POJOPropertyBuilder src, String newName)
Method Detail |
---|
public POJOPropertyBuilder withName(String newName)
BeanPropertyDefinition
BeanPropertyDefinition.getName()
would return newName
.
withName
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 String getInternalName()
BeanPropertyDefinition
getInternalName
in class BeanPropertyDefinition
public boolean isExplicitlyIncluded()
BeanPropertyDefinition
isExplicitlyIncluded
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 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 boolean isRequired()
BeanPropertyDefinition
isRequired
in class BeanPropertyDefinition
public ObjectIdInfo findObjectIdInfo()
BeanPropertyDefinition
findObjectIdInfo
in class BeanPropertyDefinition
public void addField(AnnotatedField a, String ename, boolean visible, boolean ignored)
public void addCtor(AnnotatedParameter a, String ename, boolean visible, boolean ignored)
public void addGetter(AnnotatedMethod a, String ename, boolean visible, boolean ignored)
public void addSetter(AnnotatedMethod a, String ename, boolean visible, boolean ignored)
public void addAll(POJOPropertyBuilder src)
public void removeIgnored()
public void removeNonVisible()
public void trimByVisibility()
public void mergeAnnotations(boolean forSerialization)
public boolean anyVisible()
public boolean anyIgnorals()
public String findNewName()
public String toString()
toString
in class Object
protected <T> T fromMemberAnnotations(com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.WithMember<T> func)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |