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

devonfw / IDEasy / 26101908636

19 May 2026 01:55PM UTC coverage: 70.982% (+0.003%) from 70.979%
26101908636

Pull #1859

github

web-flow
Merge cf4a7f717 into b4eeee25f
Pull Request #1859: #1392: Smart completions

4472 of 6964 branches covered (64.22%)

Branch coverage included in aggregate %.

11521 of 15567 relevant lines covered (74.01%)

3.14 hits per line

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

70.0
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.commandlet.Commandlet;
4
import com.devonfw.tools.ide.completion.CompletionCandidateCollector;
5
import com.devonfw.tools.ide.context.IdeContext;
6
import com.devonfw.tools.ide.validation.PropertyValidator;
7

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

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

22
    this(name, required, alias, false, null);
7✔
23
  }
1✔
24

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

35
    this(name, required, alias, multivalued, null);
7✔
36
  }
1✔
37

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

49
    super(name, required, alias, multivalued, validator);
7✔
50
  }
1✔
51

52
  @Override
53
  public Class<String> getValueType() {
54

55
    return String.class;
×
56
  }
57

58
  @Override
59
  public String parse(String valueAsString, IdeContext context) {
60

61
    return valueAsString;
2✔
62
  }
63

64
  @Override
65
  protected void completeValue(String arg, IdeContext contextual, Commandlet commandlet,
66
                               CompletionCandidateCollector collector) {}
×
67

68
  /**
69
   * @return the {@link #getValue() value} as null-safe {@link String} array.
70
   */
71
  public String[] asArray() {
72

73
    return this.value.toArray(new String[this.value.size()]);
×
74
  }
75

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