Class POJOPropertyBuilder
java.lang.Object
org.codehaus.jackson.map.BeanPropertyDefinition
org.codehaus.jackson.map.introspect.POJOPropertyBuilder
- All Implemented Interfaces:
Comparable<POJOPropertyBuilder>
,Named
public class POJOPropertyBuilder
extends BeanPropertyDefinition
implements Comparable<POJOPropertyBuilder>
Helper class used for aggregating information about a single
potential POJO property.
- Since:
- 1.9
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.codehaus.jackson.map.introspect.POJOPropertyBuilder.Node
<AnnotatedParameter> protected org.codehaus.jackson.map.introspect.POJOPropertyBuilder.Node
<AnnotatedField> protected org.codehaus.jackson.map.introspect.POJOPropertyBuilder.Node
<AnnotatedMethod> protected final String
Original internal name, derived from accessor, of this property.protected final String
External name of logical property; may change with renaming (by new instance being constructed using a new name)protected org.codehaus.jackson.map.introspect.POJOPropertyBuilder.Node
<AnnotatedMethod> -
Constructor Summary
ConstructorsConstructorDescriptionPOJOPropertyBuilder
(String internalName) POJOPropertyBuilder
(POJOPropertyBuilder src, String newName) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
boolean
boolean
boolean
boolean
int
compareTo
(POJOPropertyBuilder other) boolean
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.Method used to find accessor (getter, field to access) to use for accessing value of the property.getField()
Accessor that can be used to determine implicit name from underlying element(s) before possible renaming.Method used to find mutator (constructor parameter, setter, field) to use for changing value of the property.getName()
Accessor for name used for external representation (in JSON).boolean
boolean
hasField()
boolean
boolean
boolean
Accessor that can be called to check whether property was included due to an explicit marker (usually annotation), or just by naming convention.void
mergeAnnotations
(boolean forSerialization) void
Method called to remove all entries that are marked as ignored.void
toString()
void
Method called to trim unnecessary entries, such as implicit getter if there is an explict one available.Method for constructing a renamed instanceMethods inherited from class org.codehaus.jackson.map.BeanPropertyDefinition
couldDeserialize
-
Field Details
-
_name
External name of logical property; may change with renaming (by new instance being constructed using a new name) -
_internalName
Original internal name, derived from accessor, of this property. Will not be changed by renaming. -
_fields
-
_ctorParameters
protected org.codehaus.jackson.map.introspect.POJOPropertyBuilder.Node<AnnotatedParameter> _ctorParameters -
_getters
-
_setters
-
-
Constructor Details
-
POJOPropertyBuilder
-
POJOPropertyBuilder
-
-
Method Details
-
withName
Method for constructing a renamed instance -
compareTo
- Specified by:
compareTo
in interfaceComparable<POJOPropertyBuilder>
-
getName
Description copied from class:BeanPropertyDefinition
Accessor for name used for external representation (in JSON).- Specified by:
getName
in interfaceNamed
- Specified by:
getName
in classBeanPropertyDefinition
-
getInternalName
Description copied from class:BeanPropertyDefinition
Accessor that can be used to determine implicit name from underlying element(s) before possible renaming. This is the "internal" name derived from accessor ("x" from "getX"), and is not based on annotations or naming strategy.- Specified by:
getInternalName
in classBeanPropertyDefinition
-
isExplicitlyIncluded
public boolean isExplicitlyIncluded()Description copied from class:BeanPropertyDefinition
Accessor that can be called to check whether property was included due to an explicit marker (usually annotation), or just by naming convention.- Specified by:
isExplicitlyIncluded
in classBeanPropertyDefinition
- Returns:
- True if property was explicitly included (usually by having one of components being annotated); false if inclusion was purely due to naming or visibility definitions (that is, implicit)
-
hasGetter
public boolean hasGetter()- Specified by:
hasGetter
in classBeanPropertyDefinition
-
hasSetter
public boolean hasSetter()- Specified by:
hasSetter
in classBeanPropertyDefinition
-
hasField
public boolean hasField()- Specified by:
hasField
in classBeanPropertyDefinition
-
hasConstructorParameter
public boolean hasConstructorParameter()- Specified by:
hasConstructorParameter
in classBeanPropertyDefinition
-
getAccessor
Description copied from class:BeanPropertyDefinition
Method used to find accessor (getter, field to access) to use for accessing value of the property. Null if no such member exists.- Specified by:
getAccessor
in classBeanPropertyDefinition
-
getMutator
Description copied from class:BeanPropertyDefinition
Method used to find mutator (constructor parameter, setter, field) to use for changing value of the property. Null if no such member exists.- Specified by:
getMutator
in classBeanPropertyDefinition
-
couldSerialize
public boolean couldSerialize()- Overrides:
couldSerialize
in classBeanPropertyDefinition
-
getGetter
- Specified by:
getGetter
in classBeanPropertyDefinition
-
getSetter
- Specified by:
getSetter
in classBeanPropertyDefinition
-
getField
- Specified by:
getField
in classBeanPropertyDefinition
-
getConstructorParameter
- Specified by:
getConstructorParameter
in classBeanPropertyDefinition
-
addField
-
addCtor
-
addGetter
-
addSetter
-
addAll
Method for adding all property members from specified collector into this collector. -
removeIgnored
public void removeIgnored()Method called to remove all entries that are marked as ignored. -
removeNonVisible
public void removeNonVisible() -
trimByVisibility
public void trimByVisibility()Method called to trim unnecessary entries, such as implicit getter if there is an explict one available. This is important for later stages, to avoid unnecessary conflicts. -
mergeAnnotations
public void mergeAnnotations(boolean forSerialization) -
anyExplicitNames
public boolean anyExplicitNames() -
anyVisible
public boolean anyVisible() -
anyIgnorals
public boolean anyIgnorals() -
anyDeserializeIgnorals
public boolean anyDeserializeIgnorals() -
anySerializeIgnorals
public boolean anySerializeIgnorals() -
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. -
toString
-