|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- public interface PropertyDescriptor<T>
Property value descriptor that defines the use & requirements for setting property values for use within PMD and any associated GUIs. While concrete descriptor instances are static and immutable they provide validation, serialization, and default values for any specific datatypes.
Method Summary | |
---|---|
java.lang.String |
asDelimitedString(T value)
Formats the object onto a string suitable for storage within the property map. |
java.util.Map<java.lang.String,java.lang.String> |
attributeValuesById()
Returns a map representing all the property attributes of the receiver in string form. |
java.lang.Object[][] |
choices()
Returns a set of choice tuples if available, returns null if none are defined. |
T |
defaultValue()
Default value to use when the user hasn't specified one or when they wish to revert to a known-good state. |
java.lang.String |
description()
Describes the property and the role it plays within the rule it is specified for. |
java.lang.String |
errorFor(java.lang.Object value)
Validation function that returns a diagnostic error message for a sample property value. |
boolean |
isMultiValue()
Returns whether the property is multi-valued, i.e. |
boolean |
isRequired()
Denotes whether the value is required before the rule can be executed. |
char |
multiValueDelimiter()
Return the character being used to delimit multiple property values within a single string. |
java.lang.String |
name()
The name of the property without spaces as it serves as the key into the property map. |
int |
preferredRowCount()
If the datatype is a String then return the preferred number of rows to allocate in the text widget, returns a value of one for all other types. |
java.lang.String |
propertyErrorFor(Rule rule)
A convenience method that returns an error string if the rule holds onto a property value that has a problem. |
java.lang.Class<T> |
type()
Denotes the value datatype. |
float |
uiOrder()
Denotes the relative order the property field should occupy if we are using an auto-generated UI to display and edit property values. |
T |
valueFrom(java.lang.String propertyString)
If the property is multi-valued then return the separate values after parsing the propertyString provided. |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
java.lang.String name()
java.lang.String description()
java.lang.Class<T> type()
boolean isMultiValue()
T defaultValue()
boolean isRequired()
java.lang.String errorFor(java.lang.Object value)
value
- Object
float uiOrder()
T valueFrom(java.lang.String propertyString) throws java.lang.IllegalArgumentException
propertyString
- String
java.lang.IllegalArgumentException
- if the given string cannot be parsedjava.lang.String asDelimitedString(T value)
value
- Object
java.lang.Object[][] choices()
java.lang.String propertyErrorFor(Rule rule)
rule
- Rule
char multiValueDelimiter()
int preferredRowCount()
java.util.Map<java.lang.String,java.lang.String> attributeValuesById()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |