Uses of Interface
com.google.errorprone.bugpatterns.AbstractMockChecker.TypeExtractor
Packages that use AbstractMockChecker.TypeExtractor
Package
Description
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.TypeExtractorModifier and TypeFieldDescriptionstatic final 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.TypeExtractorModifier and TypeMethodDescriptionstatic 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.TypeExtractorModifier and TypeMethodDescriptiondefault 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.TypeExtractorModifierConstructorDescriptionAbstractMockChecker
(AbstractMockChecker.TypeExtractor<com.sun.source.tree.VariableTree> varExtractor, AbstractMockChecker.TypeExtractor<com.sun.source.tree.MethodInvocationTree> methodExtractor, Class<T> annotationClass, Function<T, String> getValueFunction)