Package org.immutables.builder
Annotation Type Builder.AccessibleFields
- Enclosing class:
Builder
Annotate nested static builder to get access to the builder's fields to avoid building the
entire
object. The fields will be protected rather then private as they are by default.
@Immutable
abstract class A {
int a();
@AccessibleFields
static class Builder extends ImmutableA.Builder {
A build() {
int accessibleBuilderFieldA = this.a;
return super.build();
}
}
}