-
Interfaces Interface Description com.google.errorprone.matchers.method.MethodMatchers.AnyMethodMatcher useMatcher<ExpressionTree>
instead of referring directly to this type.com.google.errorprone.matchers.method.MethodMatchers.ConstructorClassMatcher useMatcher<ExpressionTree>
instead of referring directly to this type.com.google.errorprone.matchers.method.MethodMatchers.ConstructorMatcher useMatcher<ExpressionTree>
instead of referring directly to this type.com.google.errorprone.matchers.method.MethodMatchers.InstanceMethodMatcher useMatcher<ExpressionTree>
instead of referring directly to this type.com.google.errorprone.matchers.method.MethodMatchers.MethodClassMatcher useMatcher<ExpressionTree>
instead of referring directly to this type.com.google.errorprone.matchers.method.MethodMatchers.MethodMatcher useMatcher<ExpressionTree>
instead of referring directly to this type.com.google.errorprone.matchers.method.MethodMatchers.MethodNameMatcher useMatcher<ExpressionTree>
instead of referring directly to this type.com.google.errorprone.matchers.method.MethodMatchers.MethodSignatureMatcher useMatcher<ExpressionTree>
instead of referring directly to this type.com.google.errorprone.matchers.method.MethodMatchers.ParameterMatcher useMatcher<ExpressionTree>
instead of referring directly to this type.com.google.errorprone.matchers.method.MethodMatchers.StaticMethodMatcher useMatcher<ExpressionTree>
instead of referring directly to this type.
-
Methods Method Description com.google.errorprone.ErrorProneError.logFatalError(Log) com.google.errorprone.matchers.Description.Builder.addFix(Optional<? extends Fix>) prefer referring to empty fixes usingSuggestedFix.emptyFix()
.com.google.errorprone.matchers.Matchers.isNonNull() useMatchers.isNonNullUsingDataflow()
instead.com.google.errorprone.matchers.Matchers.isNull() useMatchers.isNullUsingDataflow()
instead.com.google.errorprone.util.ASTHelpers.getAnnotation(Tree, Class<T>) IfannotationClass
contains a member that is aClass
or an array of them, attempting to access that member from the Error Prone checker code will result in a runtime exception. Instead, operate onsym.getAnnotationMirrors()
to meta-syntactically inspect the annotation.com.google.errorprone.util.ASTHelpers.isUsedReflectively(Tree) useASTHelpers.shouldKeep(com.sun.source.tree.Tree)
instead
-
Constructors Constructor Description com.google.errorprone.VisitorState(Context) If VisitorState is needed, useVisitorState.createForUtilityPurposes(com.sun.tools.javac.util.Context)
, otherwise just use utility methods in ASTHelpers that don't need VisitorSate.