Class AbstractMockChecker.Reason

java.lang.Object
com.google.errorprone.bugpatterns.AbstractMockChecker.Reason
Enclosing class:
AbstractMockChecker<T extends Annotation>

public abstract static class AbstractMockChecker.Reason
extends Object
An explanation of what type should not be mocked, and the reason why.
  • Constructor Summary

    Constructors
    Constructor Description
    Reason()  
  • Method Summary

    Modifier and Type Method Description
    static AbstractMockChecker.Reason of​(com.sun.tools.javac.code.Type t, String reason)  
    abstract String reason()
    The reason this class should not be mocked, which may be as simple as "it is annotated to forbid mocking" but may also provide a suggested workaround.
    abstract com.sun.tools.javac.code.Type unmockableClass()
    A Type object representing the class that should not be mocked.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Reason

      public Reason()
  • Method Details

    • of

      public static AbstractMockChecker.Reason of​(com.sun.tools.javac.code.Type t, String reason)
    • unmockableClass

      public abstract com.sun.tools.javac.code.Type unmockableClass()
      A Type object representing the class that should not be mocked.
    • reason

      public abstract String reason()
      The reason this class should not be mocked, which may be as simple as "it is annotated to forbid mocking" but may also provide a suggested workaround.