获取Bean信息
import java.beans.BeanInfo; import java.beans.Introspector; import java.beans.PropertyDescriptor; /* *来 自 N o w J a v a . c o m */ import java.lang.reflect.Method; import java.lang.reflect.Type; import java.util.HashMap; import java.util.Map; public class Main{ public static void main(String[] argv) throws Exception{ Object value = "nowjava.com"; System.out.println(getBeanInfo(value)); } public static BeanInfo getBeanInfo(Object value) throws BeanException { return (value == null ? null : getBeanInfo(value.getClass()));// from 时 代 J a v a 公 众 号 } public static BeanInfo getBeanInfo(Class<?> type) throws BeanException { try {