|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.pmd.lang.rule.properties.AbstractProperty<T> net.sourceforge.pmd.lang.rule.properties.AbstractPackagedProperty<Class> net.sourceforge.pmd.lang.rule.properties.TypeProperty
public class TypeProperty
Defines a property that supports single class types, even for primitive values! TODO - untested for array types
Field Summary | |
---|---|
static PropertyDescriptorFactory |
FACTORY
|
Fields inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractPackagedProperty |
---|
PACKAGED_FIELD_TYPES_BY_KEY |
Fields inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractProperty |
---|
DEFAULT_DELIMITER, DEFAULT_NUMERIC_DELIMITER |
Constructor Summary | |
---|---|
TypeProperty(String theName,
String theDescription,
Class<?> theDefault,
String[] legalPackageNames,
float theUIOrder)
Constructor for TypeProperty. |
|
TypeProperty(String theName,
String theDescription,
String defaultTypeStr,
Map<String,String> otherParams,
float theUIOrder)
|
|
TypeProperty(String theName,
String theDescription,
String defaultTypeStr,
String[] legalPackageNames,
float theUIOrder)
|
Method Summary | |
---|---|
protected String |
asString(Object value)
Return the value as a string that can be easily recognized and parsed when we see it again. |
protected String |
defaultAsString()
|
protected String |
itemTypeName()
Method itemTypeName. |
protected String |
packageNameOf(Object item)
Method packageNameOf. |
Class<Class> |
type()
Denotes the value datatype. |
Class<?> |
valueFrom(String valueString)
If the property is multi-valued then return the separate values after parsing the propertyString provided. |
Methods inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractPackagedProperty |
---|
addAttributesTo, legalPackageNames, packageNamesIn, valueErrorFor |
Methods inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractProperty |
---|
areEqual, asDelimitedString, asDelimitedString, attributeValuesById, choices, compareTo, defaultHasNullValue, defaultValue, description, equals, errorFor, hashCode, isArray, isMultiValue, isRequired, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, toString, typeErrorFor, uiOrder, valuesErrorFor |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PropertyDescriptorFactory FACTORY
Constructor Detail |
---|
public TypeProperty(String theName, String theDescription, Class<?> theDefault, String[] legalPackageNames, float theUIOrder)
theName
- StringtheDescription
- StringtheDefault
- ClasslegalPackageNames
- String[]theUIOrder
- float
IllegalArgumentException
public TypeProperty(String theName, String theDescription, String defaultTypeStr, String[] legalPackageNames, float theUIOrder)
theName
- StringtheDescription
- StringdefaultTypeStr
- StringlegalPackageNames
- String[]theUIOrder
- float
IllegalArgumentException
public TypeProperty(String theName, String theDescription, String defaultTypeStr, Map<String,String> otherParams, float theUIOrder)
theName
- StringtheDescription
- StringdefaultTypeStr
- StringotherParams
- MaptheUIOrder
- float
IllegalArgumentException
Method Detail |
---|
protected String defaultAsString()
defaultAsString
in class AbstractProperty<Class>
protected String packageNameOf(Object item)
packageNameOf
in class AbstractPackagedProperty<Class>
item
- Object
public Class<Class> type()
PropertyDescriptor
PropertyDescriptor.type()
protected String itemTypeName()
AbstractPackagedProperty
itemTypeName
in class AbstractPackagedProperty<Class>
protected String asString(Object value)
AbstractProperty
asString
in class AbstractProperty<Class>
value
- Object
public Class<?> valueFrom(String valueString)
PropertyDescriptor
valueString
- String
PropertyDescriptor.valueFrom(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |