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)
Deprecated.
|
static PropertyMetadata |
construct(Boolean req,
String desc,
Integer index,
String defaultValue) |
String |
getDefaultValue() |
String |
getDescription() |
Integer |
getIndex() |
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 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)
@Deprecated 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()
@Deprecated public boolean hasDefuaultValue()
hasDefaultValue()
instead.public boolean hasDefaultValue()
public boolean isRequired()
public Boolean getRequired()
public Integer getIndex()
public boolean hasIndex()
Copyright © 2017 JBoss by Red Hat. All rights reserved.