net.sourceforge.pmd.lang.rule.properties
Class AbstractScalarProperty<T>
java.lang.Object
net.sourceforge.pmd.lang.rule.properties.AbstractProperty<T>
net.sourceforge.pmd.lang.rule.properties.AbstractScalarProperty<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- Comparable<PropertyDescriptor<?>>, PropertyDescriptor<T>
- Direct Known Subclasses:
- AbstractNumericProperty, BooleanMultiProperty, BooleanProperty
public abstract class AbstractScalarProperty<T>
- extends AbstractProperty<T>
No, subclasses are not necessarily scalar per se, they're just easy to parse
without error. If you can come up with a better name...
- Author:
- Brian Remedios
Methods inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractProperty |
addAttributesTo, areEqual, asDelimitedString, asDelimitedString, asString, attributeValuesById, choices, compareTo, defaultAsString, defaultHasNullValue, defaultValue, description, equals, errorFor, hashCode, isArray, isMultiValue, isRequired, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, toString, typeErrorFor, uiOrder, valueErrorFor, valuesErrorFor |
AbstractScalarProperty
protected AbstractScalarProperty(String theName,
String theDescription,
T theDefault,
float theUIOrder)
- Constructor for AbstractScalarProperty.
- Parameters:
theName
- StringtheDescription
- StringtheDefault
- ObjecttheUIOrder
- float
createFrom
protected abstract Object createFrom(String value)
- Parameters:
value
- String
- Returns:
- Object
arrayFor
protected Object[] arrayFor(int size)
- Parameters:
size
- int
- Returns:
- Object[]
valueFrom
public T valueFrom(String valueString)
throws IllegalArgumentException
- Description copied from interface:
PropertyDescriptor
- If the property is multi-valued then return the separate values after
parsing the propertyString provided. If it isn't a multi-valued property
then the value will be returned within an array of size[1].
- Parameters:
valueString
- String
- Returns:
- Object[]
- Throws:
IllegalArgumentException
- See Also:
PropertyDescriptor.valueFrom(String)
Copyright © 2002-2015 InfoEther. All Rights Reserved.