net.sourceforge.pmd.properties

Class TypeProperty

public class TypeProperty extends StringProperty

Defines a property that supports class types, even for primitive values!

Version: $Revision$

Author: Brian Remedios

Constructor Summary
TypeProperty(String theName, String theDescription, Class theDefault, float theUIOrder)
Constructor for TypeProperty.
TypeProperty(String theName, String theDescription, Class[] theDefaults, float theUIOrder)
Constructor for TypeProperty.
Method Summary
protected StringasString(Object value)
Method asString.
Class<Class>type()
Method type.
protected StringvalueErrorFor(Object value)
Neutralize unwanted superclass functionality that will result in a class cast exception.
ObjectvalueFrom(String valueString)
Method valueFrom.

Constructor Detail

TypeProperty

public TypeProperty(String theName, String theDescription, Class theDefault, float theUIOrder)
Constructor for TypeProperty.

Parameters: theName String theDescription String theDefault Class theUIOrder float

TypeProperty

public TypeProperty(String theName, String theDescription, Class[] theDefaults, float theUIOrder)
Constructor for TypeProperty.

Parameters: theName String theDescription String theDefaults Class[] theUIOrder float

Method Detail

asString

protected String asString(Object value)
Method asString.

Parameters: value Object

Returns: String

type

public Class<Class> type()
Method type.

Returns: Class

See Also: type

valueErrorFor

protected String valueErrorFor(Object value)
Neutralize unwanted superclass functionality that will result in a class cast exception.

Parameters: value Object

Returns: String

valueFrom

public Object valueFrom(String valueString)
Method valueFrom.

Parameters: valueString String

Returns: Object

See Also: valueFrom