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

mybatis / generator / 2138

02 Apr 2026 07:24PM UTC coverage: 91.775% (+1.4%) from 90.382%
2138

push

github

web-flow
Merge pull request #1484 from mybatis/renovate/org.apache.ant-ant-1.x

Update dependency org.apache.ant:ant to v1.10.16

2425 of 3124 branches covered (77.62%)

11884 of 12949 relevant lines covered (91.78%)

0.92 hits per line

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

87.5
/core/mybatis-generator-core/src/main/java/org/mybatis/generator/config/AbstractRenamingRule.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.config;
17

18
import java.util.List;
19
import java.util.Objects;
20
import java.util.regex.Pattern;
21

22
import org.jspecify.annotations.Nullable;
23
import org.mybatis.generator.internal.util.StringUtility;
24

25
public abstract class AbstractRenamingRule {
26
    protected final String searchString;
27
    protected final String replaceString;
28
    protected final Pattern pattern;
29

30
    protected AbstractRenamingRule(@Nullable String searchString, @Nullable String replaceString) {
1✔
31
        this.searchString = Objects.requireNonNull(searchString);
1✔
32
        this.replaceString = StringUtility.stringValueOrElse(replaceString, ""); //$NON-NLS-1$
1✔
33
        pattern = Pattern.compile(searchString);
1✔
34
    }
1✔
35

36
    public Pattern pattern() {
37
        return pattern;
1✔
38
    }
39

40
    public String searchString() {
41
        return searchString;
×
42
    }
43

44
    public String replaceString() {
45
        return replaceString;
1✔
46
    }
47

48
    public abstract void validate(List<String> errors, String tableName);
49
}
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