java中PropertyDescriptor的使用简介

来源:互联网 发布:mac mini 定制 编辑:程序博客网 时间:2024/06/05 04:04

PropertyDescriptor类表示javaBean中通过存储器导出一个属性,其主要的方法有:

1、getPropertyType():获取属性的class对象

2、getReadMethod(),获得用于读取属性值的方法;getWriteMethod(),获得用于写入属性值的方法。

3、setReadMethod(Method readMethod),设置用于读取属性值的方法;

4、setWriteMethod(MethodwriteMethod),设置用于写入属性值的方法;

0 0