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.
PropertyValues, BeanWrapper
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile Boolean | conversionNecessary
Package-visible field that indicates whether conversion is necessary. |
| private boolean | |
| private Object | |
| private final String | |
| private boolean | |
| pack-priv transient volatile Object | resolvedTokens
Package-visible field for caching the resolved property path tokens. |
| private final Object |
| Access | Constructor and Description |
|---|---|
| public | PropertyValue(String
the name of the property (never name, Object null)the value of the property (possibly before type conversion) value)Create a new PropertyValue instance. |
| public | |
| public | PropertyValue(PropertyValue
the PropertyValue to link to (never original, Object null)the new value to apply newValue)Constructor that exposes a new value for an original value holder. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides org. |
| public synchronized Object | getConvertedValue()
Return the converted value of this property value, after processed type conversion. |
| public String | |
| public PropertyValue | Returns: the original PropertyValue (either a source of this value holder or this value holder itself).Return the original PropertyValue instance for this value holder. |
| public Object | |
| public int | hashCode()
Overrides org. |
| public synchronized boolean | isConverted()
Return whether this holder contains a converted value already ( |
| public boolean | isOptional()
Return whether this is an optional value, that is, to be ignored when no corresponding property exists on the target class. |
| public synchronized void | setConvertedValue(Object value)
Set the converted value of this property value, after processed type conversion. |
| public void | setOptional(boolean optional)
Set whether this is an optional value, that is, to be ignored when no corresponding property exists on the target class. |
| public String |
| conversionNecessary | back to summary |
|---|---|
| pack-priv volatile Boolean conversionNecessary Package-visible field that indicates whether conversion is necessary. | |
| converted | back to summary |
|---|---|
| private boolean converted | |
| convertedValue | back to summary |
|---|---|
| private Object convertedValue
| |
| name | back to summary |
|---|---|
| private final String name | |
| optional | back to summary |
|---|---|
| private boolean optional | |
| resolvedTokens | back to summary |
|---|---|
| pack-priv transient volatile Object resolvedTokens Package-visible field for caching the resolved property path tokens. | |
| value | back to summary |
|---|---|
| private final Object value
| |
| PropertyValue | back to summary |
|---|---|
| public PropertyValue(String name, Object value) Create a new PropertyValue instance. | |
| PropertyValue | back to summary |
|---|---|
| public PropertyValue(PropertyValue original) Copy constructor.
| |
| PropertyValue | back to summary |
|---|---|
| public PropertyValue(PropertyValue original, Object newValue) Constructor that exposes a new value for an original value holder. The original holder will be exposed as source of the new holder.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides org. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getConvertedValue | back to summary |
|---|---|
| public synchronized Object getConvertedValue() Return the converted value of this property value, after processed type conversion.
| |
| getName | back to summary |
|---|---|
| public String getName() Return the name of the property. | |
| getOriginalPropertyValue | back to summary |
|---|---|
| public PropertyValue getOriginalPropertyValue() Return the original PropertyValue instance for this value holder.
| |
| getValue | back to summary |
|---|---|
| public Object getValue() 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.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isConverted | back to summary |
|---|---|
| public synchronized boolean isConverted() Return whether this holder contains a converted value already ( | |
| isOptional | back to summary |
|---|---|
| public boolean isOptional() Return whether this is an optional value, that is, to be ignored when no corresponding property exists on the target class.
| |
| setConvertedValue | back to summary |
|---|---|
| public synchronized void setConvertedValue(Object value) Set the converted value of this property value, after processed type conversion. | |
| setOptional | back to summary |
|---|---|
| public void setOptional(boolean optional) Set whether this is an optional value, that is, to be ignored when no corresponding property exists on the target class.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |