• 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

22.22
/src/main/java/com/box/sdkgen/schemas/folderreference/FolderReference.java
1
package com.box.sdkgen.schemas.folderreference;
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 FolderReference extends SerializableObject {
11

12
  @JsonDeserialize(using = FolderReferenceTypeField.FolderReferenceTypeFieldDeserializer.class)
13
  @JsonSerialize(using = FolderReferenceTypeField.FolderReferenceTypeFieldSerializer.class)
14
  protected EnumWrapper<FolderReferenceTypeField> type;
15

16
  protected final String id;
17

18
  public FolderReference(@JsonProperty("id") String id) {
19
    super();
1✔
20
    this.id = id;
1✔
21
    this.type = new EnumWrapper<FolderReferenceTypeField>(FolderReferenceTypeField.FOLDER);
1✔
22
  }
1✔
23

24
  protected FolderReference(Builder builder) {
25
    super();
×
26
    this.type = builder.type;
×
27
    this.id = builder.id;
×
28
  }
×
29

30
  public EnumWrapper<FolderReferenceTypeField> getType() {
31
    return type;
1✔
32
  }
33

34
  public String getId() {
35
    return id;
1✔
36
  }
37

38
  @Override
39
  public boolean equals(Object o) {
40
    if (this == o) {
×
41
      return true;
×
42
    }
43
    if (o == null || getClass() != o.getClass()) {
×
44
      return false;
×
45
    }
46
    FolderReference casted = (FolderReference) o;
×
47
    return Objects.equals(type, casted.type) && Objects.equals(id, casted.id);
×
48
  }
49

50
  @Override
51
  public int hashCode() {
52
    return Objects.hash(type, id);
×
53
  }
54

55
  @Override
56
  public String toString() {
57
    return "FolderReference{" + "type='" + type + '\'' + ", " + "id='" + id + '\'' + "}";
×
58
  }
59

60
  public static class Builder {
61

62
    protected EnumWrapper<FolderReferenceTypeField> type;
63

64
    protected final String id;
65

NEW
66
    public Builder(String id) {
×
67
      this.id = id;
×
68
      this.type = new EnumWrapper<FolderReferenceTypeField>(FolderReferenceTypeField.FOLDER);
×
69
    }
×
70

71
    public Builder type(FolderReferenceTypeField type) {
72
      this.type = new EnumWrapper<FolderReferenceTypeField>(type);
×
73
      return this;
×
74
    }
75

76
    public Builder type(EnumWrapper<FolderReferenceTypeField> type) {
77
      this.type = type;
×
78
      return this;
×
79
    }
80

81
    public FolderReference build() {
82
      return new FolderReference(this);
×
83
    }
84
  }
85
}
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