/*
* 已知实体路径,如何获取该实体对应的数据库表名?
* 以下尝试通过反射获取
*/
String entityPath = "com.kingdee.eas.custom.test.app.Test"; //实体路径
//对象路径:com.kingdee.eas.custom.test.TestInfo
String infoPath = entityPath.replace(".app.", ".") + "Info"; //对象路径
//通过反射获取类以及实例:clazz.newInstance()
Class<?> clazz = Class.forName(infoPath);
DataTableInfo table = EntityUtility.getBOSEntity(null, (IObjectValue) clazz.newInstance()).getTable();
String name = table.getName();
//客户端界面弹出消息提示,表名:CT_TST_TEST
MsgBox.showInfo(name);