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

devonfw / IDEasy / 9907372175

12 Jul 2024 11:49AM UTC coverage: 61.142% (-0.02%) from 61.162%
9907372175

push

github

hohwille
fixed tests

1997 of 3595 branches covered (55.55%)

Branch coverage included in aggregate %.

5296 of 8333 relevant lines covered (63.55%)

2.8 hits per line

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

23.08
cli/src/main/java/com/devonfw/tools/ide/variable/VariableDefinitionSystemPath.java
1
package com.devonfw.tools.ide.variable;
2

3
import java.nio.file.Path;
4
import java.util.function.Function;
5

6
import com.devonfw.tools.ide.common.SystemPath;
7
import com.devonfw.tools.ide.context.IdeContext;
8

9
/**
10
 * Implementation of {@link VariableDefinition} for a variable with the {@link #getValueType() value type} {@link Path}.
11
 */
12
public class VariableDefinitionSystemPath extends AbstractVariableDefinition<SystemPath> {
13

14
  /**
15
   * The constructor.
16
   *
17
   * @param name the {@link #getName() variable name}.
18
   */
19
  public VariableDefinitionSystemPath(String name) {
20

21
    super(name);
×
22
  }
×
23

24
  /**
25
   * The constructor.
26
   *
27
   * @param name the {@link #getName() variable name}.
28
   * @param legacyName the {@link #getLegacyName() legacy name}.
29
   */
30
  public VariableDefinitionSystemPath(String name, String legacyName) {
31

32
    super(name, legacyName);
×
33
  }
×
34

35
  /**
36
   * The constructor.
37
   *
38
   * @param name the {@link #getName() variable name}.
39
   * @param legacyName the {@link #getLegacyName() legacy name}.
40
   * @param defaultValueFactory the factory {@link Function} for the {@link #getDefaultValue(IdeContext) default value}.
41
   */
42
  public VariableDefinitionSystemPath(String name, String legacyName,
43
      Function<IdeContext, SystemPath> defaultValueFactory) {
44

45
    super(name, legacyName, defaultValueFactory);
×
46
  }
×
47

48
  /**
49
   * The constructor.
50
   *
51
   * @param name the {@link #getName() variable name}.
52
   * @param legacyName the {@link #getLegacyName() legacy name}.
53
   * @param defaultValueFactory the factory {@link Function} for the {@link #getDefaultValue(IdeContext) default value}.
54
   * @param forceDefaultValue the {@link #isForceDefaultValue() forceDefaultValue} flag.
55
   */
56
  public VariableDefinitionSystemPath(String name, String legacyName,
57
      Function<IdeContext, SystemPath> defaultValueFactory, boolean forceDefaultValue) {
58

59
    super(name, legacyName, defaultValueFactory, forceDefaultValue);
×
60
  }
×
61

62
  /**
63
   * The constructor.
64
   *
65
   * @param name the {@link #getName() variable name}.
66
   * @param legacyName the {@link #getLegacyName() legacy name}.
67
   * @param defaultValueFactory the factory {@link Function} for the {@link #getDefaultValue(IdeContext) default value}.
68
   * @param forceDefaultValue the {@link #isForceDefaultValue() forceDefaultValue} flag.
69
   * @param export the {@link #isExport() export} flag.
70
   */
71
  public VariableDefinitionSystemPath(String name, String legacyName,
72
      Function<IdeContext, SystemPath> defaultValueFactory, boolean forceDefaultValue, boolean export) {
73

74
    super(name, legacyName, defaultValueFactory, forceDefaultValue, export);
7✔
75
  }
1✔
76

77
  @Override
78
  public Class<SystemPath> getValueType() {
79

80
    return SystemPath.class;
×
81
  }
82

83
  @Override
84
  public SystemPath fromString(String value, IdeContext context) {
85

86
    return new SystemPath(context, value);
×
87
  }
88

89
  @Override
90
  public String toString(SystemPath value, IdeContext context) {
91
    return value.toString(context.getPathSyntax());
5✔
92
  }
93
}
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

© 2025 Coveralls, Inc