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.SerializableSimple 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 classPropertyMetadata.MergeInfoHelper 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 PropertyMetadataSTD_OPTIONALstatic PropertyMetadataSTD_REQUIREDstatic PropertyMetadataSTD_REQUIRED_OR_OPTIONAL 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static PropertyMetadataconstruct(boolean req, java.lang.String desc, java.lang.Integer index, java.lang.String defaultValue)Deprecated.static PropertyMetadataconstruct(java.lang.Boolean req, java.lang.String desc, java.lang.Integer index, java.lang.String defaultValue)NullsgetContentNulls()java.lang.StringgetDefaultValue()java.lang.StringgetDescription()java.lang.IntegergetIndex()PropertyMetadata.MergeInfogetMergeInfo()java.lang.BooleangetRequired()NullsgetValueNulls()booleanhasDefaultValue()Accessor for determining whether property has declared "default value", which may be used by extension modules.booleanhasIndex()booleanisRequired()PropertyMetadatawithDefaultValue(java.lang.String def)PropertyMetadatawithDescription(java.lang.String desc)PropertyMetadatawithIndex(java.lang.Integer index)PropertyMetadatawithMergeInfo(PropertyMetadata.MergeInfo mergeInfo)PropertyMetadatawithNulls(Nulls valueNulls, Nulls contentNulls)PropertyMetadatawithRequired(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
 
 
 - 
 
 -