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

common-workflow-language / cwljava / #366

15 Jul 2025 10:49AM UTC coverage: 59.538% (-0.6%) from 60.167%
#366

push

github

mr-c
Add accessor for the extension field.

0 of 129 new or added lines in 129 files covered. (0.0%)

7347 of 12340 relevant lines covered (59.54%)

0.6 hits per line

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

87.5
/src/main/java/org/w3id/cwl/cwl1_2/ShellCommandRequirementImpl.java
1
// Copyright Common Workflow Language project contributors
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//      http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15
package org.w3id.cwl.cwl1_2;
16

17
import org.w3id.cwl.cwl1_2.utils.LoaderInstances;
18
import org.w3id.cwl.cwl1_2.utils.LoadingOptions;
19
import org.w3id.cwl.cwl1_2.utils.LoadingOptionsBuilder;
20
import org.w3id.cwl.cwl1_2.utils.SaveableImpl;
21
import org.w3id.cwl.cwl1_2.utils.ValidationException;
22

23
/**
24
* Auto-generated class implementation for <I>https://w3id.org/cwl/cwl#ShellCommandRequirement</I><BR> <BLOCKQUOTE>
25
 Modify the behavior of CommandLineTool to generate a single string
26
 containing a shell command line.  Each item in the `arguments` list must
27
 be joined into a string separated by single spaces and quoted to prevent
28
 interpretation by the shell, unless `CommandLineBinding` for that argument
29
 contains `shellQuote: false`.  If `shellQuote: false` is specified, the
30
 argument is joined into the command string without quoting, which allows
31
 the use of shell metacharacters such as `|` for pipes.
32
  </BLOCKQUOTE>
33
 */
34
public class ShellCommandRequirementImpl extends SaveableImpl implements ShellCommandRequirement {
35
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
1✔
36
  private java.util.Map<String, Object> extensionFields_ =
1✔
37
      new java.util.HashMap<String, Object>();
38
  public java.util.Map<String, Object> getExtensionFields() {
NEW
39
    return this.extensionFields_;
×
40
  }
41

42
  private ShellCommandRequirement_class class_;
43

44
  /**
45
   * Getter for property <I>https://w3id.org/cwl/cwl#ShellCommandRequirement/class</I><BR>
46
   * <BLOCKQUOTE>
47
   * Always 'ShellCommandRequirement'   * </BLOCKQUOTE>
48
   */
49

50
  public ShellCommandRequirement_class getClass_() {
51
    return this.class_;
×
52
  }
53

54
  /**
55
   * Used by {@link org.w3id.cwl.cwl1_2.utils.RootLoader} to construct instances of ShellCommandRequirementImpl.
56
   *
57
   * @param __doc_            Document fragment to load this record object from (presumably a
58
                              {@link java.util.Map}).
59
   * @param __baseUri_        Base URI to generate child document IDs against.
60
   * @param __loadingOptions  Context for loading URIs and populating objects.
61
   * @param __docRoot_        ID at this position in the document (if available) (maybe?)
62
   * @throws ValidationException If the document fragment is not a {@link java.util.Map}
63
   *                             or validation of fields fails.
64
   */
65
  public ShellCommandRequirementImpl(
66
      final Object __doc_,
67
      final String __baseUri_,
68
      LoadingOptions __loadingOptions,
69
      final String __docRoot_) {
70
    super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
1✔
71
    // Prefix plumbing variables with '__' to reduce likelihood of collision with
72
    // generated names.
73
    String __baseUri = __baseUri_;
1✔
74
    String __docRoot = __docRoot_;
1✔
75
    if (!(__doc_ instanceof java.util.Map)) {
1✔
76
      throw new ValidationException("ShellCommandRequirementImpl called on non-map");
×
77
    }
78
    final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
1✔
79
    final java.util.List<ValidationException> __errors =
1✔
80
        new java.util.ArrayList<ValidationException>();
81
    if (__loadingOptions != null) {
1✔
82
      this.loadingOptions_ = __loadingOptions;
1✔
83
    }
84
    ShellCommandRequirement_class class_;
85
    try {
86
      class_ =
1✔
87
          LoaderInstances
88
              .uri_ShellCommandRequirement_class_False_True_None_None
89
              .loadField(__doc.get("class"), __baseUri, __loadingOptions);
1✔
90
    } catch (ValidationException e) {
1✔
91
      class_ = null; // won't be used but prevents compiler from complaining.
1✔
92
      final String __message = "the `class` field is not valid because:";
1✔
93
      __errors.add(new ValidationException(__message, e));
1✔
94
    }
1✔
95
    if (!__errors.isEmpty()) {
1✔
96
      throw new ValidationException("Trying 'RecordField'", __errors);
1✔
97
    }
98
    this.class_ = (ShellCommandRequirement_class) class_;
1✔
99
  }
1✔
100
}
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