Skip to content

Commit cfa79a6

Browse files
committed
Rename internal method findRecordBuilderPrism()
1 parent 288c79f commit cfa79a6

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

avaje-record-builder-core/src/main/java/io/avaje/recordbuilder/internal/RecordProcessor.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,15 @@ private void findNestedRecords(TypeElement type, Set<TypeElement> types) {
130130
}
131131

132132
private void readElement(TypeElement type) {
133-
readElement(type, getRecordBuilderPrism(type));
133+
readElement(type, findRecordBuilderPrism(type));
134134
}
135135

136-
private static RecordBuilderPrism getRecordBuilderPrism(Element element) {
136+
private static RecordBuilderPrism findRecordBuilderPrism(Element element) {
137137
var prism = RecordBuilderPrism.getInstanceOn(element);
138-
return prism != null ? prism : getRecordBuilderPrism(element.getEnclosingElement());
138+
return prism != null ? prism : findRecordBuilderPrism(element.getEnclosingElement());
139139
}
140140

141141
private void readElement(TypeElement type, BuilderPrism prism) {
142-
143142
final var components = type.getRecordComponents();
144143
final var packageElement = elements().getPackageOf(type);
145144
boolean isImported = prism.imported();
@@ -177,9 +176,7 @@ private void methods(
177176
boolean getters = prism.getters();
178177

179178
for (final var element : components) {
180-
181179
final var type = UType.parse(element.asType());
182-
183180
writer.append(
184181
MethodSetter.methodSetter(
185182
element.getSimpleName(), type.shortType(), builderName, typeParams));
@@ -188,15 +185,13 @@ private void methods(
188185
}
189186

190187
if (APContext.isAssignable(type.mainType(), "java.util.Collection")) {
191-
192188
String param0ShortType = type.param0().shortType();
193189
Name simpleName = element.getSimpleName();
194190
writer.append(
195191
MethodAdd.methodAdd(simpleName.toString(), builderName, param0ShortType, typeParams));
196192
}
197193

198194
if (APContext.isAssignable(type.mainType(), "java.util.Map")) {
199-
200195
String param0ShortType = type.param0().shortType();
201196
String param1ShortType = type.param1().shortType();
202197
Name simpleName = element.getSimpleName();

0 commit comments

Comments
 (0)