net.sourceforge.pmd.lang.rule.properties.factories
Class BasicPropertyDescriptorFactory<T>

java.lang.Object
  extended by net.sourceforge.pmd.lang.rule.properties.factories.BasicPropertyDescriptorFactory<T>
Type Parameters:
T -
All Implemented Interfaces:
PropertyDescriptorFactory

public class BasicPropertyDescriptorFactory<T>
extends Object
implements PropertyDescriptorFactory

Author:
Brian Remedios

Field Summary
protected static Map<String,Boolean> coreFieldTypesByKey
           
 
Constructor Summary
BasicPropertyDescriptorFactory(Class<?> theValueType)
           
BasicPropertyDescriptorFactory(Class<?> theValueType, Map<String,Boolean> additionalFieldTypesByKey)
           
 
Method Summary
protected static Object[] choicesIn(Map<String,String> valuesById)
           
 PropertyDescriptor<?> createWith(Map<String,String> valuesById)
          Create a property descriptor of the appropriate type using the values provided.
protected  String defaultValueIn(Map<String,String> valuesById)
           
protected static char delimiterIn(Map<String,String> valuesById)
           
protected  String descriptionIn(Map<String,String> valuesById)
           
protected static Double[] doublesIn(String numberString)
           
 Map<String,Boolean> expectedFields()
          Denote the identifiers of the expected fields paired with booleans denoting whether they are required (non-null) or not.
static Map<String,Boolean> expectedFieldTypesWith(String[] otherKeys, Boolean[] otherValues)
           
protected static Float[] floatsIn(String numberString)
           
protected static int indexIn(Map<String,String> valuesById)
           
protected static int[] indiciesIn(Map<String,String> valuesById)
           
protected static Integer[] integersIn(String numberString)
           
protected static String[] labelsIn(Map<String,String> valuesById)
           
protected static String[] legalPackageNamesIn(Map<String,String> valuesById)
           
protected static Long[] longsIn(String numberString)
           
protected static String maxValueIn(Map<String,String> valuesById)
           
protected static String[] minMaxFrom(Map<String,String> valuesById)
           
protected static String minValueIn(Map<String,String> valuesById)
           
protected  String nameIn(Map<String,String> valuesById)
           
protected  String numericDefaultValueIn(Map<String,String> valuesById)
           
 Class<?> valueType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coreFieldTypesByKey

protected static final Map<String,Boolean> coreFieldTypesByKey
Constructor Detail

BasicPropertyDescriptorFactory

public BasicPropertyDescriptorFactory(Class<?> theValueType)

BasicPropertyDescriptorFactory

public BasicPropertyDescriptorFactory(Class<?> theValueType,
                                      Map<String,Boolean> additionalFieldTypesByKey)
Method Detail

valueType

public Class<?> valueType()
Specified by:
valueType in interface PropertyDescriptorFactory

createWith

public PropertyDescriptor<?> createWith(Map<String,String> valuesById)
Description copied from interface: PropertyDescriptorFactory
Create a property descriptor of the appropriate type using the values provided.

Specified by:
createWith in interface PropertyDescriptorFactory
Returns:
PropertyDescriptor

expectedFields

public Map<String,Boolean> expectedFields()
Description copied from interface: PropertyDescriptorFactory
Denote the identifiers of the expected fields paired with booleans denoting whether they are required (non-null) or not.

Specified by:
expectedFields in interface PropertyDescriptorFactory
Returns:
Map

nameIn

protected String nameIn(Map<String,String> valuesById)

descriptionIn

protected String descriptionIn(Map<String,String> valuesById)

defaultValueIn

protected String defaultValueIn(Map<String,String> valuesById)

numericDefaultValueIn

protected String numericDefaultValueIn(Map<String,String> valuesById)

minValueIn

protected static String minValueIn(Map<String,String> valuesById)

maxValueIn

protected static String maxValueIn(Map<String,String> valuesById)

integersIn

protected static Integer[] integersIn(String numberString)

longsIn

protected static Long[] longsIn(String numberString)

floatsIn

protected static Float[] floatsIn(String numberString)

doublesIn

protected static Double[] doublesIn(String numberString)

labelsIn

protected static String[] labelsIn(Map<String,String> valuesById)

choicesIn

protected static Object[] choicesIn(Map<String,String> valuesById)

indexIn

protected static int indexIn(Map<String,String> valuesById)

indiciesIn

protected static int[] indiciesIn(Map<String,String> valuesById)

delimiterIn

protected static char delimiterIn(Map<String,String> valuesById)

minMaxFrom

protected static String[] minMaxFrom(Map<String,String> valuesById)

legalPackageNamesIn

protected static String[] legalPackageNamesIn(Map<String,String> valuesById)

expectedFieldTypesWith

public static Map<String,Boolean> expectedFieldTypesWith(String[] otherKeys,
                                                         Boolean[] otherValues)


Copyright © 2002-2012 InfoEther. All Rights Reserved.