懒羊羊
2023-08-30 71e81ed1d12e4d69f53c8ad9e066650ad4186293
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package cn.stylefeng.guns.gen.core.generator.base;
 
import cn.stylefeng.guns.gen.core.generator.base.model.ContextParam;
 
/**
 * 代码生成器
 *
 * @author fengshuonan
 * @date 2018-12-13-11:08 AM
 */
public abstract class Generator {
 
    protected ContextParam contextParam;
 
    /**
     * 初始化配置
     *
     * @author fengshuonan
     * @Date 2018/12/12 3:13 PM
     */
    public void initContext(ContextParam paramContext) {
        this.contextParam = paramContext;
    }
 
    /**
     * 代码生成之前,自由发挥
     *
     * @author fengshuonan
     * @Date 2018/12/13 2:30 PM
     */
    protected void beforeGeneration() {
 
    }
 
    /**
     * 执行代码生成
     *
     * @author fengshuonan
     * @Date 2018/12/12 3:13 PM
     */
    public abstract void doGeneration();
 
    /**
     * 代码生成之后,自由发挥
     *
     * @author fengshuonan
     * @Date 2018/12/13 2:30 PM
     */
    protected void afterGeneration() {
 
    }
 
}