org.springframework.beans.factory.config
Class TypedStringValue

java.lang.Object
  extended by org.springframework.beans.factory.config.TypedStringValue

public class TypedStringValue
extends Object

Holder for a typed String value. Can be added to bean definitions to explicitly specify a target type for a String value, for example for collection elements.

This holder will just store the String value and the target type. The actual conversion will be performed by the bean factory.

Since:
1.2
Author:
Juergen Hoeller
See Also:
BeanDefinition.getPropertyValues(), MutablePropertyValues.addPropertyValue(org.springframework.beans.PropertyValue)

Constructor Summary
TypedStringValue(String value, Class targetType)
          Create a new TypedStrignValue for the given String value and target type.
 
Method Summary
 Class getTargetType()
          Return the type to convert to.
 String getValue()
          Return the String value.
 void setTargetType(Class targetType)
          Set the type to convert to.
 void setValue(String value)
          Set the String value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypedStringValue

public TypedStringValue(String value,
                        Class targetType)
Create a new TypedStrignValue for the given String value and target type.

Parameters:
value - the String value
targetType - the type to conver to
Method Detail

setValue

public void setValue(String value)
Set the String value. Only necessary for manipulating a registered value, for example in BeanFactoryPostProcessors.

See Also:
PropertyPlaceholderConfigurer

getValue

public String getValue()
Return the String value.


setTargetType

public void setTargetType(Class targetType)
Set the type to convert to. Only necessary for manipulating a registered value, for example in BeanFactoryPostProcessors.

See Also:
PropertyPlaceholderConfigurer

getTargetType

public Class getTargetType()
Return the type to convert to.



Copyright (c) 2002-2007 The Spring Framework Project.