public class PropertyMetadata extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected String |
_defaultValue
Optional default value, as String, for property; not used cor
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 Boolean |
_required
Three states: required, not required and unknown; unknown represented
as null.
|
static PropertyMetadata |
STD_OPTIONAL |
static PropertyMetadata |
STD_REQUIRED |
static PropertyMetadata |
STD_REQUIRED_OR_OPTIONAL |
Modifier | Constructor and Description |
---|---|
protected |
PropertyMetadata(Boolean req,
String desc)
Deprecated.
|
protected |
PropertyMetadata(Boolean req,
String desc,
Integer index,
String def) |
Modifier and Type | Method and Description |
---|---|
static PropertyMetadata |
construct(boolean req,
String desc)
Deprecated.
|
static PropertyMetadata |
construct(boolean req,
String desc,
Integer index,
String defaultValue) |
String |
getDefaultValue() |
String |
getDescription() |
Integer |
getIndex() |
Boolean |
getRequired() |
boolean |
hasDefuaultValue() |
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 |
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
@Deprecated protected PropertyMetadata(Boolean req, String desc)
@Deprecated public static PropertyMetadata construct(boolean req, String desc)
public static PropertyMetadata construct(boolean req, String desc, Integer index, String defaultValue)
protected Object readResolve()
public PropertyMetadata withDescription(String desc)
public PropertyMetadata withDefaultValue(String def)
public PropertyMetadata withIndex(Integer index)
public PropertyMetadata withRequired(Boolean b)
public String getDescription()
public String getDefaultValue()
public boolean hasDefuaultValue()
public boolean isRequired()
public Boolean getRequired()
public Integer getIndex()
public boolean hasIndex()
Copyright © 2014-2015 FasterXML. All Rights Reserved.