package org.springframework.beans;
Object to hold information and value for an individual bean property.
Using an object here, rather than just storing all properties in
a map keyed by property name, allows for more flexibility, and the
ability to handle indexed properties etc in an optimized way.
Note that the value doesn't need to be the final required type:
A BeanWrapper implementation should handle any necessary conversion,
as this object doesn't know anything about the objects it will be applied to.
Package-visible field that indicates whether conversion is necessary
Package-visible field for caching the resolved property path tokens
Package-visible field for caching the resolved PropertyDescriptor
Create a new PropertyValue instance.
- Parameters:
name the name of the property (never null)value the value of the property (possibly before type conversion)
Copy constructor.
- Parameters:
original the PropertyValue to copy (never null)
Assert.notNull(original, "Original must not be null");
Constructor that exposes a new value for an original value holder.
The original holder will be exposed as source of the new holder.
- Parameters:
original the PropertyValue to link to (never null)newValue the new value to apply
Assert.notNull(original, "Original must not be null");
Return the name of the property.
Return the value of the property.
Note that type conversion will not have occurred here.
It is the responsibility of the BeanWrapper implementation to
perform type conversion.
Return the original PropertyValue instance for this value holder.
- Returns:
- the original PropertyValue (either a source of this
value holder or this value holder itself).
while (original.source instanceof PropertyValue && original.source != original) { Return whether this holder contains a converted value already (
true),
or whether the value still needs to be converted (
false).
Set the converted value of the constructor argument,
after processed type conversion.
Return the converted value of the constructor argument,
after processed type conversion.
return "bean property '" + this.name + "'";