@Override
    public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
        // @Data
        this.addAnnotations(topLevelClass, EnumLombokAnnotations.DATA);
        if (topLevelClass.getSuperClass() != null) {
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.EQUALS_AND_HASH_CODE_CALL_SUPER);
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.TO_STRING_CALL_SUPER);
        }

        // @Builder
        List<IntrospectedColumn> columns = IntrospectedTableTools.getModelBaseRecordClomns(introspectedTable);
        if (this.hasBuilder && PluginTools.getHook(ILombokPluginHook.class).modelBaseRecordBuilderClassGenerated(topLevelClass, columns, introspectedTable)) {
            // 有子类或者父类
            if (introspectedTable.getRules().generateRecordWithBLOBsClass() || introspectedTable.getRules().generatePrimaryKeyClass() || topLevelClass.getSuperClass() != null) {
                this.addAnnotations(topLevelClass, EnumLombokAnnotations.SUPER_BUILDER);
            } else {
                this.addAnnotations(topLevelClass, EnumLombokAnnotations.BUILDER);
            }
        }

        // @Constructor
        if (this.hasNoArgsConstructor) {
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.NO_ARGS_CONSTRUCTOR);
        }
        if (this.hasAllArgsConstructor) {
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.ALL_ARGS_CONSTRUCTOR);
        }
        return super.modelBaseRecordClassGenerated(topLevelClass, introspectedTable);
    }
@Override
    public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
        
        this.addAnnotations(topLevelClass, EnumLombokAnnotations.DATA);
        if (topLevelClass.getSuperClass() != null) {
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.EQUALS_AND_HASH_CODE_CALL_SUPER);
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.TO_STRING_CALL_SUPER);
        }

        
        List<IntrospectedColumn> columns = IntrospectedTableTools.getModelBaseRecordClomns(introspectedTable);
        if (this.hasBuilder && PluginTools.getHook(ILombokPluginHook.class).modelBaseRecordBuilderClassGenerated(topLevelClass, columns, introspectedTable)) {
            
            if (introspectedTable.getRules().generateRecordWithBLOBsClass() || introspectedTable.getRules().generatePrimaryKeyClass() || topLevelClass.getSuperClass() != null) {
                this.addAnnotations(topLevelClass, EnumLombokAnnotations.SUPER_BUILDER);
            } else {
                this.addAnnotations(topLevelClass, EnumLombokAnnotations.BUILDER);
            }
        }

        
        if (this.hasNoArgsConstructor) {
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.NO_ARGS_CONSTRUCTOR);
        }
        if (this.hasAllArgsConstructor) {
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.ALL_ARGS_CONSTRUCTOR);
        }
        return super.modelBaseRecordClassGenerated(topLevelClass, introspectedTable);
    }
@ Override public boolean modelBaseRecordClassGenerated ( TopLevelClass topLevelClass , IntrospectedTable introspectedTable ) { // @Data this . addAnnotations ( topLevelClass , EnumLombokAnnotations . DATA ) ; if ( topLevelClass . getSuperClass ( ) != null ) { this . addAnnotations ( topLevelClass , EnumLombokAnnotations . EQUALS_AND_HASH_CODE_CALL_SUPER ) ; this . addAnnotations ( topLevelClass , EnumLombokAnnotations . TO_STRING_CALL_SUPER ) ; } // @Builder List < IntrospectedColumn > columns = IntrospectedTableTools . getModelBaseRecordClomns ( introspectedTable ) ; if ( this . hasBuilder && PluginTools . getHook ( ILombokPluginHook . class ) . modelBaseRecordBuilderClassGenerated ( topLevelClass , columns , introspectedTable ) ) { // 有子类或者父类 if ( introspectedTable . getRules ( ) . generateRecordWithBLOBsClass ( ) || introspectedTable . getRules ( ) . generatePrimaryKeyClass ( ) || topLevelClass . getSuperClass ( ) != null ) { this . addAnnotations ( topLevelClass , EnumLombokAnnotations . SUPER_BUILDER ) ; } else { this . addAnnotations ( topLevelClass , EnumLombokAnnotations . BUILDER ) ; } } // @Constructor if ( this . hasNoArgsConstructor ) { this . addAnnotations ( topLevelClass , EnumLombokAnnotations . NO_ARGS_CONSTRUCTOR ) ; } if ( this . hasAllArgsConstructor ) { this . addAnnotations ( topLevelClass , EnumLombokAnnotations . ALL_ARGS_CONSTRUCTOR ) ; } return super . modelBaseRecordClassGenerated ( topLevelClass , introspectedTable ) ; }
具体执行顺序 http://www.mybatis.org/generator/reference/pluggingIn.html
@param topLevelClass
@param introspectedTable
@return
具体执行顺序 http : // www . mybatis . org / generator / reference / pluggingIn . html