Hi all,
Following discussion during last meeting, I rewrote most of my PR for builders.
We now have 2 clean and distinct ways of using them
1) in DSL style (with a Configurator interface without build() method)
public void processAT(@Observes ProcessAnnotatedType<?> pat) {
pat.setAnnotatedType().read(pat.getAnnotatedType()).addToType(new AnnotationLiteral<MyInterceptor>() {};);
}
2) In classical reusable builder mode (builders extends configurator and only add build() method)
public void processAT(@Observes ProcessAnnotatedType<?> pat) {
AnnotatedTypeBuilder atb = Builders.annotatedTypeBuilder();
atb.read(pat.getAnnotatedType()).addToType(new AnnotationLiteral<MyInterceptor>() {};);
pat.setAnnotatedType(atb.build());
}
As Configurators don't have build() method there's no risk that users mix them with standard builders.
For clarity sake, builders are no more available in lifecycle event but in Builders class for consistency.
I'm quite happy with the result, but I'm sure you'll have comment ;). So thanks for your feedback
Antoine