Serializable
public class PropertyMetadata extends Object implements Serializable
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.
|
Modifier and Type | Field | Description |
---|---|---|
protected com.fasterxml.jackson.annotation.Nulls |
_contentNulls |
Settings regarding handling of incoming `null`s, both for value itself
and, for structured types, content values (array/Collection elements,
Map values).
|
protected String |
_defaultValue |
Optional default value, as String, for property; not used for
any functionality by core databind, offered as metadata for
extensions.
|
protected String |
_description |
Optional human-readable description associated with the property.
|
protected Integer |
_index |
Optional index of the property within containing Object.
|
protected PropertyMetadata.MergeInfo |
_mergeInfo |
Settings regarding merging, if property is determined to possibly
be mergeable (possibly since global settings may be omitted for
non-mergeable types).
|
protected Boolean |
_required |
Three states: required, not required and unknown; unknown represented
as null.
|
protected com.fasterxml.jackson.annotation.Nulls |
_valueNulls |
Settings regarding handling of incoming `null`s, both for value itself
and, for structured types, content values (array/Collection elements,
Map values).
|
static PropertyMetadata |
STD_OPTIONAL |
|
static PropertyMetadata |
STD_REQUIRED |
|
static PropertyMetadata |
STD_REQUIRED_OR_OPTIONAL |
Modifier | Constructor | Description |
---|---|---|
protected |
PropertyMetadata(Boolean req,
String desc,
Integer index,
String def,
PropertyMetadata.MergeInfo mergeInfo,
com.fasterxml.jackson.annotation.Nulls valueNulls,
com.fasterxml.jackson.annotation.Nulls contentNulls) |
Modifier and Type | Method | Description |
---|---|---|
static PropertyMetadata |
construct(boolean req,
String desc,
Integer index,
String defaultValue) |
Deprecated.
|
static PropertyMetadata |
construct(Boolean req,
String desc,
Integer index,
String defaultValue) |
|
com.fasterxml.jackson.annotation.Nulls |
getContentNulls() |
|
String |
getDefaultValue() |
|
String |
getDescription() |
|
Integer |
getIndex() |
|
PropertyMetadata.MergeInfo |
getMergeInfo() |
|
Boolean |
getRequired() |
|
com.fasterxml.jackson.annotation.Nulls |
getValueNulls() |
|
boolean |
hasDefaultValue() |
Accessor for determining whether property has declared "default value",
which may be used by extension modules.
|
boolean |
hasIndex() |
|
boolean |
isRequired() |
|
protected Object |
readResolve() |
Minor optimization: let's canonicalize back to placeholders in cases
where there is no real data to consider
|
PropertyMetadata |
withDefaultValue(String def) |
|
PropertyMetadata |
withDescription(String desc) |
|
PropertyMetadata |
withIndex(Integer index) |
|
PropertyMetadata |
withMergeInfo(PropertyMetadata.MergeInfo mergeInfo) |
|
PropertyMetadata |
withNulls(com.fasterxml.jackson.annotation.Nulls valueNulls,
com.fasterxml.jackson.annotation.Nulls contentNulls) |
|
PropertyMetadata |
withRequired(Boolean b) |
public static final PropertyMetadata STD_REQUIRED
public static final PropertyMetadata STD_OPTIONAL
public static final PropertyMetadata STD_REQUIRED_OR_OPTIONAL
protected final Boolean _required
protected final String _description
protected final Integer _index
protected final String _defaultValue
protected final transient PropertyMetadata.MergeInfo _mergeInfo
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.
protected com.fasterxml.jackson.annotation.Nulls _valueNulls
protected com.fasterxml.jackson.annotation.Nulls _contentNulls
protected PropertyMetadata(Boolean req, String desc, Integer index, String def, PropertyMetadata.MergeInfo mergeInfo, com.fasterxml.jackson.annotation.Nulls valueNulls, com.fasterxml.jackson.annotation.Nulls contentNulls)
public static PropertyMetadata construct(Boolean req, String desc, Integer index, String defaultValue)
@Deprecated public static PropertyMetadata construct(boolean req, String desc, Integer index, String defaultValue)
protected Object readResolve()
public PropertyMetadata withDescription(String desc)
public PropertyMetadata withMergeInfo(PropertyMetadata.MergeInfo mergeInfo)
public PropertyMetadata withNulls(com.fasterxml.jackson.annotation.Nulls valueNulls, com.fasterxml.jackson.annotation.Nulls contentNulls)
public PropertyMetadata withDefaultValue(String def)
public PropertyMetadata withIndex(Integer index)
public PropertyMetadata withRequired(Boolean b)
public String getDescription()
public String getDefaultValue()
public boolean hasDefaultValue()
public boolean isRequired()
public Boolean getRequired()
public Integer getIndex()
public boolean hasIndex()
public PropertyMetadata.MergeInfo getMergeInfo()
public com.fasterxml.jackson.annotation.Nulls getValueNulls()
public com.fasterxml.jackson.annotation.Nulls getContentNulls()
Copyright © 2008–2018. All rights reserved.