Package com.fasterxml.jackson.databind
Class PropertyMetadata
- java.lang.Object
-
- com.fasterxml.jackson.databind.PropertyMetadata
-
- All Implemented Interfaces:
java.io.Serializable
public class PropertyMetadata extends java.lang.Object implements java.io.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.- Since:
- 2.3
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PropertyMetadata.MergeInfo
Helper class used for containing information about expected merge information for this property, if merging is expected.
-
Field Summary
Fields Modifier and Type Field Description static PropertyMetadata
STD_OPTIONAL
static PropertyMetadata
STD_REQUIRED
static PropertyMetadata
STD_REQUIRED_OR_OPTIONAL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static PropertyMetadata
construct(boolean req, java.lang.String desc, java.lang.Integer index, java.lang.String defaultValue)
Deprecated.static PropertyMetadata
construct(java.lang.Boolean req, java.lang.String desc, java.lang.Integer index, java.lang.String defaultValue)
Nulls
getContentNulls()
java.lang.String
getDefaultValue()
java.lang.String
getDescription()
java.lang.Integer
getIndex()
PropertyMetadata.MergeInfo
getMergeInfo()
java.lang.Boolean
getRequired()
Nulls
getValueNulls()
boolean
hasDefaultValue()
Accessor for determining whether property has declared "default value", which may be used by extension modules.boolean
hasIndex()
boolean
isRequired()
PropertyMetadata
withDefaultValue(java.lang.String def)
PropertyMetadata
withDescription(java.lang.String desc)
PropertyMetadata
withIndex(java.lang.Integer index)
PropertyMetadata
withMergeInfo(PropertyMetadata.MergeInfo mergeInfo)
PropertyMetadata
withNulls(Nulls valueNulls, Nulls contentNulls)
PropertyMetadata
withRequired(java.lang.Boolean b)
-
-
-
Field Detail
-
STD_REQUIRED
public static final PropertyMetadata STD_REQUIRED
-
STD_OPTIONAL
public static final PropertyMetadata STD_OPTIONAL
-
STD_REQUIRED_OR_OPTIONAL
public static final PropertyMetadata STD_REQUIRED_OR_OPTIONAL
-
-
Method Detail
-
construct
public static PropertyMetadata construct(java.lang.Boolean req, java.lang.String desc, java.lang.Integer index, java.lang.String defaultValue)
- Since:
- 2.8.8
-
construct
@Deprecated public static PropertyMetadata construct(boolean req, java.lang.String desc, java.lang.Integer index, java.lang.String defaultValue)
Deprecated.
-
withDescription
public PropertyMetadata withDescription(java.lang.String desc)
-
withMergeInfo
public PropertyMetadata withMergeInfo(PropertyMetadata.MergeInfo mergeInfo)
- Since:
- 2.9
-
withNulls
public PropertyMetadata withNulls(Nulls valueNulls, Nulls contentNulls)
- Since:
- 2.9
-
withDefaultValue
public PropertyMetadata withDefaultValue(java.lang.String def)
-
withIndex
public PropertyMetadata withIndex(java.lang.Integer index)
-
withRequired
public PropertyMetadata withRequired(java.lang.Boolean b)
-
getDescription
public java.lang.String getDescription()
-
getDefaultValue
public java.lang.String 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
public java.lang.Boolean getRequired()
-
getIndex
public java.lang.Integer getIndex()
- Since:
- 2.4
-
hasIndex
public boolean hasIndex()
- Since:
- 2.4
-
getMergeInfo
public PropertyMetadata.MergeInfo getMergeInfo()
- Since:
- 2.9
-
getValueNulls
public Nulls getValueNulls()
- Since:
- 2.9
-
getContentNulls
public Nulls getContentNulls()
- Since:
- 2.9
-
-