Skip to content

Commit 12c1d6a

Browse files
author
杨利兵
committed
清理不使用的代码
1 parent 32ec250 commit 12c1d6a

File tree

2 files changed

+3
-36
lines changed

2 files changed

+3
-36
lines changed

src/main/java/com/yanglb/codegen/core/GenFactory.java

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,14 @@
1515
*/
1616
package com.yanglb.codegen.core;
1717

18-
import com.yanglb.codegen.core.generator.IGenerator;
19-
import com.yanglb.codegen.core.model.ParamaModel;
2018
import com.yanglb.codegen.exceptions.CodeGenException;
21-
import com.yanglb.codegen.utils.Conf;
2219
import com.yanglb.codegen.utils.Resources;
2320

2421
public class GenFactory<T> {
2522
// 外部不可创建实例
2623
private GenFactory() {
27-
2824
}
29-
//
30-
// /**
31-
// * 创建生成器
32-
// * @param paramaModel 参数模型
33-
// * @return IGenerator
34-
// * @throws CodeGenException
35-
// */
36-
// public static IGenerator createGenerator(ParamaModel paramaModel) throws CodeGenException{
37-
// IGenerator generator = null;
38-
// try {
39-
// generator = createByName(paramaModel.getCmdModel().getGenerator());
40-
// generator.init(paramaModel);
41-
// } catch (Exception e) {
42-
// throw new CodeGenException(Resources.getString("E_010"));
43-
// }
44-
// return generator;
45-
// }
46-
25+
4726
/**
4827
* 根据配置文件中配置的名字创建
4928
* @param <T> 创建接口类型
@@ -61,15 +40,7 @@ public static <T> T createByName(String className) throws CodeGenException {
6140
return result;
6241
}
6342

64-
/**
65-
* 根据类名创建
66-
* @param implName
67-
* @return
68-
* @throws InstantiationException
69-
* @throws IllegalAccessException
70-
* @throws ClassNotFoundException
71-
*/
72-
protected T create(String implName)
43+
private T create(String implName)
7344
throws InstantiationException, IllegalAccessException, ClassNotFoundException {
7445
T instance = null;
7546
if (implName.startsWith(".")) implName = "com.yanglb.codegen" + implName;

src/main/java/com/yanglb/codegen/utils/Conf.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package com.yanglb.codegen.utils;
1717

1818
import com.yanglb.codegen.core.model.CmdModel;
19-
import jdk.nashorn.internal.ir.CallNode;
2019
import org.yaml.snakeyaml.Yaml;
2120

2221
import java.io.InputStream;
@@ -48,12 +47,9 @@ public static CmdModel getCmdModel(String cmd) {
4847
return model;
4948
}
5049

51-
public static String CATEGORY_GENERATOR = "generator";
5250
public static String CATEGORY_READER = "reader";
53-
public static String CATEGORY_TRANSLATOR = "translator";
5451
public static String CATEGORY_WRITER = "writer";
55-
public static String CATEGORY_PARSER = "parser";
56-
52+
5753
public static String getString(String category, String key) {
5854
// 初始化
5955
init();

0 commit comments

Comments
 (0)