File: AutoFactoryAtInject.md

package info (click to toggle)
error-prone-java 2.18.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 23,204 kB
  • sloc: java: 222,992; xml: 1,319; sh: 25; makefile: 7
file content (6 lines) | stat: -rw-r--r-- 420 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
@AutoFactory classes should not be @Inject-ed, inject the generated factory
instead. Classes that are annotated with @AutoFactory are intended to be
constructed by invoking the factory method on the generated factory. Typically
this is because some of the necessary constructor arguments are not part of the
binding graph. Generated @AutoFactory classes are automatically marked @Inject -
prefer to inject that instead.