类 Property
- java.lang.Object
- org.springframework.core.convert.Property
public final class Property extends Object
A description of a JavaBeans Property that allows us to avoid a dependency onjava.beans.PropertyDescriptor. Thejava.beanspackage 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
TypeDescriptorfrom a property location. The builtTypeDescriptorcan then be used to convert from/to the property type.- 从以下版本开始:
- 3.1
- 作者:
- Keith Donald, Phillip Webb
- 另请参阅:
TypeDescriptor(Property),TypeDescriptor.nested(Property, int)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(Object other)StringgetName()The name of the property: e.g.Class<?>getObjectType()The object declaring this property, either directly or in a superclass the object extends.MethodgetReadMethod()The property getter method: e.g.Class<?>getType()The property type: e.g.MethodgetWriteMethod()The property setter method: e.g.inthashCode()
方法详细资料
getObjectType
public Class<?> getObjectType()
The object declaring this property, either directly or in a superclass the object extends.
getReadMethod
public Method getReadMethod()
The property getter method: e.g.getFoo()
getWriteMethod
public Method getWriteMethod()
The property setter method: e.g.setFoo(String)