Package net.sourceforge.pmd.properties
Class PropertyDescriptor<T>
java.lang.Object
net.sourceforge.pmd.properties.PropertyDescriptor<T>
- Type Parameters:
T
- Type of the property's value
Describes a property of a rule or a renderer.
Usage of this API is described on PropertyFactory
.
A property descriptor provides validation,
serialization, and default values for a datatype <T>
.
Property descriptors are immutable and can be shared freely.
- Author:
- Brian Remedios, Clément Fournier
- Version:
- 7.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionDefault value to use when the user hasn't specified one or when they wish to revert to a known-good state.Describes the property and the role it plays within the rule it is specified for.boolean
int
hashCode()
boolean
Returns whether the property is available to XPath queries.name()
The name of the property without spaces as it serves as the key into the property map.Returns the strategy used to read and write this property to XML.toString()
-
Method Details
-
name
The name of the property without spaces as it serves as the key into the property map.- Returns:
- String
-
description
Describes the property and the role it plays within the rule it is specified for. Could be used in a tooltip.- Returns:
- String
-
defaultValue
Default value to use when the user hasn't specified one or when they wish to revert to a known-good state.- Returns:
- Object
-
serializer
Returns the strategy used to read and write this property to XML. May support strings too. -
isXPathAvailable
public boolean isXPathAvailable()Returns whether the property is available to XPath queries. -
toString
-
equals
-
hashCode
public int hashCode()
-