• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mybatis / generator / 1947

14 Jan 2026 02:31PM UTC coverage: 88.838% (+0.04%) from 88.799%
1947

push

github

web-flow
Merge pull request #1411 from mybatis/renovate/github-codeql-action-digest

Update github/codeql-action digest to cdefb33

2347 of 3184 branches covered (73.71%)

11517 of 12964 relevant lines covered (88.84%)

0.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/core/mybatis-generator-core/src/main/java/org/mybatis/generator/api/GeneratedFile.java
1
/*
2
 *    Copyright 2006-2026 the original author or authors.
3
 *
4
 *    Licensed under the Apache License, Version 2.0 (the "License");
5
 *    you may not use this file except in compliance with the License.
6
 *    You may obtain a copy of the License at
7
 *
8
 *       https://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *    Unless required by applicable law or agreed to in writing, software
11
 *    distributed under the License is distributed on an "AS IS" BASIS,
12
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *    See the License for the specific language governing permissions and
14
 *    limitations under the License.
15
 */
16
package org.mybatis.generator.api;
17

18
/**
19
 * Abstract class that holds information common to all generated files.
20
 *
21
 * @author Jeff Butler
22
 */
23
public abstract class GeneratedFile {
24

25
    protected final String targetProject;
26

27
    protected GeneratedFile(String targetProject) {
1✔
28
        this.targetProject = targetProject;
1✔
29
    }
1✔
30

31
    /**
32
     * Get the file name (without any path). Clients should use this method to
33
     * determine how to save the results.
34
     *
35
     * @return Returns the file name.
36
     */
37
    public abstract String getFileName();
38

39
    /**
40
     * Gets the target project. Clients can call this method to determine how to
41
     * save the results.
42
     *
43
     * @return the target project
44
     */
45
    public String getTargetProject() {
46
        return targetProject;
×
47
    }
48

49
    /**
50
     * Get the target package for the file. Clients should use this method to
51
     * determine how to save the results.
52
     *
53
     * @return Returns the target project.
54
     */
55
    public abstract String getTargetPackage();
56

57
    @Override
58
    public String toString() {
59
        return getFileName();
1✔
60
    }
61

62
    /**
63
     * Checks if is mergeable.
64
     *
65
     * @return true, if is mergeable
66
     */
67
    public abstract boolean isMergeable();
68
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc