org.springframework.beans.factory.config
Class ConstructorArgumentValues.ValueHolder

java.lang.Object
  extended by org.springframework.beans.factory.config.ConstructorArgumentValues.ValueHolder
All Implemented Interfaces:
BeanMetadataElement
Enclosing class:
ConstructorArgumentValues

public static class ConstructorArgumentValues.ValueHolder
extends java.lang.Object
implements BeanMetadataElement

Holder for a constructor argument value, with an optional type attribute indicating the target type of the actual constructor argument.


Field Summary
private  boolean converted
           
private  java.lang.Object convertedValue
           
private  java.lang.String name
           
private  java.lang.Object source
           
private  java.lang.String type
           
private  java.lang.Object value
           
 
Constructor Summary
ConstructorArgumentValues.ValueHolder(java.lang.Object value)
          Create a new ValueHolder for the given value.
ConstructorArgumentValues.ValueHolder(java.lang.Object value, java.lang.String type)
          Create a new ValueHolder for the given value and type.
ConstructorArgumentValues.ValueHolder(java.lang.Object value, java.lang.String type, java.lang.String name)
          Create a new ValueHolder for the given value, type and name.
 
Method Summary
private  boolean contentEquals(ConstructorArgumentValues.ValueHolder other)
          Determine whether the content of this ValueHolder is equal to the content of the given other ValueHolder.
private  int contentHashCode()
          Determine whether the hash code of the content of this ValueHolder.
 ConstructorArgumentValues.ValueHolder copy()
          Create a copy of this ValueHolder: that is, an independent ValueHolder instance with the same contents.
 java.lang.Object getConvertedValue()
          Return the converted value of the constructor argument, after processed type conversion.
 java.lang.String getName()
          Return the name of the constructor argument.
 java.lang.Object getSource()
          Return the configuration source Object for this metadata element (may be null).
 java.lang.String getType()
          Return the type of the constructor argument.
 java.lang.Object getValue()
          Return the value for the constructor argument.
 boolean isConverted()
          Return whether this holder contains a converted value already (true), or whether the value still needs to be converted (false).
 void setConvertedValue(java.lang.Object value)
          Set the converted value of the constructor argument, after processed type conversion.
 void setName(java.lang.String name)
          Set the name of the constructor argument.
 void setSource(java.lang.Object source)
          Set the configuration source Object for this metadata element.
 void setType(java.lang.String type)
          Set the type of the constructor argument.
 void setValue(java.lang.Object value)
          Set the value for the constructor argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

private java.lang.Object value

type

private java.lang.String type

name

private java.lang.String name

source

private java.lang.Object source

converted

private boolean converted

convertedValue

private java.lang.Object convertedValue
Constructor Detail

ConstructorArgumentValues.ValueHolder

public ConstructorArgumentValues.ValueHolder(java.lang.Object value)
Create a new ValueHolder for the given value.

Parameters:
value - the argument value

ConstructorArgumentValues.ValueHolder

public ConstructorArgumentValues.ValueHolder(java.lang.Object value,
                                             java.lang.String type)
Create a new ValueHolder for the given value and type.

Parameters:
value - the argument value
type - the type of the constructor argument

ConstructorArgumentValues.ValueHolder

public ConstructorArgumentValues.ValueHolder(java.lang.Object value,
                                             java.lang.String type,
                                             java.lang.String name)
Create a new ValueHolder for the given value, type and name.

Parameters:
value - the argument value
type - the type of the constructor argument
name - the name of the constructor argument
Method Detail

setValue

public void setValue(java.lang.Object value)
Set the value for the constructor argument.

See Also:
PropertyPlaceholderConfigurer

getValue

public java.lang.Object getValue()
Return the value for the constructor argument.


setType

public void setType(java.lang.String type)
Set the type of the constructor argument.


getType

public java.lang.String getType()
Return the type of the constructor argument.


setName

public void setName(java.lang.String name)
Set the name of the constructor argument.


getName

public java.lang.String getName()
Return the name of the constructor argument.


setSource

public void setSource(java.lang.Object source)
Set the configuration source Object for this metadata element.

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


getSource

public java.lang.Object getSource()
Description copied from interface: BeanMetadataElement
Return the configuration source Object for this metadata element (may be null).

Specified by:
getSource in interface BeanMetadataElement

isConverted

public boolean isConverted()
Return whether this holder contains a converted value already (true), or whether the value still needs to be converted (false).


setConvertedValue

public void setConvertedValue(java.lang.Object value)
Set the converted value of the constructor argument, after processed type conversion.


getConvertedValue

public java.lang.Object getConvertedValue()
Return the converted value of the constructor argument, after processed type conversion.


contentEquals

private boolean contentEquals(ConstructorArgumentValues.ValueHolder other)
Determine whether the content of this ValueHolder is equal to the content of the given other ValueHolder.

Note that ValueHolder does not implement equals directly, to allow for multiple ValueHolder instances with the same content to reside in the same Set.


contentHashCode

private int contentHashCode()
Determine whether the hash code of the content of this ValueHolder.

Note that ValueHolder does not implement hashCode directly, to allow for multiple ValueHolder instances with the same content to reside in the same Set.


copy

public ConstructorArgumentValues.ValueHolder copy()
Create a copy of this ValueHolder: that is, an independent ValueHolder instance with the same contents.