---
title: "取得标准的JavaBean所有的方法属性 "
author: "shaobo"
date: "2009-12-02T15:48:22Z"
tags: []
categories: ["编程语言"]
slug: "javabean"
draft: false
lastmod: "2009-12-02T15:48:22Z"
id: 539217
url: "https://shaobo.iteye.com/blog/539217"
---

```
  public static PropertyDescriptor[] getPropertyDescriptors(Class clazz) throws AppException {
    BeanInfo beanInfo = null;
    try {
      beanInfo = Introspector.getBeanInfo(clazz);
    } catch (IntrospectionException e) {
      throw new AppException("Can not get bean info!");
    }
    
    return beanInfo.getPropertyDescriptors();
  } 
```