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