|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.AttributeAccessorSupport org.springframework.beans.PropertyValue
public class PropertyValue
Class to hold information and value for an individual 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 a special way if necessary.
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
,
Serialized FormConstructor Summary | |
---|---|
PropertyValue(PropertyValue original)
Copy constructor. |
|
PropertyValue(String name,
Object value)
Create a new PropertyValue instance. |
Method Summary | |
---|---|
boolean |
equals(Object other)
|
String |
getName()
Return the name of the property. |
Object |
getSource()
Return the configuration source Object for this metadata element
(may be null ). |
Object |
getValue()
Return the value of the property. |
int |
hashCode()
|
void |
setSource(Object source)
Set the configuration source Object for this metadata element. |
String |
toString()
|
Methods inherited from class org.springframework.core.AttributeAccessorSupport |
---|
attributeNames, copyAttributesFrom, getAttribute, hasAttribute, removeAttribute, setAttribute |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PropertyValue(String name, Object value)
name
- name of the propertyvalue
- value of the property (possibly before type conversion)public PropertyValue(PropertyValue original)
original
- the PropertyValue to copyMethod Detail |
---|
public String getName()
public Object getValue()
Note that type conversion will not have occurred here. It is the responsibility of the BeanWrapper implementation to perform type conversion.
public void setSource(Object source)
Object
for this metadata element.
The exact type of the object will depend on the configuration mechanism used.
public Object getSource()
BeanMetadataElement
Object
for this metadata element
(may be null
).
getSource
in interface BeanMetadataElement
public boolean equals(Object other)
equals
in class AttributeAccessorSupport
public int hashCode()
hashCode
in class AttributeAccessorSupport
public String toString()
toString
in class Object
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |