|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.pmd.lang.rule.properties.AbstractProperty<T>
net.sourceforge.pmd.lang.rule.properties.AbstractPackagedProperty<T>
net.sourceforge.pmd.lang.rule.properties.AbstractMultiPackagedProperty<Method[]>
net.sourceforge.pmd.lang.rule.properties.MethodMultiProperty
public class MethodMultiProperty
Defines a property type that can specify multiple methods to use as part of a rule. Rule developers can limit the rules to those within designated packages per the 'legalPackages' argument in the constructor which can be an array of partial package names, i.e., ["java.lang", "com.mycompany" ].
| Field Summary | |
|---|---|
static PropertyDescriptorFactory |
FACTORY
|
| Fields inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractMultiPackagedProperty |
|---|
DELIMITER |
| 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 | |
|---|---|
MethodMultiProperty(String theName,
String theDescription,
Method[] theDefaults,
String[] legalPackageNames,
float theUIOrder)
Constructor for MethodProperty. |
|
MethodMultiProperty(String theName,
String theDescription,
String methodDefaults,
Map<String,String> otherParams,
float theUIOrder)
Constructor for MethodProperty. |
|
MethodMultiProperty(String theName,
String theDescription,
String methodDefaults,
String[] legalPackageNames,
float theUIOrder)
Constructor for MethodProperty. |
|
| 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 |
itemTypeName()
Method itemTypeName. |
static Method[] |
methodsFrom(String methodsStr)
|
protected String |
packageNameOf(Object item)
|
Class<Method[]> |
type()
Denotes the value datatype. |
Method[] |
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.AbstractMultiPackagedProperty |
|---|
defaultAsString, isMultiValue |
| 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, 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 MethodMultiProperty(String theName,
String theDescription,
Method[] theDefaults,
String[] legalPackageNames,
float theUIOrder)
theName - StringtheDescription - StringtheDefaults - Method[]legalPackageNames - String[]theUIOrder - float
IllegalArgumentException
public MethodMultiProperty(String theName,
String theDescription,
String methodDefaults,
String[] legalPackageNames,
float theUIOrder)
theName - StringtheDescription - StringmethodDefaults - StringlegalPackageNames - String[]theUIOrder - float
IllegalArgumentException
public MethodMultiProperty(String theName,
String theDescription,
String methodDefaults,
Map<String,String> otherParams,
float theUIOrder)
theName - StringtheDescription - StringmethodDefaults - StringotherParams - MaptheUIOrder - float
IllegalArgumentException| Method Detail |
|---|
public static Method[] methodsFrom(String methodsStr)
methodsStr - String
protected String asString(Object value)
asString in class AbstractProperty<Method[]>value - Object
protected String packageNameOf(Object item)
packageNameOf in class AbstractPackagedProperty<Method[]>item - Object
protected String itemTypeName()
AbstractPackagedProperty
itemTypeName in class AbstractPackagedProperty<Method[]>public Class<Method[]> type()
PropertyDescriptor
PropertyDescriptor.type()
public Method[] valueFrom(String valueString)
throws IllegalArgumentException
PropertyDescriptor
valueString - String
IllegalArgumentExceptionPropertyDescriptor.valueFrom(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||