Open arthurlang opened 4 years ago
网上说ClassPath添加ClassPool中, 请问这块代码如何使用 如下代码:
Model model = new Model();ClassPool pool = ClassPool.getDefault();ClassClassPath ccpath = new ClassClassPath(model.getClass());pool.insertClassPath(ccpath);CtClass ctClass = pool.get("com.project.Model");
网上说ClassPath添加ClassPool中, 请问这块代码如何使用 如下代码:
Model model = new Model();ClassPool pool = ClassPool.getDefault();ClassClassPath ccpath = new ClassClassPath(model.getClass());pool.insertClassPath(ccpath);CtClass ctClass = pool.get("com.project.Model");