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

devonfw / IDEasy / 20003978026

07 Dec 2025 12:09PM UTC coverage: 70.101% (+0.2%) from 69.903%
20003978026

push

github

web-flow
#39: refactoring to extract package-manager logic out of node/npm (#1638)

3892 of 6090 branches covered (63.91%)

Branch coverage included in aggregate %.

9955 of 13663 relevant lines covered (72.86%)

3.15 hits per line

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

77.78
cli/src/main/java/com/devonfw/tools/ide/property/StringProperty.java
1
package com.devonfw.tools.ide.property;
2

3
import com.devonfw.tools.ide.context.IdeContext;
4
import com.devonfw.tools.ide.validation.PropertyValidator;
5

6
/**
7
 * {@link Property} with {@link #getValueType() value type} {@link String}.
8
 */
9
public class StringProperty extends Property<String> {
10

11
  /**
12
   * The constructor.
13
   *
14
   * @param name the {@link #getName() property name}.
15
   * @param required the {@link #isRequired() required flag}.
16
   * @param alias the {@link #getAlias() property alias}.
17
   */
18
  public StringProperty(String name, boolean required, String alias) {
19

20
    this(name, required, alias, false, null);
7✔
21
  }
1✔
22

23
  /**
24
   * The constructor.
25
   *
26
   * @param name the {@link #getName() property name}.
27
   * @param required the {@link #isRequired() required flag}.
28
   * @param alias the {@link #getAlias() property alias}.
29
   * @param multivalued the boolean flag about multiple arguments.
30
   */
31
  public StringProperty(String name, boolean required, boolean multivalued, String alias) {
32

33
    this(name, required, alias, multivalued, null);
7✔
34
  }
1✔
35

36
  /**
37
   * The constructor.
38
   *
39
   * @param name the {@link #getName() property name}.
40
   * @param required the {@link #isRequired() required flag}.
41
   * @param alias the {@link #getAlias() property alias}.
42
   * @param validator the {@link PropertyValidator} used to {@link #validate() validate} the {@link #getValue() value}.
43
   * @param multivalued the boolean flag about multiple arguments
44
   */
45
  public StringProperty(String name, boolean required, String alias, boolean multivalued, PropertyValidator<String> validator) {
46

47
    super(name, required, alias, multivalued, validator);
7✔
48
  }
1✔
49

50
  @Override
51
  public Class<String> getValueType() {
52

53
    return String.class;
×
54
  }
55

56
  @Override
57
  public String parse(String valueAsString, IdeContext context) {
58

59
    return valueAsString;
2✔
60
  }
61

62
  /**
63
   * @return the {@link #getValue() value} as null-safe {@link String} array.
64
   */
65
  public String[] asArray() {
66

67
    return this.value.toArray(new String[this.value.size()]);
×
68
  }
69

70
}
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