Uses of Interface
com.google.errorprone.bugpatterns.AbstractMockChecker.TypeExtractor
Package | Description |
---|---|
com.google.errorprone.bugpatterns |
Checks added to the java compiler which detect common bug patterns.
|
-
Uses of AbstractMockChecker.TypeExtractor in com.google.errorprone.bugpatterns
Fields in com.google.errorprone.bugpatterns declared as AbstractMockChecker.TypeExtractor Modifier and Type Field Description static AbstractMockChecker.TypeExtractor<com.sun.source.tree.MethodInvocationTree>
AbstractMockChecker. MOCKING_METHOD
A TypeExtractor for method invocations that create a mock using Mockito.mock, Mockito.spy, or EasyMock.create[...]Mock, extracting the type being mocked.Methods in com.google.errorprone.bugpatterns that return AbstractMockChecker.TypeExtractor Modifier and Type Method Description static AbstractMockChecker.TypeExtractor<com.sun.source.tree.MethodInvocationTree>
AbstractMockChecker. extractClassArg(Matcher<com.sun.source.tree.MethodInvocationTree> m)
Produces an extractor which, if the tree matches, extracts the type of the first argument whose type isClass
(preserving its<T>
type parameter, if it has one}.static AbstractMockChecker.TypeExtractor<com.sun.source.tree.MethodInvocationTree>
AbstractMockChecker. extractFirstArg(Matcher<com.sun.source.tree.MethodInvocationTree> m)
Produces an extractor which, if the tree matches, extracts the type of the first argument to the method invocation.static <T extends com.sun.source.tree.Tree>
AbstractMockChecker.TypeExtractor<T>AbstractMockChecker. extractType(Matcher<T> m)
Produces an extractor which, if the tree matches, extracts the type of that tree, as given byASTHelpers.getType(Tree)
.static AbstractMockChecker.TypeExtractor<com.sun.source.tree.VariableTree>
AbstractMockChecker. fieldAnnotatedWithOneOf(Stream<String> annotationClasses)
Creates a TypeExtractor that extracts the type of a class field if that field is annotated with any one of the given annotations.default AbstractMockChecker.TypeExtractor<T>
AbstractMockChecker.TypeExtractor. or(AbstractMockChecker.TypeExtractor<T> other)
Enrich this TypeExtractor with fallback behavior.Methods in com.google.errorprone.bugpatterns with parameters of type AbstractMockChecker.TypeExtractor Modifier and Type Method Description default AbstractMockChecker.TypeExtractor<T>
AbstractMockChecker.TypeExtractor. or(AbstractMockChecker.TypeExtractor<T> other)
Enrich this TypeExtractor with fallback behavior.Constructors in com.google.errorprone.bugpatterns with parameters of type AbstractMockChecker.TypeExtractor Constructor Description AbstractMockChecker(AbstractMockChecker.TypeExtractor<com.sun.source.tree.VariableTree> varExtractor, AbstractMockChecker.TypeExtractor<com.sun.source.tree.MethodInvocationTree> methodExtractor, Class<T> annotationClass, Function<T,String> getValueFunction)