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

mybatis / generator / 2202

05 May 2026 07:27PM UTC coverage: 91.746% (+0.04%) from 91.703%
2202

push

github

web-flow
Merge pull request #1508 from mybatis/renovate/com.github.javaparser-javaparser-core-3.x

Update dependency com.github.javaparser:javaparser-core to v3.28.1

2454 of 3154 branches covered (77.81%)

12038 of 13121 relevant lines covered (91.75%)

0.92 hits per line

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

88.24
/core/mybatis-generator-core/src/main/java/org/mybatis/generator/api/PluginAdapter.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
import java.util.Objects;
19
import java.util.Properties;
20

21
import org.jspecify.annotations.Nullable;
22
import org.mybatis.generator.config.Context;
23

24
/**
25
 * This class is a convenient base class for implementing plugins.
26
 *
27
 * <p>This adapter does not implement the <code>validate</code> method - all plugins
28
 * must perform validation.
29
 *
30
 * @author Jeff Butler
31
 */
32
public abstract class PluginAdapter implements Plugin {
33
    protected @Nullable Context context;
34
    protected final Properties properties = new Properties();
1✔
35
    protected @Nullable CommentGenerator commentGenerator;
36
    protected @Nullable KnownRuntime knownRuntime;
37
    protected @Nullable Indenter indenter;
38

39
    protected PluginAdapter() {
1✔
40
    }
1✔
41

42
    @Override
43
    public void setContext(Context context) {
44
        this.context = context;
1✔
45
    }
1✔
46

47
    protected Context getContext() {
48
        return Objects.requireNonNull(context);
×
49
    }
50

51
    @Override
52
    public void setProperties(Properties properties) {
53
        this.properties.putAll(properties);
1✔
54
    }
1✔
55

56
    @Override
57
    public void setCommentGenerator(CommentGenerator commentGenerator) {
58
        this.commentGenerator = commentGenerator;
1✔
59
    }
1✔
60

61
    protected CommentGenerator getCommentGenerator() {
62
        return Objects.requireNonNull(commentGenerator);
1✔
63
    }
64

65
    @Override
66
    public void setKnownRuntime(KnownRuntime knownRuntime) {
67
        this.knownRuntime = knownRuntime;
1✔
68
    }
1✔
69

70
    protected KnownRuntime getKnownRuntime() {
71
        return Objects.requireNonNull(knownRuntime);
×
72
    }
73

74
    @Override
75
    public void setIndenter(Indenter indenter) {
76
        this.indenter = indenter;
1✔
77
    }
1✔
78

79
    protected Indenter getIndenter() {
80
        return Objects.requireNonNull(indenter);
1✔
81
    }
82
}
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