net.sourceforge.pmd.properties

Class AbstractPMDProperty

public abstract class AbstractPMDProperty extends Object implements PropertyDescriptor

Version: $Revision$

Author: Brian Remedios

Field Summary
protected charmultiValueDelimiter
Constructor Summary
protected AbstractPMDProperty(String theName, String theDescription, Object theDefault, float theUIOrder)
Constructor for AbstractPMDProperty.
Method Summary
static booleanareEqual(Object value, Object otherValue)
Method areEqual.
StringasDelimitedString(Object values)
Method asDelimitedString.
protected StringasString(Object value)
Return the value as a string that can be easily recognized and parsed when we see it again.
Object[][]choices()
Method choices.
intcompareTo(PropertyDescriptor otherProperty)
Method compareTo.
ObjectdefaultValue()
Stringdescription()
Method description.
StringerrorFor(Object value)
Method errorFor.
protected booleanisArray(Object value)
Method isArray.
booleanisRequired()
Method isRequired.
intmaxValueCount()
Method maxValueCount.
protected voidmaxValueCount(int theCount)
Method maxValueCount.
protected voidmultiValueDelimiter(char aDelimiter)
Method multiValueDelimiter.
charmultiValueDelimiter()
Method multiValueDelimiter.
Stringname()
Method name.
intpreferredRowCount()
Method preferredRowCount.
StringpropertyErrorFor(Rule rule)
Method propertyErrorFor.
protected StringtypeErrorFor(Object value)
Method typeErrorFor.
floatuiOrder()
Method uiOrder.
protected StringvalueErrorFor(Object value)
Method valueErrorFor.

Field Detail

multiValueDelimiter

protected char multiValueDelimiter

Constructor Detail

AbstractPMDProperty

protected AbstractPMDProperty(String theName, String theDescription, Object theDefault, float theUIOrder)
Constructor for AbstractPMDProperty.

Parameters: theName String theDescription String theDefault Object theUIOrder float

Method Detail

areEqual

public static final boolean areEqual(Object value, Object otherValue)
Method areEqual.

Parameters: value Object otherValue Object

Returns: boolean

asDelimitedString

public String asDelimitedString(Object values)
Method asDelimitedString.

Parameters: values Object

Returns: String

See Also: asDelimitedString

asString

protected String asString(Object value)
Return the value as a string that can be easily recognized and parsed when we see it again.

Parameters: value Object

Returns: String

choices

public Object[][] choices()
Method choices.

Returns: Object[][]

See Also: choices

compareTo

public int compareTo(PropertyDescriptor otherProperty)
Method compareTo.

Parameters: otherProperty Object

Returns: int

See Also: java.lang.Comparable#compareTo(Object)

defaultValue

public Object defaultValue()

Returns: Object

See Also: defaultValue

description

public String description()
Method description.

Returns: String

See Also: description

errorFor

public String errorFor(Object value)
Method errorFor.

Parameters: value Object

Returns: String

See Also: errorFor

isArray

protected boolean isArray(Object value)
Method isArray.

Parameters: value Object

Returns: boolean

isRequired

public boolean isRequired()
Method isRequired.

Returns: boolean

See Also: isRequired

maxValueCount

public int maxValueCount()
Method maxValueCount.

Returns: int

See Also: maxValueCount

maxValueCount

protected void maxValueCount(int theCount)
Method maxValueCount.

Parameters: theCount int

See Also: maxValueCount

multiValueDelimiter

protected void multiValueDelimiter(char aDelimiter)
Method multiValueDelimiter.

Parameters: aDelimiter char

multiValueDelimiter

public char multiValueDelimiter()
Method multiValueDelimiter.

Returns: char

See Also: multiValueDelimiter

name

public String name()
Method name.

Returns: String

See Also: name

preferredRowCount

public int preferredRowCount()
Method preferredRowCount.

Returns: int

See Also: preferredRowCount

propertyErrorFor

public String propertyErrorFor(Rule rule)
Method propertyErrorFor.

Parameters: rule Rule

Returns: String

See Also: propertyErrorFor

typeErrorFor

protected String typeErrorFor(Object value)
Method typeErrorFor.

Parameters: value Object

Returns: String

uiOrder

public float uiOrder()
Method uiOrder.

Returns: float

See Also: uiOrder

valueErrorFor

protected String valueErrorFor(Object value)
Method valueErrorFor.

Parameters: value Object

Returns: String