net.sourceforge.pmd.lang.rule.properties
Class AbstractPackagedProperty<T>
java.lang.Object
net.sourceforge.pmd.lang.rule.properties.AbstractProperty<T>
net.sourceforge.pmd.lang.rule.properties.AbstractPackagedProperty<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- Comparable<PropertyDescriptor<?>>, PropertyDescriptor<T>
- Direct Known Subclasses:
- AbstractMultiPackagedProperty, MethodProperty, TypeProperty
public abstract class AbstractPackagedProperty<T>
- extends AbstractProperty<T>
Concrete subclasses manage items that reside within namespaces per the design
of the Java language. Rule developers can limit the range of permissible
items by specifying portions of their package names in the constructor. If
the legalPackageNames value is set to null then no restrictions are made.
- Author:
- Brian Remedios
Methods inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractProperty |
areEqual, asDelimitedString, asDelimitedString, asString, attributeValuesById, choices, compareTo, defaultAsString, defaultHasNullValue, defaultValue, description, equals, errorFor, hashCode, isArray, isMultiValue, isRequired, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, toString, typeErrorFor, uiOrder, valuesErrorFor |
PACKAGED_FIELD_TYPES_BY_KEY
protected static final Map<String,Boolean> PACKAGED_FIELD_TYPES_BY_KEY
AbstractPackagedProperty
protected AbstractPackagedProperty(String theName,
String theDescription,
T theDefault,
String[] theLegalPackageNames,
float theUIOrder)
- Parameters:
theName
- theDescription
- theDefault
- theLegalPackageNames
- theUIOrder
-
- Throws:
IllegalArgumentException
packageNamesIn
protected static String[] packageNamesIn(Map<String,String> params)
addAttributesTo
protected void addAttributesTo(Map<String,String> attributes)
- Overrides:
addAttributesTo
in class AbstractProperty<T>
- Parameters:
attributes
- Map
itemTypeName
protected abstract String itemTypeName()
- Method itemTypeName.
- Returns:
- String
valueErrorFor
protected String valueErrorFor(Object value)
- Overrides:
valueErrorFor
in class AbstractProperty<T>
- Parameters:
value
- Object
- Returns:
- String
packageNameOf
protected abstract String packageNameOf(Object item)
- Parameters:
item
- Object
- Returns:
- String
legalPackageNames
public String[] legalPackageNames()
- Returns:
- String[]
Copyright © 2002-2015 InfoEther. All Rights Reserved.