xxxx source = new xxxx();
Method[] sourceMethods = source.getClass().getMethods();
for(int i=0;i<sourceMethods.length;i++){
if(sourceMethods[i].getName().startsWith("get")){
lsName = sourceMethods[i].getName().substring(3); // 属性
Object loValue = sourceMethods[i].invoke(source, null); // 值
String lsSourceType = sourceMethods[i].getReturnType().getName(); //类型
}
}
Method[] sourceMethods = source.getClass().getMethods();
for(int i=0;i<sourceMethods.length;i++){
if(sourceMethods[i].getName().startsWith("get")){
lsName = sourceMethods[i].getName().substring(3); // 属性
Object loValue = sourceMethods[i].invoke(source, null); // 值
String lsSourceType = sourceMethods[i].getReturnType().getName(); //类型
}
}
ok,thanks!