Issue #28585 has unlocked our ability to simplify and hide a details with AOT APIs. If we migrate our tests to use GeneratedClasses we can then make the following changes:
- Drop the
MethodGeneratorinterface - Make
GeneratedMethodsandGeneratedClasseshave package-private constructors - Make some currently public methods package-private since they're only called from the
aotpackage - Change the
usingorbuildermethods so thatConsumerfields can befinal.
In addition we can also fix the variable and parameter names from builder to type or method so that it becomes more obvious what is being built.