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

box / box-java-sdk-gen / #226

20 Jun 2025 03:14PM UTC coverage: 35.609% (-0.2%) from 35.816%
#226

push

github

web-flow
feat: Shorten builder names in Java (box/box-codegen#742) (#334)

367 of 1570 new or added lines in 984 files covered. (23.38%)

674 existing lines in 370 files now uncovered.

16125 of 45284 relevant lines covered (35.61%)

0.36 hits per line

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

15.15
/src/main/java/com/box/sdkgen/schemas/metadatabase/MetadataBase.java
1
package com.box.sdkgen.schemas.metadatabase;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.fasterxml.jackson.annotation.JsonProperty;
5
import java.util.Objects;
6

7
public class MetadataBase extends SerializableObject {
8

9
  @JsonProperty("$parent")
10
  protected String parent;
11

12
  @JsonProperty("$template")
13
  protected String template;
14

15
  @JsonProperty("$scope")
16
  protected String scope;
17

18
  @JsonProperty("$version")
19
  protected Long version;
20

21
  public MetadataBase() {
22
    super();
1✔
23
  }
1✔
24

25
  protected MetadataBase(Builder builder) {
26
    super();
×
27
    this.parent = builder.parent;
×
28
    this.template = builder.template;
×
29
    this.scope = builder.scope;
×
30
    this.version = builder.version;
×
31
  }
×
32

33
  public String getParent() {
34
    return parent;
×
35
  }
36

37
  public String getTemplate() {
38
    return template;
1✔
39
  }
40

41
  public String getScope() {
42
    return scope;
1✔
43
  }
44

45
  public Long getVersion() {
46
    return version;
1✔
47
  }
48

49
  @Override
50
  public boolean equals(Object o) {
51
    if (this == o) {
×
52
      return true;
×
53
    }
54
    if (o == null || getClass() != o.getClass()) {
×
55
      return false;
×
56
    }
57
    MetadataBase casted = (MetadataBase) o;
×
58
    return Objects.equals(parent, casted.parent)
×
59
        && Objects.equals(template, casted.template)
×
60
        && Objects.equals(scope, casted.scope)
×
61
        && Objects.equals(version, casted.version);
×
62
  }
63

64
  @Override
65
  public int hashCode() {
66
    return Objects.hash(parent, template, scope, version);
×
67
  }
68

69
  @Override
70
  public String toString() {
71
    return "MetadataBase{"
×
72
        + "parent='"
73
        + parent
74
        + '\''
75
        + ", "
76
        + "template='"
77
        + template
78
        + '\''
79
        + ", "
80
        + "scope='"
81
        + scope
82
        + '\''
83
        + ", "
84
        + "version='"
85
        + version
86
        + '\''
87
        + "}";
88
  }
89

NEW
90
  public static class Builder {
×
91

92
    protected String parent;
93

94
    protected String template;
95

96
    protected String scope;
97

98
    protected Long version;
99

100
    public Builder parent(String parent) {
101
      this.parent = parent;
×
102
      return this;
×
103
    }
104

105
    public Builder template(String template) {
106
      this.template = template;
×
107
      return this;
×
108
    }
109

110
    public Builder scope(String scope) {
111
      this.scope = scope;
×
112
      return this;
×
113
    }
114

115
    public Builder version(Long version) {
116
      this.version = version;
×
117
      return this;
×
118
    }
119

120
    public MetadataBase build() {
121
      return new MetadataBase(this);
×
122
    }
123
  }
124
}
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