ITeye博客

取得标准的JavaBean所有的方法属性

shaobo · 2009-12-02 15:48 · J2SE · 编程语言 · Markdown

  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();
  } 

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。