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

devonfw / IDEasy / 14856597402

06 May 2025 09:45AM UTC coverage: 67.59% (-0.08%) from 67.672%
14856597402

Pull #1242

github

web-flow
Merge d3d39f777 into a0320eff8
Pull Request #1242: #809: Enhance uninstall with --force to remove from the software repo

3108 of 5006 branches covered (62.09%)

Branch coverage included in aggregate %.

7997 of 11424 relevant lines covered (70.0%)

3.06 hits per line

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

15.0
cli/src/main/java/com/devonfw/tools/ide/tool/DelegatingToolCommandlet.java
1
package com.devonfw.tools.ide.tool;
2

3
import java.nio.file.Path;
4
import java.util.Set;
5

6
import com.devonfw.tools.ide.common.Tag;
7
import com.devonfw.tools.ide.context.IdeContext;
8
import com.devonfw.tools.ide.environment.EnvironmentVariablesFiles;
9
import com.devonfw.tools.ide.process.ProcessContext;
10
import com.devonfw.tools.ide.version.VersionIdentifier;
11

12
/**
13
 * {@link ToolCommandlet} that delegates to another ToolCommandlet.
14
 */
15
public abstract class DelegatingToolCommandlet<D extends ToolCommandlet> extends ToolCommandlet {
16

17
  private Class<D> delegateClass;
18

19
  /**
20
   * The constructor.
21
   *
22
   * @param context the {@link IdeContext}.
23
   * @param tool the {@link #getName() tool name}.
24
   * @param tags the {@link #getTags() tags} classifying the tool. Should be created via {@link Set#of(Object) Set.of} method.
25
   * @param delegateClass the {@link ToolCommandlet}.
26
   */
27
  public DelegatingToolCommandlet(IdeContext context, String tool, Set<Tag> tags, Class<D> delegateClass) {
28

29
    super(context, tool, tags);
5✔
30
    this.delegateClass = delegateClass;
3✔
31
  }
1✔
32

33
  private D getDelegate() {
34
    return getCommandlet(this.delegateClass);
×
35
  }
36

37
  @Override
38
  public final boolean install(boolean silent, ProcessContext processContext) {
39
    return getDelegate().install(silent, processContext);
×
40
  }
41

42
  @Override
43
  public VersionIdentifier getInstalledVersion() {
44
    return getDelegate().getInstalledVersion();
×
45
  }
46

47
  @Override
48
  public String getInstalledEdition() {
49
    return getDelegate().getInstalledEdition();
×
50
  }
51

52
  @Override
53
  public Path getInstalledSoftwareRepoPath() {
54
    return getDelegate().getInstalledSoftwareRepoPath();
×
55
  }
56

57
  @Override
58
  public void uninstall() {
59
    getDelegate().uninstall();
×
60
  }
×
61

62
  @Override
63
  public void forceUninstall() {
64
    getDelegate().forceUninstall();
×
65
  }
×
66

67
  @Override
68
  public void listEditions() {
69
    getDelegate().listEditions();
×
70
  }
×
71

72
  @Override
73
  public void listVersions() {
74
    getDelegate().listVersions();
×
75
  }
×
76

77
  @Override
78
  public void setVersion(VersionIdentifier version, boolean hint, EnvironmentVariablesFiles destination) {
79
    getDelegate().setVersion(version, hint, destination);
×
80
  }
×
81

82
  @Override
83
  public void setEdition(String edition, boolean hint, EnvironmentVariablesFiles destination) {
84
    getDelegate().setEdition(edition, hint, destination);
×
85
  }
×
86
}
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