public class PropertyMetadata
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_defaultValue
Optional default value, as String, for property; not used cor
any functionality by core databind, offered as metadata for
extensions.
|
protected java.lang.String |
_description
Optional human-readable description associated with the property.
|
protected java.lang.Integer |
_index
Optional index of the property within containing Object.
|
protected java.lang.Boolean |
_required
Three states: required, not required and unknown; unknown represented
as null.
|
private static long |
serialVersionUID |
static PropertyMetadata |
STD_OPTIONAL |
static PropertyMetadata |
STD_REQUIRED |
static PropertyMetadata |
STD_REQUIRED_OR_OPTIONAL |
Modifier | Constructor and Description |
---|---|
protected |
PropertyMetadata(java.lang.Boolean req,
java.lang.String desc)
Deprecated.
|
protected |
PropertyMetadata(java.lang.Boolean req,
java.lang.String desc,
java.lang.Integer index,
java.lang.String def) |
Modifier and Type | Method and Description |
---|---|
static PropertyMetadata |
construct(boolean req,
java.lang.String desc)
Deprecated.
|
static PropertyMetadata |
construct(boolean req,
java.lang.String desc,
java.lang.Integer index,
java.lang.String defaultValue) |
java.lang.String |
getDefaultValue() |
java.lang.String |
getDescription() |
java.lang.Integer |
getIndex() |
java.lang.Boolean |
getRequired() |
boolean |
hasDefaultValue()
Accessor for determining whether property has declared "default value",
which may be used by extension modules.
|
boolean |
hasDefuaultValue()
Deprecated.
Since 2.6: typo in name, use
hasDefaultValue() instead. |
boolean |
hasIndex() |
boolean |
isRequired() |
protected java.lang.Object |
readResolve()
Minor optimization: let's canonicalize back to placeholders in cases
where there is no real data to consider
|
PropertyMetadata |
withDefaultValue(java.lang.String def) |
PropertyMetadata |
withDescription(java.lang.String desc) |
PropertyMetadata |
withIndex(java.lang.Integer index) |
PropertyMetadata |
withRequired(java.lang.Boolean b) |
private static final long serialVersionUID
public static final PropertyMetadata STD_REQUIRED
public static final PropertyMetadata STD_OPTIONAL
public static final PropertyMetadata STD_REQUIRED_OR_OPTIONAL
protected final java.lang.Boolean _required
protected final java.lang.String _description
protected final java.lang.Integer _index
protected final java.lang.String _defaultValue
@Deprecated protected PropertyMetadata(java.lang.Boolean req, java.lang.String desc)
protected PropertyMetadata(java.lang.Boolean req, java.lang.String desc, java.lang.Integer index, java.lang.String def)
@Deprecated public static PropertyMetadata construct(boolean req, java.lang.String desc)
public static PropertyMetadata construct(boolean req, java.lang.String desc, java.lang.Integer index, java.lang.String defaultValue)
protected java.lang.Object readResolve()
public PropertyMetadata withDescription(java.lang.String desc)
public PropertyMetadata withDefaultValue(java.lang.String def)
public PropertyMetadata withIndex(java.lang.Integer index)
public PropertyMetadata withRequired(java.lang.Boolean b)
public java.lang.String getDescription()
public java.lang.String getDefaultValue()
@Deprecated public boolean hasDefuaultValue()
hasDefaultValue()
instead.public boolean hasDefaultValue()
public boolean isRequired()
public java.lang.Boolean getRequired()
public java.lang.Integer getIndex()
public boolean hasIndex()