public static void main(String[] args) {
PropertyDescriptor[] props = null;
try {
props = Introspector.getBeanInfo(new Gdzcn().getClass(), Object.class)
.getPropertyDescriptors();
} catch (IntrospectionException e) {
}
if (props != null) {
for (int i = 0; i < props.length; i++) {
try {
String aa = props[i].getName();//获取bean中的属性
Object object = props[i].getPropertyType();//获取属性的类型
} catch (Exception e) {
}}}}