Class MethodIntrospector

java.lang.Object
org.inferred.freebuilder.processor.model.MethodIntrospector
Direct Known Subclasses:
JavacMethodIntrospector, MethodIntrospector.NoMethodIntrospector

public abstract class MethodIntrospector extends Object
Compiler-specific methods for introspecting methods during compilation.
  • Field Details

  • Constructor Details

    • MethodIntrospector

      public MethodIntrospector()
  • Method Details

    • getOwnMethodInvocations

      public abstract Set<Name> getOwnMethodInvocations(ExecutableElement method)
      Returns a set of methods which are definitely invoked on this in the given method, or the empty set if method introspection is not supported on this compiler.
    • visitAllOwnMethodInvocations

      public abstract void visitAllOwnMethodInvocations(ExecutableElement method, MethodIntrospector.OwnMethodInvocationVisitor visitor)
      Calls visitor with every method invoked on this in the given method, if method introspection is supported on this compiler.

      The visitor is given the method name, and a logger to log warnings or errors to the user at the method invocation site.

    • instance

      public static MethodIntrospector instance(ProcessingEnvironment env)
      Returns a MethodIntrospector implementation for the given environment.