java.lang.Object
tools.jackson.databind.PropertyMetadata
- All Implemented Interfaces:
Serializable
Simple container class used for storing "additional" metadata about
properties. Carved out to reduce number of distinct properties that
actual property implementations and place holders need to store;
since instances are immutable, they can be freely shared.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classHelper class used for containing information about expected merge information for this property, if merging is expected. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected NullsSettings regarding handling of incoming `null`s, both for value itself and, for structured types, content values (array/Collection elements, Map values).protected final StringOptional default value, as String, for property; not used for any functionality by core databind, offered as metadata for extensions.protected final StringOptional human-readable description associated with the property.protected final IntegerOptional index of the property within containing Object.protected final PropertyMetadata.MergeInfoSettings regarding merging, if property is determined to possibly be mergeable (possibly since global settings may be omitted for non-mergeable types).protected final BooleanThree states: required, not required and unknown; unknown represented as null.protected NullsSettings regarding handling of incoming `null`s, both for value itself and, for structured types, content values (array/Collection elements, Map values).static final PropertyMetadatastatic final PropertyMetadatastatic final PropertyMetadata -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPropertyMetadata(Boolean req, String desc, Integer index, String def, PropertyMetadata.MergeInfo mergeInfo, Nulls valueNulls, Nulls contentNulls) -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertyMetadatagetIndex()booleanAccessor for determining whether property has declared "default value", which may be used by extension modules.booleanhasIndex()booleanprotected ObjectMinor optimization: let's canonicalize back to placeholders in cases where there is no real data to considerwithDefaultValue(String def) withDescription(String desc) withMergeInfo(PropertyMetadata.MergeInfo mergeInfo)
-
Field Details
-
STD_REQUIRED
-
STD_OPTIONAL
-
STD_REQUIRED_OR_OPTIONAL
-
_required
Three states: required, not required and unknown; unknown represented as null. -
_description
Optional human-readable description associated with the property. -
_index
Optional index of the property within containing Object.- Since:
- 2.4
-
_defaultValue
Optional default value, as String, for property; not used for any functionality by core databind, offered as metadata for extensions. -
_mergeInfo
Settings regarding merging, if property is determined to possibly be mergeable (possibly since global settings may be omitted for non-mergeable types).NOTE: transient since it is assumed that this information is only relevant during initial setup and not needed after full initialization. May be changed if this proves necessary.
- Since:
- 2.9
-
_valueNulls
Settings regarding handling of incoming `null`s, both for value itself and, for structured types, content values (array/Collection elements, Map values).- Since:
- 2.9
-
_contentNulls
Settings regarding handling of incoming `null`s, both for value itself and, for structured types, content values (array/Collection elements, Map values).- Since:
- 2.9
-
-
Constructor Details
-
Method Details
-
construct
public static PropertyMetadata construct(Boolean req, String desc, Integer index, String defaultValue) -
readResolve
Minor optimization: let's canonicalize back to placeholders in cases where there is no real data to consider -
withDescription
-
withMergeInfo
-
withNulls
-
withDefaultValue
-
withIndex
-
withRequired
-
getDescription
-
getDefaultValue
- Since:
- 2.5
-
hasDefaultValue
public boolean hasDefaultValue()Accessor for determining whether property has declared "default value", which may be used by extension modules.- Since:
- 2.6
-
isRequired
public boolean isRequired() -
getRequired
-
getIndex
- Since:
- 2.4
-
hasIndex
public boolean hasIndex()- Since:
- 2.4
-
getMergeInfo
- Since:
- 2.9
-
getValueNulls
- Since:
- 2.9
-
getContentNulls
- Since:
- 2.9
-