spring-framework / org.springframework.core.convert / Property

Property

class Property

A description of a JavaBeans Property that allows us to avoid a dependency on 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.

Author
Keith Donald

Author
Phillip Webb

Since
3.1

See Also
TypeDescriptor#TypeDescriptor(Property)TypeDescriptor#nested(Property, int)

Constructors

<init>

Property(objectType: Class<*>, readMethod: Method, writeMethod: Method)
Property(objectType: Class<*>, readMethod: Method, writeMethod: Method, name: String)

Functions

equals

fun equals(other: Any?): Boolean

getName

fun getName(): String

The name of the property: e.g. 'foo'

getObjectType

fun getObjectType(): Class<*>

The object declaring this property, either directly or in a superclass the object extends.

getReadMethod

fun getReadMethod(): Method

The property getter method: e.g. getFoo()

getType

fun getType(): Class<*>

The property type: e.g. java.lang.String

getWriteMethod

fun getWriteMethod(): Method

The property setter method: e.g. setFoo(String)

hashCode

fun hashCode(): Int