Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » beans » factory » config » [javadoc | source]
org.springframework.beans.factory.config
public class: TypedStringValue [javadoc | source]
java.lang.Object
   org.springframework.beans.factory.config.TypedStringValue

All Implemented Interfaces:
    BeanMetadataElement

Holder for a typed String value. Can be added to bean definitions in order 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.

Constructor:
 public TypedStringValue(String value) 
    Parameters:
    value - the String value
 public TypedStringValue(String value,
    Class targetType) 
    Parameters:
    value - the String value
    targetType - the type to convert to
 public TypedStringValue(String value,
    String targetTypeName) 
    Parameters:
    value - the String value
    targetTypeName - the type to convert to
Method from org.springframework.beans.factory.config.TypedStringValue Summary:
equals,   getSource,   getTargetType,   getTargetTypeName,   getValue,   hasTargetType,   hashCode,   resolveTargetType,   setSource,   setTargetType,   setTargetTypeName,   setValue,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.beans.factory.config.TypedStringValue Detail:
 public boolean equals(Object other) 
 public Object getSource() 
 public Class getTargetType() 
    Return the type to convert to.
 public String getTargetTypeName() 
    Return the type to convert to.
 public String getValue() 
    Return the String value.
 public boolean hasTargetType() 
    Return whether this typed String value carries a target type .
 public int hashCode() 
 public Class resolveTargetType(ClassLoader classLoader) throws ClassNotFoundException 
    Determine the type to convert to, resolving it from a specified class name if necessary. Will also reload a specified Class from its name when called with the target type already resolved.
 public  void setSource(Object source) 
    Set the configuration source Object for this metadata element.

    The exact type of the object will depend on the configuration mechanism used.

 public  void setTargetType(Class targetType) 
    Set the type to convert to.

    Only necessary for manipulating a registered value, for example in BeanFactoryPostProcessors.

 public  void setTargetTypeName(String targetTypeName) 
    Specify the type to convert to.
 public  void setValue(String value) 
    Set the String value.

    Only necessary for manipulating a registered value, for example in BeanFactoryPostProcessors.

 public String toString()