public final class Property extends Object
java.beans.PropertyDescriptor
. The java.beans
package
is not available in a number of environments (e.g. Android, Java ME), so this is
desirable for portability of Spring's core conversion facility.
Used to build a TypeDescriptor
from a property location. The built
TypeDescriptor
can then be used to convert from/to the property type.
TypeDescriptor.TypeDescriptor(Property)
,
TypeDescriptor.nested(Property, int)
Constructor and Description |
---|
Property(Class<?> objectType,
Method readMethod,
Method writeMethod) |
Property(Class<?> objectType,
Method readMethod,
Method writeMethod,
String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
String |
getName()
The name of the property: e.g.
|
Class<?> |
getObjectType()
The object declaring this property, either directly or in a superclass the object extends.
|
Method |
getReadMethod()
The property getter method: e.g.
|
Class<?> |
getType()
The property type: e.g.
|
Method |
getWriteMethod()
The property setter method: e.g.
|
int |
hashCode() |
public Property(Class<?> objectType, @Nullable Method readMethod, @Nullable Method writeMethod)
public Class<?> getObjectType()
public String getName()
public Class<?> getType()
java.lang.String
@Nullable public Method getWriteMethod()
setFoo(String)