1 package org.kuali.common.jute.builder; 2 3 import static org.kuali.common.jute.reflect.Reflection.checkNoNulls; 4 5 public final class FooReflection { 6 7 private final String field1; 8 private final String field2; 9 private final String field3; 10 private final String field4; 11 private final String field5; 12 private final String field6; 13 private final String field7; 14 private final String field8; 15 private final String field9; 16 17 private FooReflection(Builder builder) { 18 this.field1 = builder.field1; 19 this.field2 = builder.field2; 20 this.field3 = builder.field3; 21 this.field4 = builder.field4; 22 this.field5 = builder.field5; 23 this.field6 = builder.field6; 24 this.field7 = builder.field7; 25 this.field8 = builder.field8; 26 this.field9 = builder.field9; 27 } 28 29 public static FooReflection build() { 30 return builder().build(); 31 } 32 33 public static Builder builder() { 34 return new Builder(); 35 } 36 37 public static class Builder implements org.apache.commons.lang3.builder.Builder<FooReflection> { 38 39 private String field1 = "foo"; 40 private String field2 = "foo"; 41 private String field3 = "foo"; 42 private String field4 = "foo"; 43 private String field5 = "foo"; 44 private String field6 = "foo"; 45 private String field7 = "foo"; 46 private String field8 = "foo"; 47 private String field9 = "foo"; 48 49 public Builder withField1(String field1) { 50 this.field1 = field1; 51 return this; 52 } 53 54 public Builder withField2(String field2) { 55 this.field2 = field2; 56 return this; 57 } 58 59 public Builder withField3(String field3) { 60 this.field3 = field3; 61 return this; 62 } 63 64 public Builder withField4(String field4) { 65 this.field4 = field4; 66 return this; 67 } 68 69 public Builder withField5(String field5) { 70 this.field5 = field5; 71 return this; 72 } 73 74 public Builder withField6(String field6) { 75 this.field6 = field6; 76 return this; 77 } 78 79 public Builder withField7(String field7) { 80 this.field7 = field7; 81 return this; 82 } 83 84 public Builder withField8(String field8) { 85 this.field8 = field8; 86 return this; 87 } 88 89 public Builder withField9(String field9) { 90 this.field9 = field9; 91 return this; 92 } 93 94 @Override 95 public FooReflection build() { 96 return checkNoNulls(new FooReflection(this)); 97 } 98 } 99 100 public String getField1() { 101 return field1; 102 } 103 104 public String getField2() { 105 return field2; 106 } 107 108 public String getField3() { 109 return field3; 110 } 111 112 public String getField4() { 113 return field4; 114 } 115 116 public String getField5() { 117 return field5; 118 } 119 120 public String getField6() { 121 return field6; 122 } 123 124 public String getField7() { 125 return field7; 126 } 127 128 public String getField8() { 129 return field8; 130 } 131 132 public String getField9() { 133 return field9; 134 } 135 136 }