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 StringOriginal internal name, derived from accessor, of this property.protected final StringExternal 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 TypeMethodDescriptionvoidMethod for adding all property members from specified collector into this collector.voidaddCtor(AnnotatedParameter a, String ename, boolean visible, boolean ignored) voidaddField(AnnotatedField a, String ename, boolean visible, boolean ignored) voidaddGetter(AnnotatedMethod a, String ename, boolean visible, boolean ignored) voidaddSetter(AnnotatedMethod a, String ename, boolean visible, boolean ignored) booleanbooleanbooleanbooleanbooleanintcompareTo(POJOPropertyBuilder other) booleanMethod 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).booleanbooleanhasField()booleanbooleanbooleanAccessor that can be called to check whether property was included due to an explicit marker (usually annotation), or just by naming convention.voidmergeAnnotations(boolean forSerialization) voidMethod called to remove all entries that are marked as ignored.voidtoString()voidMethod 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:
compareToin interfaceComparable<POJOPropertyBuilder>
-
getName
Description copied from class:BeanPropertyDefinitionAccessor for name used for external representation (in JSON).- Specified by:
getNamein interfaceNamed- Specified by:
getNamein classBeanPropertyDefinition
-
getInternalName
Description copied from class:BeanPropertyDefinitionAccessor 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:
getInternalNamein classBeanPropertyDefinition
-
isExplicitlyIncluded
public boolean isExplicitlyIncluded()Description copied from class:BeanPropertyDefinitionAccessor that can be called to check whether property was included due to an explicit marker (usually annotation), or just by naming convention.- Specified by:
isExplicitlyIncludedin 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:
hasGetterin classBeanPropertyDefinition
-
hasSetter
public boolean hasSetter()- Specified by:
hasSetterin classBeanPropertyDefinition
-
hasField
public boolean hasField()- Specified by:
hasFieldin classBeanPropertyDefinition
-
hasConstructorParameter
public boolean hasConstructorParameter()- Specified by:
hasConstructorParameterin classBeanPropertyDefinition
-
getAccessor
Description copied from class:BeanPropertyDefinitionMethod used to find accessor (getter, field to access) to use for accessing value of the property. Null if no such member exists.- Specified by:
getAccessorin classBeanPropertyDefinition
-
getMutator
Description copied from class:BeanPropertyDefinitionMethod used to find mutator (constructor parameter, setter, field) to use for changing value of the property. Null if no such member exists.- Specified by:
getMutatorin classBeanPropertyDefinition
-
couldSerialize
public boolean couldSerialize()- Overrides:
couldSerializein classBeanPropertyDefinition
-
getGetter
- Specified by:
getGetterin classBeanPropertyDefinition
-
getSetter
- Specified by:
getSetterin classBeanPropertyDefinition
-
getField
- Specified by:
getFieldin classBeanPropertyDefinition
-
getConstructorParameter
- Specified by:
getConstructorParameterin 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
-