Class InjectedConstructorAnnotations

java.lang.Object
com.google.errorprone.bugpatterns.BugChecker
com.google.errorprone.bugpatterns.inject.InjectedConstructorAnnotations
All Implemented Interfaces:
BugChecker.MethodTreeMatcher, Suppressible, Serializable

public class InjectedConstructorAnnotations extends BugChecker implements BugChecker.MethodTreeMatcher
A checker for injected constructors with @Inject(optional=true) or binding annotations.
See Also:
  • Constructor Details

    • InjectedConstructorAnnotations

      public InjectedConstructorAnnotations()
  • Method Details

    • matchMethod

      public Description matchMethod(com.sun.source.tree.MethodTree methodTree, VisitorState state)
      Matches injected constructors annotated with @Inject(optional=true) or binding annotations. Suggests fixes to remove the argument optional=true or binding annotations.
      Specified by:
      matchMethod in interface BugChecker.MethodTreeMatcher