public void buildClass(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String clazz=req.getParameter("clazz");
List<Field> result=new ArrayList<Field>();
try{
Class<?> targetClass=Class.forName(clazz);
PropertyDescriptor[] propertyDescriptors=PropertyUtils.getPropertyDescriptors(targetClass);
for(PropertyDescriptor pd:propertyDescriptors){
String name=pd.getName();
if("class".equals(name)){
continue;
}
result.add(new Field(name));
}
writeObjectToJson(resp, result);
}catch(Exception ex){
throw new ReportDesignException(ex);
}
}
DatasourceServletAction.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:ureport
作者:
评论列表
文章目录