org.spicefactory.cinnamon.config.xml
Class ConfigurationProperty

java.lang.Object
  extended by org.spicefactory.cinnamon.config.xml.ConfigurationProperty

public class ConfigurationProperty
extends Object

The ConfigurationProperty represents a single property (attribute) from an XML configuration file.

Author:
Jens Halm

Constructor Summary
ConfigurationProperty(Property property, String value)
          Creates a new configuration property.
 
Method Summary
 String getName()
          Returns the name of this configuration property
 void setValue(Object target)
          Applies the value of this configuration property to the given bean instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationProperty

public ConfigurationProperty(Property property,
                             String value)
                      throws ConversionException
Creates a new configuration property. The given String value will be converted to a type matching the type of the Property instance if necessary.

Parameters:
property - the Property instance representing the target object
value - the String representation of the property value
Throws:
ConversionException - if the String value cannot be converted to the type of the property
Method Detail

getName

public String getName()
Returns the name of this configuration property

Returns:
the name of this configuration property

setValue

public void setValue(Object target)
Applies the value of this configuration property to the given bean instance.

Parameters:
target - the bean instance this configuration property should be applied to