net.sourceforge.pmd.lang.rule.properties

## Class StringProperty

- java.lang.Object
- - net.sourceforge.pmd.lang.rule.properties.AbstractProperty<String>
  - - net.sourceforge.pmd.lang.rule.properties.StringProperty

- All Implemented Interfaces:
    Comparable<PropertyDescriptor<?>>, PropertyDescriptor<String>

      public class StringProperty
      extends AbstractProperty<String>

  Defines a datatype that supports single String values.
  Author:
    Brian Remedios

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static PropertyDescriptorFactory` | `FACTORY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StringProperty(String theName, String theDescription, String theDefaultValue, float theUIOrder)` Constructor for StringProperty.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected String` | `defaultAsString()`
    `Class<String>` | `type()` Denotes the value datatype.
    `String` | `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.AbstractProperty

      `addAttributesTo, areEqual, asDelimitedString, asDelimitedString, asString, attributeValuesById, choices, compareTo, defaultHasNullValue, defaultValue, description, equals, errorFor, hashCode, isArray, isMultiValue, isRequired, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, toString, typeErrorFor, uiOrder, valueErrorFor, valuesErrorFor`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### FACTORY

          public static final PropertyDescriptorFactory FACTORY

  - ### Constructor Detail

    - #### StringProperty

          public StringProperty(String theName,
                        String theDescription,
                        String theDefaultValue,
                        float theUIOrder)

      Constructor for StringProperty.
      Parameters:
        `theName` - String
        `theDescription` - String
        `theDefaultValue` - String
        `theUIOrder` - float

  - ### Method Detail

    - #### defaultAsString

          protected String defaultAsString()

      Specified by:
        `defaultAsString` in class `AbstractProperty<String>`
      Returns:
        String

    - #### type

          public Class<String> type()

      Description copied from interface: `PropertyDescriptor`
      Denotes the value datatype.
      Returns:
        Class
      See Also:
        `PropertyDescriptor.type()`

    - #### valueFrom

          public String valueFrom(String valueString)

      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
      See Also:
        `PropertyDescriptor.valueFrom(String)`

Copyright © 2002-2013 InfoEther. All Rights Reserved.