• 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

21.21
/src/main/java/com/box/sdkgen/schemas/appitem/AppItem.java
1
package com.box.sdkgen.schemas.appitem;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.serialization.json.EnumWrapper;
5
import com.fasterxml.jackson.annotation.JsonProperty;
6
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
7
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
8
import java.util.Objects;
9

10
public class AppItem extends SerializableObject {
11

12
  protected final String id;
13

14
  @JsonDeserialize(using = AppItemTypeField.AppItemTypeFieldDeserializer.class)
15
  @JsonSerialize(using = AppItemTypeField.AppItemTypeFieldSerializer.class)
16
  protected EnumWrapper<AppItemTypeField> type;
17

18
  @JsonProperty("application_type")
19
  protected final String applicationType;
20

21
  public AppItem(
22
      @JsonProperty("id") String id, @JsonProperty("application_type") String applicationType) {
23
    super();
1✔
24
    this.id = id;
1✔
25
    this.applicationType = applicationType;
1✔
26
    this.type = new EnumWrapper<AppItemTypeField>(AppItemTypeField.APP_ITEM);
1✔
27
  }
1✔
28

29
  protected AppItem(Builder builder) {
30
    super();
×
31
    this.id = builder.id;
×
32
    this.type = builder.type;
×
33
    this.applicationType = builder.applicationType;
×
34
  }
×
35

36
  public String getId() {
37
    return id;
×
38
  }
39

40
  public EnumWrapper<AppItemTypeField> getType() {
41
    return type;
1✔
42
  }
43

44
  public String getApplicationType() {
45
    return applicationType;
1✔
46
  }
47

48
  @Override
49
  public boolean equals(Object o) {
50
    if (this == o) {
×
51
      return true;
×
52
    }
53
    if (o == null || getClass() != o.getClass()) {
×
54
      return false;
×
55
    }
56
    AppItem casted = (AppItem) o;
×
57
    return Objects.equals(id, casted.id)
×
58
        && Objects.equals(type, casted.type)
×
59
        && Objects.equals(applicationType, casted.applicationType);
×
60
  }
61

62
  @Override
63
  public int hashCode() {
64
    return Objects.hash(id, type, applicationType);
×
65
  }
66

67
  @Override
68
  public String toString() {
69
    return "AppItem{"
×
70
        + "id='"
71
        + id
72
        + '\''
73
        + ", "
74
        + "type='"
75
        + type
76
        + '\''
77
        + ", "
78
        + "applicationType='"
79
        + applicationType
80
        + '\''
81
        + "}";
82
  }
83

84
  public static class Builder {
85

86
    protected final String id;
87

88
    protected EnumWrapper<AppItemTypeField> type;
89

90
    protected final String applicationType;
91

NEW
92
    public Builder(String id, String applicationType) {
×
93
      this.id = id;
×
94
      this.applicationType = applicationType;
×
95
      this.type = new EnumWrapper<AppItemTypeField>(AppItemTypeField.APP_ITEM);
×
96
    }
×
97

98
    public Builder type(AppItemTypeField type) {
99
      this.type = new EnumWrapper<AppItemTypeField>(type);
×
100
      return this;
×
101
    }
102

103
    public Builder type(EnumWrapper<AppItemTypeField> type) {
104
      this.type = type;
×
105
      return this;
×
106
    }
107

108
    public AppItem build() {
109
      return new AppItem(this);
×
110
    }
111
  }
112
}
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