Interface AbstractMockChecker.MockForbidder
- Enclosing class:
AbstractMockChecker<T extends Annotation>
public static interface AbstractMockChecker.MockForbidder
A policy for determining what classes should not be mocked.
This interface's intended use is to forbid mocking of classes you don't control, for example those in the JDK itself or in a library you use.
- Author:
- amalloy@google.com (Alan Malloy)
-
Method Summary
Modifier and TypeMethodDescriptionforbidReason
(com.sun.tools.javac.code.Type type, VisitorState state) If the given type should not be mocked, provide an explanation why.
-
Method Details
-
forbidReason
Optional<AbstractMockChecker.Reason> forbidReason(com.sun.tools.javac.code.Type type, VisitorState state) If the given type should not be mocked, provide an explanation why.- Parameters:
type
- the type that is being mocked- Returns:
- the reason it should not be mocked
-