Uses of Class
com.google.errorprone.VisitorState
Packages that use VisitorState
Package
Description
Checks added to the java compiler which detect common bug patterns.
Bug patterns related to dependency
injection and JSR 330.
Bug patterns related to Dagger.
Bug patterns related to Guice.
Support code for providing automated corrections for defects we find.
A predicate DSL for matching javac AST nodes.
Supports matchers, but rather than giving Matcher implementations which are predicates on
individual AST nodes, a supplier gives contextual information from the traversal of the AST.
Utility code.
-
Uses of VisitorState in com.google.errorprone
Methods in com.google.errorprone that return VisitorStateModifier and TypeMethodDescriptionstatic VisitorStateVisitorState.createConfiguredForCompilation(com.sun.tools.javac.util.Context context, DescriptionListener listener, Map<String, BugPattern.SeverityLevel> severityMap, ErrorProneOptions errorProneOptions) Return a VisitorState configured for a new compilation, including Error Prone configuration.static VisitorStateVisitorState.createForCustomFindingCollection(com.sun.tools.javac.util.Context context, DescriptionListener listener) Return a VisitorState that has no Error Prone configuration, but can report findings tolistener.static VisitorStateVisitorState.createForUtilityPurposes(com.sun.tools.javac.util.Context context) Return a VisitorState that has no Error Prone configuration, and can't report results.VisitorState.withSuppression(SuppressionInfo.SuppressedState suppressedState) Methods in com.google.errorprone with parameters of type VisitorStateModifier and TypeMethodDescriptionSuppressionInfo.forCompilationUnit(CompilationUnitTree tree, VisitorState state) Generates theSuppressionInfofor aCompilationUnitTree.SuppressionInfo.suppressedState(Suppressible suppressible, boolean suppressedInGeneratedCode, VisitorState state) Returns true if this checker should be considered suppressed given the signals present in this object.SuppressionInfo.withExtendedSuppressions(com.sun.tools.javac.code.Symbol sym, VisitorState state, Set<? extends com.sun.tools.javac.util.Name> customSuppressionAnnosToLookFor) Returns an instance ofSuppressionInfothat takes into account any suppression signals present onsymas well as those already stored inthis. -
Uses of VisitorState in com.google.errorprone.bugpatterns
Classes in com.google.errorprone.bugpatterns that implement interfaces with type arguments of type VisitorStateModifier and TypeClassDescriptionclassAn abstract base class to match API usages in which the return value is not used.Fields in com.google.errorprone.bugpatterns declared as VisitorStateModifier and TypeFieldDescriptionprotected final VisitorStateBugChecker.SuppressibleTreePathScanner.stateShortCircuitBoolean.TreeScannerBinary.statesaved stateMethods in com.google.errorprone.bugpatterns with parameters of type VisitorStateModifier and TypeMethodDescriptionstatic FixMissingFail.addFailCall(TryTree tree, StatementTree lastTryStatement, VisitorState state) protected voidAbstractReferenceEquality.addFixes(Description.Builder builder, BinaryTree tree, VisitorState state) StringSplitter.buildFix(MethodInvocationTree tree, VisitorState state) static com.google.errorprone.bugpatterns.CanBeStaticAnalyzer.CanBeStaticResultCanBeStaticAnalyzer.canBeStaticResult(Tree tree, com.sun.tools.javac.code.Symbol owner, VisitorState state) JUnit3TestNotRun.checkMethod(MethodTree methodTree, com.google.common.collect.ImmutableSet<com.sun.tools.javac.code.Symbol.MethodSymbol> calledMethods, VisitorState state) Matches iff: Method's name begins with misspelled variation of "test".TypeCompatibility.compatibilityOfTypes(com.sun.tools.javac.code.Type receiverType, com.sun.tools.javac.code.Type argumentType, VisitorState state) PreconditionsInvalidPlaceholder.describe(MethodInvocationTree tree, VisitorState state) SelfAssignment.describeForAssignment(AssignmentTree assignmentTree, VisitorState state) We expect that the lhs is a field and the rhs is an identifier, specifically a parameter to the method.SelfAssignment.describeForVarDecl(VariableTree tree, VisitorState state) protected DescriptionAbstractReturnValueIgnored.describeReturnValueIgnored(MemberReferenceTree memberReferenceTree, VisitorState state) Uses the default description for results ignored via a method reference.protected DescriptionAbstractReturnValueIgnored.describeReturnValueIgnored(MethodInvocationTree methodInvocationTree, VisitorState state) Fixes the error by assigning the result of the call to the receiver reference, or deleting the method call.protected DescriptionAbstractReturnValueIgnored.describeReturnValueIgnored(NewClassTree newClassTree, VisitorState state) Uses the default description for results ignored via a constructor call.protected DescriptionCheckReturnValue.describeReturnValueIgnored(MemberReferenceTree tree, VisitorState state) protected DescriptionCheckReturnValue.describeReturnValueIgnored(MethodInvocationTree tree, VisitorState state) protected DescriptionCheckReturnValue.describeReturnValueIgnored(NewClassTree tree, VisitorState state) protected DescriptionIgnoredPureGetter.describeReturnValueIgnored(MethodInvocationTree methodInvocationTree, VisitorState state) AbstractToString.descriptionMessageForDefaultMatch(com.sun.tools.javac.code.Type type, VisitorState state) Adds the description message for match on the type without fixes.LiteProtoToString.descriptionMessageForDefaultMatch(com.sun.tools.javac.code.Type type, VisitorState state) ObjectToString.descriptionMessageForDefaultMatch(com.sun.tools.javac.code.Type type, VisitorState state) SymbolToString.descriptionMessageForDefaultMatch(com.sun.tools.javac.code.Type type, VisitorState state) TreeToString.descriptionMessageForDefaultMatch(com.sun.tools.javac.code.Type type, VisitorState state) TypeToString.descriptionMessageForDefaultMatch(com.sun.tools.javac.code.Type type, VisitorState state) protected booleanAbstractMustBeClosedChecker.exemptChange(ExpressionTree tree, VisitorState state) Optional<com.sun.tools.javac.code.Type> AbstractMockChecker.TypeExtractor.extract(T tree, VisitorState state) Investigate the provided Tree, and return type information about it if it matches.protected static @Nullable SuggestedFixSelfEquals.fieldFix(Tree toReplace, VisitorState state) protected Optional<AbstractMustBeClosedChecker.Change> AbstractMustBeClosedChecker.fix(ExpressionTree tree, VisitorState state, com.google.errorprone.bugpatterns.AbstractMustBeClosedChecker.NameSuggester suggester) protected Optional<AbstractMustBeClosedChecker.Change> StreamResourceLeak.fix(ExpressionTree tree, VisitorState state, com.google.errorprone.bugpatterns.AbstractMustBeClosedChecker.NameSuggester suggester) static com.google.common.collect.ImmutableList<Fix> ReplacementVariableFinder.fixesByReplacingExpressionWithLocallyDeclaredField(ExpressionTree input, Predicate<com.sun.tools.javac.tree.JCTree.JCVariableDecl> validFieldPredicate, VisitorState state) Suggest replacinginputwith a qualified reference to a locally declared field with a similar or the same name as theinputexpression.static com.google.common.collect.ImmutableList<Fix> ReplacementVariableFinder.fixesByReplacingExpressionWithMethodParameter(ExpressionTree input, Predicate<com.sun.tools.javac.tree.JCTree.JCVariableDecl> validParameterPredicate, VisitorState state) Suggest replacinginputwith a reference to a method parameter in the nearest enclosing method declaration with a similar or the same name as theinputexpression.AbstractMockChecker.MockForbidder.forbidReason(com.sun.tools.javac.code.Type type, VisitorState state) If the given type should not be mocked, provide an explanation why.protected abstract @Nullable StringAbstractUseSwitch.getExpressionForCase(VisitorState state, ExpressionTree argument) Returns the source text that should appear in acasestatement in the fix.protected @Nullable StringUseEnumSwitch.getExpressionForCase(VisitorState state, ExpressionTree argument) com.google.common.collect.ImmutableMap<String, ?> CheckReturnValue.getMatchMetadata(ExpressionTree tree, VisitorState state) com.google.common.collect.ImmutableMap<String, ?> IgnoredPureGetter.getMatchMetadata(ExpressionTree tree, VisitorState state) com.google.common.collect.ImmutableMap<String, ?> ReturnValueIgnored.getMatchMetadata(ExpressionTree tree, VisitorState state) AbstractReturnValueIgnored.getMethodPolicy(ExpressionTree expression, VisitorState state) CheckReturnValue.getMethodPolicy(ExpressionTree expression, VisitorState state) static booleanReferenceEquality.implementsEquals(com.sun.tools.javac.code.Type type, VisitorState state) Check if the method declares or inherits an implementation of .equals()AbstractToString.implicitToStringFix(ExpressionTree tree, VisitorState state) Constructs a fix for an implicit toString call, e.g. from string concatenation or from passing an argument toprintlnorStringBuilder.append.AnnotationMirrorToString.implicitToStringFix(ExpressionTree tree, VisitorState state) AnnotationValueToString.implicitToStringFix(ExpressionTree tree, VisitorState state) ArrayToString.implicitToStringFix(ExpressionTree tree, VisitorState state) LiteProtoToString.implicitToStringFix(ExpressionTree tree, VisitorState state) ObjectToString.implicitToStringFix(ExpressionTree tree, VisitorState state) StreamToString.implicitToStringFix(ExpressionTree tree, VisitorState state) SymbolToString.implicitToStringFix(ExpressionTree tree, VisitorState state) TreeToString.implicitToStringFix(ExpressionTree tree, VisitorState state) TypeToString.implicitToStringFix(ExpressionTree tree, VisitorState state) protected abstract booleanAbstractAsKeyOfSetOrMap.isBadType(com.sun.tools.javac.code.Type type, VisitorState state) protected booleanArrayAsKeyOfSetOrMap.isBadType(com.sun.tools.javac.code.Type type, VisitorState state) booleanAbstractReturnValueIgnored.isCovered(ExpressionTree tree, VisitorState state) booleanCheckReturnValue.isCovered(ExpressionTree tree, VisitorState state) booleanBugChecker.isSuppressed(Tree tree, VisitorState state) Returns true if the given tree is annotated with a@SuppressWarningsthat disables this bug checker.booleanBugChecker.isSuppressed(com.sun.tools.javac.code.Symbol sym, VisitorState state) Returns true if the given symbol is annotated with a@SuppressWarningsor other annotation that disables this bug checker.protected Optional<com.sun.tools.javac.code.Type> AbstractReturnValueIgnored.lostType(VisitorState state) Check for occurrences of this type being lost, i.e. cast toObject.protected Optional<com.sun.tools.javac.code.Type> FutureReturnValueIgnored.lostType(VisitorState state) final DescriptionStronglyType.match(CompilationUnitTree tree, VisitorState state) BugChecker.AnnotatedTypeTreeMatcher.matchAnnotatedType(AnnotatedTypeTree tree, VisitorState state) BugChecker.AnnotationTreeMatcher.matchAnnotation(AnnotationTree tree, VisitorState state) IncompatibleModifiersChecker.matchAnnotation(AnnotationTree tree, VisitorState state) JUnit4ClassUsedInJUnit3.matchAnnotation(AnnotationTree tree, VisitorState state) MissingSuperCall.matchAnnotation(AnnotationTree tree, VisitorState state) Prevents abstract methods from being annotated with@CallSuperet al.OutlineNone.matchAnnotation(AnnotationTree tree, VisitorState state) Matches on@Templateannotations whose value contains "outline:none" or equivalent outline style.RequiredModifiersChecker.matchAnnotation(AnnotationTree tree, VisitorState state) RestrictedApiChecker.matchAnnotation(AnnotationTree tree, VisitorState state) Validates a@RestrictedApiannotation and that the declared restriction makes sense.final DescriptionSuppressWarningsDeprecated.matchAnnotation(AnnotationTree annotationTree, VisitorState state) UnnecessaryParentheses.matchAnnotation(AnnotationTree tree, VisitorState state) protected abstract booleanAbstractReferenceEquality.matchArgument(ExpressionTree tree, VisitorState state) protected booleanBoxedPrimitiveEquality.matchArgument(ExpressionTree tree, VisitorState state) protected booleanOptionalEquality.matchArgument(ExpressionTree tree, VisitorState state) protected booleanReferenceEquality.matchArgument(ExpressionTree tree, VisitorState state) BugChecker.ArrayAccessTreeMatcher.matchArrayAccess(ArrayAccessTree tree, VisitorState state) EnumOrdinal.matchArrayAccess(ArrayAccessTree tree, VisitorState state) BugChecker.ArrayTypeTreeMatcher.matchArrayType(ArrayTypeTree tree, VisitorState state) AssertFalse.matchAssert(AssertTree tree, VisitorState state) BugChecker.AssertTreeMatcher.matchAssert(AssertTree tree, VisitorState state) AssignmentExpression.matchAssignment(AssignmentTree tree, VisitorState state) BugChecker.AssignmentTreeMatcher.matchAssignment(AssignmentTree tree, VisitorState state) CompileTimeConstantChecker.matchAssignment(AssignmentTree node, VisitorState state) IdentityHashMapUsage.matchAssignment(AssignmentTree tree, VisitorState state) IntLongMath.matchAssignment(AssignmentTree tree, VisitorState state) NoAllocationChecker.matchAssignment(AssignmentTree tree, VisitorState state) NonAtomicVolatileUpdate.matchAssignment(AssignmentTree tree, VisitorState state) SelfAssignment.matchAssignment(AssignmentTree tree, VisitorState state) UnnecessaryAssignment.matchAssignment(AssignmentTree tree, VisitorState state) UnnecessaryBoxedAssignment.matchAssignment(AssignmentTree tree, VisitorState state) final DescriptionAbstractReferenceEquality.matchBinary(BinaryTree tree, VisitorState state) AbstractToString.matchBinary(BinaryTree tree, VisitorState state) BadShiftAmount.matchBinary(BinaryTree tree, VisitorState state) BugChecker.BinaryTreeMatcher.matchBinary(BinaryTree tree, VisitorState state) ComparingThisWithNull.matchBinary(BinaryTree tree, VisitorState state) ComparisonOutOfRange.matchBinary(BinaryTree tree, VisitorState state) ComplexBooleanConstant.matchBinary(BinaryTree tree, VisitorState state) ConstantOverflow.matchBinary(BinaryTree tree, VisitorState state) EqualsNaN.matchBinary(BinaryTree tree, VisitorState state) ErroneousBitwiseExpression.matchBinary(BinaryTree tree, VisitorState state) IdentityBinaryExpression.matchBinary(BinaryTree tree, VisitorState state) NarrowCalculation.matchBinary(BinaryTree tree, VisitorState state) NoAllocationChecker.matchBinary(BinaryTree tree, VisitorState state) OperatorPrecedence.matchBinary(BinaryTree tree, VisitorState state) PreferInstanceofOverGetKind.matchBinary(BinaryTree tree, VisitorState state) ProtoStringFieldReferenceEquality.matchBinary(BinaryTree tree, VisitorState state) RandomModInteger.matchBinary(BinaryTree tree, VisitorState state) ShortCircuitBoolean.matchBinary(BinaryTree tree, VisitorState state) SizeGreaterThanOrEqualsZero.matchBinary(BinaryTree tree, VisitorState state) XorPower.matchBinary(BinaryTree tree, VisitorState state) YodaCondition.matchBinary(BinaryTree tree, VisitorState state) BugChecker.BindingPatternTreeMatcher.matchBindingPattern(BindingPatternTree tree, VisitorState state) BugChecker.BlockTreeMatcher.matchBlock(BlockTree tree, VisitorState state) MultiVariableDeclaration.matchBlock(BlockTree tree, VisitorState state) BugChecker.BreakTreeMatcher.matchBreak(BreakTree tree, VisitorState state) Finally.matchBreak(BreakTree tree, VisitorState state) BugChecker.CaseTreeMatcher.matchCase(CaseTree tree, VisitorState state) TraditionalSwitchExpression.matchCase(CaseTree tree, VisitorState state) UnnecessaryBreakInSwitch.matchCase(CaseTree tree, VisitorState state) BugChecker.CatchTreeMatcher.matchCatch(CatchTree tree, VisitorState state) CatchAndPrintStackTrace.matchCatch(CatchTree tree, VisitorState state) EmptyCatch.matchCatch(CatchTree tree, VisitorState state) UnusedException.matchCatch(CatchTree tree, VisitorState state) AmbiguousMethodReference.matchClass(ClassTree tree, VisitorState state) AnnotationPosition.matchClass(ClassTree tree, VisitorState state) AutoValueBoxedValues.matchClass(ClassTree tree, VisitorState state) AutoValueFinalMethods.matchClass(ClassTree tree, VisitorState state) AutoValueImmutableFields.matchClass(ClassTree tree, VisitorState state) BadAnnotationImplementation.matchClass(ClassTree classTree, VisitorState state) BanClassLoader.matchClass(ClassTree tree, VisitorState state) BugChecker.ClassTreeMatcher.matchClass(ClassTree tree, VisitorState state) BugPatternNaming.matchClass(ClassTree tree, VisitorState state) CheckReturnValue.matchClass(ClassTree tree, VisitorState state) Validate that at most one ofCheckReturnValueandCanIgnoreReturnValueare applied to a class (or interface or enum).ClassCanBeStatic.matchClass(ClassTree tree, VisitorState state) ClassInitializationDeadlock.matchClass(ClassTree tree, VisitorState state) ClassNamedLikeTypeParameter.matchClass(ClassTree tree, VisitorState state) ComparableAndComparator.matchClass(ClassTree tree, VisitorState state) ComparableType.matchClass(ClassTree tree, VisitorState state) ConstantPatternCompile.matchClass(ClassTree classTree, VisitorState state) DepAnn.matchClass(ClassTree classTree, VisitorState state) EffectivelyPrivate.matchClass(ClassTree tree, VisitorState state) EqualsHashCode.matchClass(ClassTree classTree, VisitorState state) ExtendingJUnitAssert.matchClass(ClassTree tree, VisitorState state) ExtendsAutoValue.matchClass(ClassTree tree, VisitorState state) FunctionalInterfaceClash.matchClass(ClassTree tree, VisitorState state) HidingField.matchClass(ClassTree classTree, VisitorState visitorState) IdentifierName.matchClass(ClassTree tree, VisitorState state) ImmutableMemberCollection.matchClass(ClassTree classTree, VisitorState state) ImmutableSetForContains.matchClass(ClassTree tree, VisitorState state) InconsistentCapitalization.matchClass(ClassTree tree, VisitorState state) InconsistentHashCode.matchClass(ClassTree tree, VisitorState state) InputStreamSlowMultibyteRead.matchClass(ClassTree classTree, VisitorState state) InterfaceWithOnlyStatics.matchClass(ClassTree tree, VisitorState state) IterableAndIterator.matchClass(ClassTree tree, VisitorState state) JavaLangClash.matchClass(ClassTree tree, VisitorState state) JdkObsolete.matchClass(ClassTree tree, VisitorState state) JUnit4TestNotRun.matchClass(ClassTree tree, VisitorState state) JUnitAmbiguousTestClass.matchClass(ClassTree classTree, VisitorState state) MissingRefasterAnnotation.matchClass(ClassTree tree, VisitorState state) MultiVariableDeclaration.matchClass(ClassTree tree, VisitorState state) MustBeClosedChecker.matchClass(ClassTree tree, VisitorState state) NamedLikeContextualKeyword.matchClass(ClassTree tree, VisitorState state) ParametersButNotParameterized.matchClass(ClassTree tree, VisitorState state) PrivateConstructorForUtilityClass.matchClass(ClassTree classTree, VisitorState state) ProtectedMembersInFinalClass.matchClass(ClassTree tree, VisitorState state) TestParametersNotInitialized.matchClass(ClassTree tree, VisitorState state) TheoryButNoTheories.matchClass(ClassTree tree, VisitorState state) TypeNameShadowing.matchClass(ClassTree tree, VisitorState state) TypeParameterShadowing.matchClass(ClassTree tree, VisitorState state) UngroupedOverloads.matchClass(ClassTree classTree, VisitorState state) VarTypeName.matchClass(ClassTree tree, VisitorState state) AlreadyChecked.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) AutoValueSubclassLeaked.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) BugChecker.CompilationUnitTreeMatcher.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) ChainingConstructorIgnoresParameter.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) ClassName.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) DeduplicateConstants.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) DeeplyNested.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) DefaultPackage.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) DifferentNameButSame.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) DirectInvocationOnMock.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) DoNotCallChecker.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) EmptyTopLevelDeclaration.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) FieldCanBeFinal.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) FieldCanBeLocal.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) ImpossibleNullComparison.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) InlineTrivialConstant.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) JUnit3TestNotRun.matchCompilationUnit(CompilationUnitTree unused, VisitorState state) JUnit4TestsNotRunWithinEnclosed.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) MemoizeConstantVisitorStateLookups.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) MethodCanBeStatic.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) MixedMutabilityReturnType.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) MockitoDoSetup.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) MockNotUsedInProduction.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) MultipleTopLevelClasses.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) OptionalNotPresent.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) PackageInfo.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) PackageLocation.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) PreferredInterfaceType.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) RemoveUnusedImports.matchCompilationUnit(CompilationUnitTree compilationUnitTree, VisitorState state) RuleNotRun.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) SameNameButDifferent.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) StronglyTypeByteString.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) SuppressWarningsWithoutExplanation.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) UnicodeDirectionalityCharacters.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) UnicodeEscape.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) UnicodeInCode.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) UnnecessarilyFullyQualified.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) UnnecessaryBoxedVariable.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) UnnecessaryCopy.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) UnnecessaryTestMethodPrefix.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) UnusedLabel.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) UnusedMethod.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) UnusedNestedClass.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) UnusedTypeParameter.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) UnusedVariable.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) WildcardImport.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) AbstractToString.matchCompoundAssignment(CompoundAssignmentTree tree, VisitorState state) BugChecker.CompoundAssignmentTreeMatcher.matchCompoundAssignment(CompoundAssignmentTree tree, VisitorState state) NarrowingCompoundAssignment.matchCompoundAssignment(CompoundAssignmentTree tree, VisitorState state) NoAllocationChecker.matchCompoundAssignment(CompoundAssignmentTree tree, VisitorState state) NonAtomicVolatileUpdate.matchCompoundAssignment(CompoundAssignmentTree tree, VisitorState state) BugChecker.ConditionalExpressionTreeMatcher.matchConditionalExpression(ConditionalExpressionTree tree, VisitorState state) ConditionalExpressionNumericPromotion.matchConditionalExpression(ConditionalExpressionTree conditionalExpression, VisitorState state) DuplicateBranches.matchConditionalExpression(ConditionalExpressionTree tree, VisitorState state) NullTernary.matchConditionalExpression(ConditionalExpressionTree conditionalExpression, VisitorState state) OperatorPrecedence.matchConditionalExpression(ConditionalExpressionTree tree, VisitorState state) BugChecker.ContinueTreeMatcher.matchContinue(ContinueTree tree, VisitorState state) Finally.matchContinue(ContinueTree tree, VisitorState state) RedundantControlFlow.matchContinue(ContinueTree tree, VisitorState state) BugChecker.DoWhileLoopTreeMatcher.matchDoWhileLoop(DoWhileLoopTree tree, VisitorState state) LogicalAssignment.matchDoWhileLoop(DoWhileLoopTree tree, VisitorState state) LoopConditionChecker.matchDoWhileLoop(DoWhileLoopTree tree, VisitorState state) MissingBraces.matchDoWhileLoop(DoWhileLoopTree tree, VisitorState state) BugChecker.EmptyStatementTreeMatcher.matchEmptyStatement(EmptyStatementTree tree, VisitorState state) EmptyIfStatement.matchEmptyStatement(EmptyStatementTree tree, VisitorState state) Match empty statement if: - Parent statement is an if - The then part of the parent if is an empty statement, and - The else part of the parent if does not existBugChecker.EnhancedForLoopTreeMatcher.matchEnhancedForLoop(EnhancedForLoopTree tree, VisitorState state) LoopOverCharArray.matchEnhancedForLoop(EnhancedForLoopTree tree, VisitorState state) MissingBraces.matchEnhancedForLoop(EnhancedForLoopTree tree, VisitorState state) NoAllocationChecker.matchEnhancedForLoop(EnhancedForLoopTree tree, VisitorState state) booleanTypesWithUndefinedEquality.matchesType(com.sun.tools.javac.code.Type type, VisitorState state) BugChecker.ExportsTreeMatcher.matchExports(ExportsTree tree, VisitorState state) BugChecker.ExpressionStatementTreeMatcher.matchExpressionStatement(ExpressionStatementTree tree, VisitorState state) ModifiedButNotUsed.matchExpressionStatement(ExpressionStatementTree tree, VisitorState state) BugChecker.ForLoopTreeMatcher.matchForLoop(ForLoopTree tree, VisitorState state) IncrementInForLoopAndHeader.matchForLoop(ForLoopTree forLoopTree, VisitorState visitorState) LogicalAssignment.matchForLoop(ForLoopTree tree, VisitorState state) LoopConditionChecker.matchForLoop(ForLoopTree tree, VisitorState state) MissingBraces.matchForLoop(ForLoopTree tree, VisitorState state) protected <T extends Tree>
DescriptionAbstractBanUnsafeAPIChecker.matchHelper(T tree, VisitorState state, Matcher<T> matcher) BooleanLiteral.matchIdentifier(IdentifierTree tree, VisitorState state) BugChecker.IdentifierTreeMatcher.matchIdentifier(IdentifierTree tree, VisitorState state) SunApi.matchIdentifier(IdentifierTree tree, VisitorState state) VoidUsed.matchIdentifier(IdentifierTree tree, VisitorState state) AbstractUseSwitch.matchIf(IfTree tree, VisitorState state) BugChecker.IfTreeMatcher.matchIf(IfTree tree, VisitorState state) DuplicateBranches.matchIf(IfTree tree, VisitorState state) ImplementAssertionWithChaining.matchIf(IfTree ifTree, VisitorState state) LogicalAssignment.matchIf(IfTree tree, VisitorState state) MissingBraces.matchIf(IfTree tree, VisitorState state) NestedInstanceOfConditions.matchIf(IfTree ifTree, VisitorState visitorState) BadImport.matchImport(ImportTree tree, VisitorState state) BugChecker.ImportTreeMatcher.matchImport(ImportTree tree, VisitorState state) NonCanonicalStaticImport.matchImport(ImportTree tree, VisitorState state) NonCanonicalStaticMemberImport.matchImport(ImportTree tree, VisitorState state) UnnecessaryStaticImport.matchImport(ImportTree tree, VisitorState state) BadInstanceof.matchInstanceOf(InstanceOfTree tree, VisitorState state) BugChecker.InstanceOfTreeMatcher.matchInstanceOf(InstanceOfTree tree, VisitorState state) PatternMatchingInstanceof.matchInstanceOf(InstanceOfTree instanceOfTree, VisitorState state) BugChecker.IntersectionTypeTreeMatcher.matchIntersectionType(IntersectionTypeTree tree, VisitorState state) BugChecker.LabeledStatementTreeMatcher.matchLabeledStatement(LabeledStatementTree tree, VisitorState state) LabelledBreakTarget.matchLabeledStatement(LabeledStatementTree tree, VisitorState state) BugChecker.LambdaExpressionTreeMatcher.matchLambdaExpression(LambdaExpressionTree tree, VisitorState state) CompileTimeConstantChecker.matchLambdaExpression(LambdaExpressionTree node, VisitorState state) StreamToIterable.matchLambdaExpression(LambdaExpressionTree tree, VisitorState state) BugChecker.LiteralTreeMatcher.matchLiteral(LiteralTree tree, VisitorState state) DangerousLiteralNullChecker.matchLiteral(LiteralTree tree, VisitorState state) FloatingPointLiteralPrecision.matchLiteral(LiteralTree tree, VisitorState state) IntLiteralCast.matchLiteral(LiteralTree tree, VisitorState state) LongLiteralLowerCaseSuffix.matchLiteral(LiteralTree literalTree, VisitorState state) MisleadingEscapedSpace.matchLiteral(LiteralTree tree, VisitorState state) OrphanedFormatString.matchLiteral(LiteralTree tree, VisitorState state) StringConcatToTextBlock.matchLiteral(LiteralTree tree, VisitorState state) SwigMemoryLeak.matchLiteral(LiteralTree tree, VisitorState state) AbstractReturnValueIgnored.matchMemberReference(MemberReferenceTree tree, VisitorState state) BugChecker.MemberReferenceTreeMatcher.matchMemberReference(MemberReferenceTree tree, VisitorState state) CompileTimeConstantChecker.matchMemberReference(MemberReferenceTree node, VisitorState state) EqualsIncompatibleType.matchMemberReference(MemberReferenceTree tree, VisitorState state) IsInstanceIncompatibleType.matchMemberReference(MemberReferenceTree tree, VisitorState state) JdkObsolete.matchMemberReference(MemberReferenceTree tree, VisitorState state) ModifySourceCollectionInStream.matchMemberReference(MemberReferenceTree tree, VisitorState state) RestrictedApiChecker.matchMemberReference(MemberReferenceTree tree, VisitorState state) RxReturnValueIgnored.matchMemberReference(MemberReferenceTree tree, VisitorState state) StreamToIterable.matchMemberReference(MemberReferenceTree tree, VisitorState state) UnnecessaryMethodReference.matchMemberReference(MemberReferenceTree tree, VisitorState state) BooleanLiteral.matchMemberSelect(MemberSelectTree tree, VisitorState state) BugChecker.MemberSelectTreeMatcher.matchMemberSelect(MemberSelectTree tree, VisitorState state) NonCanonicalType.matchMemberSelect(MemberSelectTree tree, VisitorState state) NullableOnContainingClass.matchMemberSelect(MemberSelectTree tree, VisitorState state) StaticQualifiedUsingExpression.matchMemberSelect(MemberSelectTree tree, VisitorState state) SunApi.matchMemberSelect(MemberSelectTree tree, VisitorState state) SystemOut.matchMemberSelect(MemberSelectTree tree, VisitorState state) TypeParameterQualifier.matchMemberSelect(MemberSelectTree tree, VisitorState state) VoidUsed.matchMemberSelect(MemberSelectTree tree, VisitorState state) AnnotationPosition.matchMethod(MethodTree tree, VisitorState state) AutoValueBuilderDefaultsInConstructor.matchMethod(MethodTree tree, VisitorState state) AvoidObjectArrays.matchMethod(MethodTree method, VisitorState state) BugChecker.MethodTreeMatcher.matchMethod(MethodTree tree, VisitorState state) CacheLoaderNull.matchMethod(MethodTree tree, VisitorState state) ChainingConstructorIgnoresParameter.matchMethod(MethodTree tree, VisitorState state) CheckedExceptionNotThrown.matchMethod(MethodTree tree, VisitorState state) CheckNotNullMultipleTimes.matchMethod(MethodTree tree, VisitorState state) CheckReturnValue.matchMethod(MethodTree tree, VisitorState state) Validate@CheckReturnValueandCanIgnoreReturnValueusage on methods.ComparisonContractViolated.matchMethod(MethodTree tree, VisitorState state) CompileTimeConstantChecker.matchMethod(MethodTree node, VisitorState state) DepAnn.matchMethod(MethodTree methodTree, VisitorState state) DoNotCallChecker.matchMethod(MethodTree tree, VisitorState state) DoNotCallSuggester.matchMethod(MethodTree tree, VisitorState state) DoNotClaimAnnotations.matchMethod(MethodTree tree, VisitorState state) EffectivelyPrivate.matchMethod(MethodTree tree, VisitorState state) EqualsReference.matchMethod(MethodTree methodTree, VisitorState visitorState) EqualsUnsafeCast.matchMethod(MethodTree tree, VisitorState state) EqualsWrongThing.matchMethod(MethodTree tree, VisitorState state) ExpectedExceptionChecker.matchMethod(MethodTree tree, VisitorState state) Finalize.matchMethod(MethodTree tree, VisitorState state) ForOverrideChecker.matchMethod(MethodTree tree, VisitorState state) FunctionalInterfaceMethodChanged.matchMethod(MethodTree tree, VisitorState state) IdentifierName.matchMethod(MethodTree tree, VisitorState state) IncorrectMainMethod.matchMethod(MethodTree tree, VisitorState state) InfiniteRecursion.matchMethod(MethodTree declaration, VisitorState state) InjectOnBugCheckers.matchMethod(MethodTree tree, VisitorState state) InterruptedExceptionSwallowed.matchMethod(MethodTree tree, VisitorState state) JUnit4ClassAnnotationNonStatic.matchMethod(MethodTree tree, VisitorState state) JUnit4EmptyMethods.matchMethod(MethodTree method, VisitorState state) JUnitParameterMethodNotFound.matchMethod(MethodTree tree, VisitorState state) LambdaFunctionalInterface.matchMethod(MethodTree tree, VisitorState state) Identifies methods with parameters that have a generic argument with Int, Long, or Double.MissingImplementsComparable.matchMethod(MethodTree tree, VisitorState state) MissingOverride.matchMethod(MethodTree tree, VisitorState state) MissingSuperCall.matchMethod(MethodTree tree, VisitorState state) Matches a method that overrides a method that has been annotated with@CallSuperet al., but does not call the super method.MissingTestCall.matchMethod(MethodTree tree, VisitorState state) MixedArrayDimensions.matchMethod(MethodTree tree, VisitorState state) MustBeClosedChecker.matchMethod(MethodTree tree, VisitorState state) Check that theMustBeClosedannotation is only used for constructors of AutoCloseables and methods that return an AutoCloseable.NamedLikeContextualKeyword.matchMethod(MethodTree tree, VisitorState state) NoAllocationChecker.matchMethod(MethodTree tree, VisitorState state) NonApiType.matchMethod(MethodTree tree, VisitorState state) NonFinalCompileTimeConstant.matchMethod(MethodTree tree, VisitorState state) NonOverridingEquals.matchMethod(MethodTree methodTree, VisitorState state) NullableConstructor.matchMethod(MethodTree tree, VisitorState state) NullableOnContainingClass.matchMethod(MethodTree tree, VisitorState state) NullableOptional.matchMethod(MethodTree tree, VisitorState state) NullableVoid.matchMethod(MethodTree tree, VisitorState state) Overrides.matchMethod(MethodTree methodTree, VisitorState state) OverrideThrowableToString.matchMethod(MethodTree methodTree, VisitorState state) OverridingMethodInconsistentArgumentNamesChecker.matchMethod(MethodTree methodTree, VisitorState state) PublicApiNamedStreamShouldReturnStream.matchMethod(MethodTree tree, VisitorState state) RedundantOverride.matchMethod(MethodTree tree, VisitorState state) RedundantThrows.matchMethod(MethodTree tree, VisitorState state) ReturnAtTheEndOfVoidFunction.matchMethod(MethodTree methodTree, VisitorState state) SelfAlwaysReturnsThis.matchMethod(MethodTree methodTree, VisitorState state) StaticAssignmentInConstructor.matchMethod(MethodTree tree, VisitorState state) StaticAssignmentOfThrowable.matchMethod(MethodTree tree, VisitorState state) StreamResourceLeak.matchMethod(MethodTree tree, VisitorState state) TestExceptionChecker.matchMethod(MethodTree tree, VisitorState state) ThrowsUncheckedException.matchMethod(MethodTree tree, VisitorState state) TooManyParameters.matchMethod(MethodTree tree, VisitorState state) ToStringReturnsNull.matchMethod(MethodTree tree, VisitorState state) TypeNameShadowing.matchMethod(MethodTree tree, VisitorState state) TypeParameterShadowing.matchMethod(MethodTree tree, VisitorState state) TypeParameterUnusedInFormals.matchMethod(MethodTree tree, VisitorState state) UnnecessarilyVisible.matchMethod(MethodTree tree, VisitorState state) UnnecessaryLambda.matchMethod(MethodTree tree, VisitorState state) UnnecessaryQualifier.matchMethod(MethodTree tree, VisitorState state) UnsynchronizedOverridesSynchronized.matchMethod(MethodTree methodTree, VisitorState state) UseCorrectAssertInTests.matchMethod(MethodTree methodTree, VisitorState state) AbstractAsKeyOfSetOrMap.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) final DescriptionAbstractMockChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) AbstractPatternSyntaxChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) AbstractReturnValueIgnored.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState state) AbstractToString.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) AddressSelection.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) AlwaysThrows.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ArrayEquals.matchMethodInvocation(MethodInvocationTree t, VisitorState state) Suggests replacing with Arrays.equals(a, b).ArrayFillIncompatibleType.matchMethodInvocation(MethodInvocationTree invocationTree, VisitorState state) ArrayHashCode.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) Wraps identity hashcode computations in calls toArrays.hashCode(long[])if the array is single dimensional orArrays.deepHashCode(Object[])if the array is multidimensional.ArraysAsListPrimitiveArray.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) AssertionFailureIgnored.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) AssertThrowsMultipleStatements.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ASTHelpersSuggestions.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) BanClassLoader.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) BanJNDI.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) BanSerializableRead.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) BigDecimalEquals.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) BooleanParameter.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) BugChecker.MethodInvocationTreeMatcher.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ByteBufferBackingArray.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) CannotMockFinalClass.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) CannotMockMethod.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) CanonicalDuration.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ChainedAssertionLosesContext.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ChainingConstructorIgnoresParameter.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) CharacterGetNumericValue.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ClassNewInstance.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) CollectionToArraySafeParameter.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState visitorState) CollectorShouldNotUseState.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState visitorState) CompareToZero.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) CompileTimeConstantChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ComputeIfAbsentAmbiguousReference.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) DefaultCharset.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) DefaultLocale.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) DistinctVarargsChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) DuplicateMapKeys.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) EnumOrdinal.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) EqualsGetClass.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) EqualsIncompatibleType.matchMethodInvocation(MethodInvocationTree invocationTree, VisitorState state) EqualsNull.matchMethodInvocation(MethodInvocationTree invocationTree, VisitorState state) EqualsUsingHashCode.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ExpensiveLenientFormatString.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ExplicitArrayForVarargs.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FloatingPointAssertionWithinEpsilon.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ForOverrideChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FuturesGetCheckedIllegalExceptionType.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FutureTransformAsync.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FuzzyEqualsShouldNotBeUsedInEqualsMethod.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) GetClassOnAnnotation.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) GetClassOnClass.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) Suggests removing getClass() or changing to Class.class.GetClassOnEnum.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) GuiceNestedCombine.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) HashtableContains.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ICCProfileGetInstance.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) IdentityHashMapBoxing.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) IdentityHashMapUsage.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) IndexOfChar.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) InexactVarargsConditional.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) InsecureCipherMode.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) Interruption.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) IntFloatConversion.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) InvalidTimeZoneID.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) InvalidZoneId.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) IsInstanceIncompatibleType.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) IsInstanceOfClass.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) Suggests removing getClass() or changing to Class.class.JavaUtilDateChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JUnit3FloatingPointComparisonWithoutDelta.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState state) JUnit4ClassUsedInJUnit3.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JUnitAssertSameCheck.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState state) LiteByteStringUtf8.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) LiteEnumValueOf.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState state) LockNotBeforeTry.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) LockOnBoxedPrimitive.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) LongDoubleConversion.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) LongFloatConversion.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) LossyPrimitiveCompare.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) MathAbsoluteNegative.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) MathRoundIntLong.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) MisformattedTestData.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) MisleadingEmptyVarargs.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) MisusedDateFormat.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) MixedDescriptors.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) MockIllegalThrows.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) MockitoUsage.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ModifyCollectionInEnhancedForLoop.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ModifyingCollectionWithItself.matchMethodInvocation(MethodInvocationTree t, VisitorState state) Matches calls to addAll, containsAll, removeAll, and retainAll on itselfModifySourceCollectionInStream.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) MultimapKeys.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) MultipleParallelOrSequentialCalls.matchMethodInvocation(MethodInvocationTree t, VisitorState state) MultipleUnaryOperatorsInMethodCall.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState visitorState) NamedLikeContextualKeyword.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) NCopiesOfChar.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) NewFileSystem.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) NoAllocationChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) NonRuntimeAnnotation.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) NullNeedsCastForVarargs.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) NullOptional.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ObjectEqualsForPrimitives.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ObjectsHashCodePrimitive.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) OptionalMapToOptional.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) OptionalMapUnusedValue.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) OptionalOfRedundantMethod.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) OutlineNone.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) Matches onsetProperty("outline", "none")and equivalent method calls.ParameterComment.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ParameterName.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) PreconditionsCheckNotNullRepeated.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState state) PreconditionsInvalidPlaceholder.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) PreferInstanceofOverGetKind.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) PrimitiveArrayPassedToVarargsMethod.matchMethodInvocation(MethodInvocationTree t, VisitorState state) PrimitiveAtomicReference.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) PrivateSecurityContractProtoAccess.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ProtoBuilderReturnValueIgnored.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ProtocolBufferOrdinal.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState state) ProtoTruthMixedDescriptors.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) RandomCast.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ReachabilityFenceUsage.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) RedundantSetterCall.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) RestrictedApiChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) RobolectricShadowDirectlyOn.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) RxReturnValueIgnored.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) SelfAssertion.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) SelfComparison.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState state) SelfEquals.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) SelfSet.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) SetUnrecognized.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ShouldHaveEvenArgs.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState state) StringCaseLocaleUsage.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) StringCharset.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) StringConcatToTextBlock.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) StringFormatWithLiteral.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) StringJoin.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) StringSplitter.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) SubstringOfZero.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) SuperCallToObjectMethod.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) SystemConsoleNull.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) SystemExitOutsideMain.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) SystemOut.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ThreadBuilderNameWithPlaceholder.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ThreadJoinLoop.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState state) ThreeLetterTimeZoneID.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ThrowIfUncheckedKnownChecked.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ThrowIfUncheckedKnownUnchecked.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) TruthAssertExpected.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) TruthConstantAsserts.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState state) TruthContainsExactlyElementsInUsage.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) TruthGetOrDefault.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) TypeEqualsChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) UndefinedEquals.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) UnnecessaryLongToIntConversion.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) Matches if a long or Long is converted to an int for a long parameter in a method invocation.UnnecessaryMethodInvocationMatcher.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) UnnecessaryOptionalGet.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) UnnecessarySetDefault.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) UnnecessaryTypeArgument.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) UnsafeFinalization.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) UnsafeLocaleUsage.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) UnusedCollectionModifiedInPlace.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) URLEqualsHashCode.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) WaitNotInLoop.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) WithSignatureDiscouraged.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) YodaCondition.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) BugChecker.ModifiersTreeMatcher.matchModifiers(ModifiersTree tree, VisitorState state) BugChecker.ModuleTreeMatcher.matchModule(ModuleTree tree, VisitorState state) BugChecker.NewArrayTreeMatcher.matchNewArray(NewArrayTree tree, VisitorState state) NoAllocationChecker.matchNewArray(NewArrayTree tree, VisitorState state) AbstractAsKeyOfSetOrMap.matchNewClass(NewClassTree tree, VisitorState state) AbstractReturnValueIgnored.matchNewClass(NewClassTree newClassTree, VisitorState state) AddressSelection.matchNewClass(NewClassTree tree, VisitorState state) BanClassLoader.matchNewClass(NewClassTree tree, VisitorState state) BigDecimalLiteralDouble.matchNewClass(NewClassTree tree, VisitorState state) BooleanParameter.matchNewClass(NewClassTree tree, VisitorState state) BoxedPrimitiveConstructor.matchNewClass(NewClassTree tree, VisitorState state) BugChecker.NewClassTreeMatcher.matchNewClass(NewClassTree tree, VisitorState state) CompileTimeConstantChecker.matchNewClass(NewClassTree tree, VisitorState state) DeadException.matchNewClass(NewClassTree newClassTree, VisitorState state) DeadThread.matchNewClass(NewClassTree tree, VisitorState state) DefaultCharset.matchNewClass(NewClassTree tree, VisitorState state) DefaultLocale.matchNewClass(NewClassTree tree, VisitorState state) DoubleBraceInitialization.matchNewClass(NewClassTree tree, VisitorState state) ErroneousThreadPoolConstructorChecker.matchNewClass(NewClassTree tree, VisitorState state) ExplicitArrayForVarargs.matchNewClass(NewClassTree tree, VisitorState state) IdentityHashMapBoxing.matchNewClass(NewClassTree tree, VisitorState state) IdentityHashMapUsage.matchNewClass(NewClassTree tree, VisitorState state) Incomparable.matchNewClass(NewClassTree tree, VisitorState state) JavaUtilDateChecker.matchNewClass(NewClassTree tree, VisitorState state) JdkObsolete.matchNewClass(NewClassTree tree, VisitorState state) MisusedDateFormat.matchNewClass(NewClassTree tree, VisitorState state) NoAllocationChecker.matchNewClass(NewClassTree tree, VisitorState state) NullOptional.matchNewClass(NewClassTree tree, VisitorState state) ParameterComment.matchNewClass(NewClassTree tree, VisitorState state) ParameterName.matchNewClass(NewClassTree tree, VisitorState state) RestrictedApiChecker.matchNewClass(NewClassTree tree, VisitorState state) StringBuilderInitWithChar.matchNewClass(NewClassTree tree, VisitorState state) StringCharset.matchNewClass(NewClassTree tree, VisitorState state) ThreadLocalUsage.matchNewClass(NewClassTree tree, VisitorState state) ThrowSpecificExceptions.matchNewClass(NewClassTree tree, VisitorState state) UnnecessaryStringBuilder.matchNewClass(NewClassTree tree, VisitorState state) UnnecessaryTypeArgument.matchNewClass(NewClassTree tree, VisitorState state) UnsafeLocaleUsage.matchNewClass(NewClassTree tree, VisitorState state) UnusedAnonymousClass.matchNewClass(NewClassTree newClassTree, VisitorState state) URLEqualsHashCode.matchNewClass(NewClassTree tree, VisitorState state) BugChecker.OpensTreeMatcher.matchOpens(OpensTree tree, VisitorState state) BugChecker.PackageTreeMatcher.matchPackage(PackageTree tree, VisitorState state) BugChecker.ParameterizedTypeTreeMatcher.matchParameterizedType(ParameterizedTypeTree tree, VisitorState state) BugChecker.ParenthesizedTreeMatcher.matchParenthesized(ParenthesizedTree tree, VisitorState state) UnnecessaryParentheses.matchParenthesized(ParenthesizedTree tree, VisitorState state) BugChecker.PrimitiveTypeTreeMatcher.matchPrimitiveType(PrimitiveTypeTree tree, VisitorState state) BugChecker.ProvidesTreeMatcher.matchProvides(ProvidesTree tree, VisitorState state) protected abstract DescriptionAbstractPatternSyntaxChecker.matchRegexLiteral(MethodInvocationTree tree, VisitorState state, String pattern, int flags) protected final DescriptionBareDotMetacharacter.matchRegexLiteral(MethodInvocationTree tree, VisitorState state, String regex, int flags) protected final DescriptionInvalidPatternSyntax.matchRegexLiteral(MethodInvocationTree tree, VisitorState state, String pattern, int flags) BugChecker.RequiresTreeMatcher.matchRequires(RequiresTree tree, VisitorState state) AbstractReturnValueIgnored.matchReturn(ReturnTree tree, VisitorState state) Returning a type from a lambda or method that returns Object loses the type information.BugChecker.ReturnTreeMatcher.matchReturn(ReturnTree tree, VisitorState state) Finally.matchReturn(ReturnTree tree, VisitorState state) IntLongMath.matchReturn(ReturnTree tree, VisitorState state) NoAllocationChecker.matchReturn(ReturnTree tree, VisitorState state) UnnecessaryBoxedAssignment.matchReturn(ReturnTree tree, VisitorState state) BugChecker.SwitchTreeMatcher.matchSwitch(SwitchTree tree, VisitorState state) FallThrough.matchSwitch(SwitchTree tree, VisitorState state) MissingCasesInEnumSwitch.matchSwitch(SwitchTree tree, VisitorState state) MissingDefault.matchSwitch(SwitchTree tree, VisitorState state) StatementSwitchToExpressionSwitch.matchSwitch(SwitchTree switchTree, VisitorState state) SwitchDefault.matchSwitch(SwitchTree tree, VisitorState state) UnnecessaryDefaultInEnumSwitch.matchSwitch(SwitchTree switchTree, VisitorState state) WrongOneof.matchSwitch(SwitchTree tree, VisitorState state) BugChecker.SwitchExpressionTreeMatcher.matchSwitchExpression(SwitchExpressionTree tree, VisitorState state) MissingCasesInEnumSwitch.matchSwitchExpression(SwitchExpressionTree tree, VisitorState state) UnnecessaryDefaultInEnumSwitch.matchSwitchExpression(SwitchExpressionTree tree, VisitorState state) WrongOneof.matchSwitchExpression(SwitchExpressionTree tree, VisitorState state) BugChecker.SynchronizedTreeMatcher.matchSynchronized(SynchronizedTree tree, VisitorState state) LockOnBoxedPrimitive.matchSynchronized(SynchronizedTree tree, VisitorState state) LockOnNonEnclosingClassLiteral.matchSynchronized(SynchronizedTree tree, VisitorState state) BugChecker.ThrowTreeMatcher.matchThrow(ThrowTree tree, VisitorState state) Finally.matchThrow(ThrowTree tree, VisitorState state) RethrowReflectiveOperationExceptionAsLinkageError.matchThrow(ThrowTree throwTree, VisitorState state) ThrowNull.matchThrow(ThrowTree tree, VisitorState state) BugChecker.TryTreeMatcher.matchTry(TryTree tree, VisitorState state) CatchFail.matchTry(TryTree tree, VisitorState state) CatchingUnchecked.matchTry(TryTree tree, VisitorState state) ClosingStandardOutputStreams.matchTry(TryTree tree, VisitorState state) InterruptedExceptionSwallowed.matchTry(TryTree tree, VisitorState state) MissingFail.matchTry(TryTree tree, VisitorState state) TryFailRefactoring.matchTry(TryTree tree, VisitorState state) TryFailThrowable.matchTry(TryTree tree, VisitorState state) TryWithResourcesVariable.matchTry(TryTree tree, VisitorState state) BadComparable.matchTypeCast(TypeCastTree tree, VisitorState state) BugChecker.TypeCastTreeMatcher.matchTypeCast(TypeCastTree tree, VisitorState state) FloatCast.matchTypeCast(TypeCastTree tree, VisitorState state) InstanceOfAndCastMatchWrongType.matchTypeCast(TypeCastTree typeCastTree, VisitorState visitorState) NegativeCharLiteral.matchTypeCast(TypeCastTree tree, VisitorState state) NoAllocationChecker.matchTypeCast(TypeCastTree tree, VisitorState state) UnsafeReflectiveConstructionCast.matchTypeCast(TypeCastTree typeCastTree, VisitorState state) BugChecker.TypeParameterTreeMatcher.matchTypeParameter(TypeParameterTree tree, VisitorState state) JavaLangClash.matchTypeParameter(TypeParameterTree tree, VisitorState state) TypeParameterNaming.matchTypeParameter(TypeParameterTree tree, VisitorState state) VarTypeName.matchTypeParameter(TypeParameterTree tree, VisitorState state) AttemptedNegativeZero.matchUnary(UnaryTree tree, VisitorState state) BugChecker.UnaryTreeMatcher.matchUnary(UnaryTree tree, VisitorState state) DiscardedPostfixExpression.matchUnary(UnaryTree tree, VisitorState state) NoAllocationChecker.matchUnary(UnaryTree tree, VisitorState state) NonAtomicVolatileUpdate.matchUnary(UnaryTree tree, VisitorState state) BugChecker.UnionTypeTreeMatcher.matchUnionType(UnionTypeTree tree, VisitorState state) BugChecker.UsesTreeMatcher.matchUses(UsesTree tree, VisitorState state) final DescriptionAbstractMockChecker.matchVariable(VariableTree tree, VisitorState state) AnnotationPosition.matchVariable(VariableTree tree, VisitorState state) ArrayRecordComponent.matchVariable(VariableTree tree, VisitorState state) BugChecker.VariableTreeMatcher.matchVariable(VariableTree tree, VisitorState state) CannotMockFinalClass.matchVariable(VariableTree tree, VisitorState state) CompileTimeConstantChecker.matchVariable(VariableTree node, VisitorState state) ConstantField.matchVariable(VariableTree tree, VisitorState state) DateFormatConstant.matchVariable(VariableTree tree, VisitorState state) DepAnn.matchVariable(VariableTree variableTree, VisitorState state) DeprecatedVariable.matchVariable(VariableTree tree, VisitorState state) EffectivelyPrivate.matchVariable(VariableTree tree, VisitorState state) FieldCanBeStatic.matchVariable(VariableTree tree, VisitorState state) ForEachIterable.matchVariable(VariableTree tree, VisitorState state) IdentifierName.matchVariable(VariableTree tree, VisitorState state) IdentityHashMapUsage.matchVariable(VariableTree tree, VisitorState state) InitializeInline.matchVariable(VariableTree tree, VisitorState state) IntLongMath.matchVariable(VariableTree tree, VisitorState state) IterablePathParameter.matchVariable(VariableTree tree, VisitorState state) MixedArrayDimensions.matchVariable(VariableTree tree, VisitorState state) ModifiedButNotUsed.matchVariable(VariableTree tree, VisitorState state) MutableGuiceModule.matchVariable(VariableTree tree, VisitorState state) MutablePublicArray.matchVariable(VariableTree tree, VisitorState state) NegativeBoolean.matchVariable(VariableTree node, VisitorState state) NoAllocationChecker.matchVariable(VariableTree tree, VisitorState state) NonFinalStaticField.matchVariable(VariableTree tree, VisitorState state) NullableOnContainingClass.matchVariable(VariableTree tree, VisitorState state) NullableOptional.matchVariable(VariableTree tree, VisitorState state) SelfAssignment.matchVariable(VariableTree tree, VisitorState state) StaticAssignmentOfThrowable.matchVariable(VariableTree variableTree, VisitorState state) StaticMockMember.matchVariable(VariableTree varTree, VisitorState state) TransientMisuse.matchVariable(VariableTree tree, VisitorState state) UnnecessaryAnonymousClass.matchVariable(VariableTree tree, VisitorState state) UnnecessaryAssignment.matchVariable(VariableTree tree, VisitorState state) UnnecessaryAsync.matchVariable(VariableTree tree, VisitorState state) UnnecessaryBoxedAssignment.matchVariable(VariableTree tree, VisitorState state) UnnecessaryFinal.matchVariable(VariableTree tree, VisitorState state) UnnecessaryLambda.matchVariable(VariableTree tree, VisitorState state) UnnecessaryQualifier.matchVariable(VariableTree tree, VisitorState state) VarChecker.matchVariable(VariableTree tree, VisitorState state) VariableNameSameAsType.matchVariable(VariableTree varTree, VisitorState state) Varifier.matchVariable(VariableTree tree, VisitorState state) BugChecker.WhileLoopTreeMatcher.matchWhileLoop(WhileLoopTree tree, VisitorState state) LogicalAssignment.matchWhileLoop(WhileLoopTree tree, VisitorState state) LoopConditionChecker.matchWhileLoop(WhileLoopTree tree, VisitorState state) MissingBraces.matchWhileLoop(WhileLoopTree tree, VisitorState state) BugChecker.WildcardTreeMatcher.matchWildcard(WildcardTree tree, VisitorState state) BugChecker.YieldTreeMatcher.matchYield(YieldTree tree, VisitorState state) static StringSameNameButDifferent.qualifyType(VisitorState state, SuggestedFix.Builder fix, com.sun.tools.javac.code.Symbol sym) Try to qualify the type, or return the full name.static booleanCanBeStaticAnalyzer.referencesOuter(Tree tree, com.sun.tools.javac.code.Symbol owner, VisitorState state) Returns true if the tree references its enclosing class.protected DescriptionAbstractMustBeClosedChecker.scanEntireMethodFor(Matcher<? super ExpressionTree> matcher, MethodTree tree, VisitorState state) Scans a method body for invocations matchingmatcher, emitting them as a single fix.booleanBugChecker.suppressedByAnyOf(Set<com.sun.tools.javac.util.Name> annotations, VisitorState s) com.google.common.collect.ImmutableRangeSet<Integer> BugChecker.suppressedRegions(VisitorState state) Computes a RangeSet of code regions which are suppressed by this bug checker.AbstractToString.toStringFix(Tree parent, ExpressionTree expression, VisitorState state) Constructs a fix for an explicit toString call, e.g. fromObject.toString()orString.valueOf().AnnotationMirrorToString.toStringFix(Tree parent, ExpressionTree tree, VisitorState state) AnnotationValueToString.toStringFix(Tree parent, ExpressionTree tree, VisitorState state) ArrayToString.toStringFix(Tree parent, ExpressionTree tree, VisitorState state) LiteProtoToString.toStringFix(Tree parent, ExpressionTree tree, VisitorState state) ObjectToString.toStringFix(Tree parent, ExpressionTree tree, VisitorState state) StreamToString.toStringFix(Tree parent, ExpressionTree tree, VisitorState state) SymbolToString.toStringFix(Tree parent, ExpressionTree tree, VisitorState state) TreeToString.toStringFix(Tree parent, ExpressionTree tree, VisitorState state) TypeToString.toStringFix(Tree parent, ExpressionTree tree, VisitorState state) static @Nullable StaticImports.StaticImportInfoStaticImports.tryCreate(ImportTree tree, VisitorState state) Returns aStaticImports.StaticImportInfoif the given import is a static single-type import.static @Nullable StaticImports.StaticImportInfoStaticImports.tryCreate(MemberSelectTree access, VisitorState state) AssertThrowsUtils.tryFailToAssertThrows(TryTree tryTree, List<? extends StatementTree> throwingStatements, Optional<Tree> failureMessage, VisitorState state) Transforms a try-catch block in the try-fail pattern into a call to JUnit'sassertThrows, inserting the behavior of thetryblock into a lambda parameter, and assigning the expected exception to a variable, if it is used within thecatchblock.Constructors in com.google.errorprone.bugpatterns with parameters of type VisitorState -
Uses of VisitorState in com.google.errorprone.bugpatterns.android
Methods in com.google.errorprone.bugpatterns.android with parameters of type VisitorStateModifier and TypeMethodDescriptionprotected DescriptionRectIntersectReturnValueIgnored.describeReturnValueIgnored(MethodInvocationTree methodInvocationTree, VisitorState state) FragmentInjection.matchClass(ClassTree tree, VisitorState state) FragmentNotInstantiable.matchClass(ClassTree classTree, VisitorState state) ParcelableCreator.matchClass(ClassTree tree, VisitorState state) HardCodedSdCardPath.matchLiteral(LiteralTree tree, VisitorState state) MislabeledAndroidString.matchMemberSelect(MemberSelectTree tree, VisitorState state) StaticOrDefaultInterfaceMethod.matchMethod(MethodTree tree, VisitorState state) BinderIdentityRestoredDangerously.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) IsLoggableTagLength.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) WakelockReleasedDangerously.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) BundleDeserializationCast.matchTypeCast(TypeCastTree tree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.apidiff
Methods in com.google.errorprone.bugpatterns.apidiff with parameters of type VisitorStateModifier and TypeMethodDescriptionprotected DescriptionApiDiffChecker.check(ExpressionTree tree, VisitorState state) ApiDiffChecker.matchIdentifier(IdentifierTree tree, VisitorState state) ApiDiffChecker.matchMemberSelect(MemberSelectTree tree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.argumentselectiondefects
Methods in com.google.errorprone.bugpatterns.argumentselectiondefects with parameters of type VisitorStateModifier and TypeMethodDescriptionArgumentSelectionDefectChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) AssertEqualsArgumentOrderChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ArgumentSelectionDefectChecker.matchNewClass(NewClassTree tree, VisitorState state) AutoValueConstructorOrderChecker.matchNewClass(NewClassTree tree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.checkreturnvalue
Subclasses with type arguments of type VisitorState in com.google.errorprone.bugpatterns.checkreturnvalueModifier and TypeClassDescriptionfinal classA rule that enables checking for methods belonging to a set of packages or any of their subpackages.Methods in com.google.errorprone.bugpatterns.checkreturnvalue that return types with arguments of type VisitorStateModifier and TypeMethodDescriptionstatic ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> AutoValueRules.autoBuilders()Returns a rule forabstractmethods on@AutoBuildertypes.static ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> AutoValueRules.autoValueBuilders()Returns a rule forabstractmethods on@AutoValue.Buildertypes.static ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> AutoValueRules.autoValues()Returns a rule forabstractmethods on@AutoValuetypes.static ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> DaggerRules.componentBuilders()Returns a rule that handles@dagger.Component.Buildertypes, making their fluent setter methods' results ignorable.static ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> ExternalCanIgnoreReturnValue.externalIgnoreList()Returns a rule using an external list of APIs to ignore.static ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> Rules.globalDefault(Optional<ResultUsePolicy> methodDefault, Optional<ResultUsePolicy> constructorDefault) Returns a simple global rule that always returns the given defaults for methods and constructors.static ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> Rules.mapAnnotationSimpleName(String simpleName, ResultUsePolicy policy) static ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> Rules.mapInheritedAnnotationSimpleName(String simpleName, ResultUsePolicy policy) Returns aResultUseRulethat maps annotations on the current symbol, or on super methods if the symbol is a method symbol, with the givensimpleNameto the givenpolicy.static ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> ProtoRules.mutableProtos()Returns a rule that handles mutable protos, making their fluent setter methods' results ignorable.static ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> DaggerRules.productionComponentBuilders()Returns a rule that handles@dagger.producers.ProductionComponent.Buildertypes, making their fluent setter methods' results ignorable.static ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> DaggerRules.productionSubcomponentBuilders()Returns a rule that handles@dagger.producers.ProductionSubcomponent.Buildertypes, making their fluent setter methods' results ignorable.static ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> ProtoRules.protoBuilders()Returns a rule that handles proto builders, making their fluent setter methods' results ignorable.static ResultUseRule<VisitorState, com.sun.tools.javac.code.Symbol> DaggerRules.subcomponentBuilders()Returns a rule that handles@dagger.Subcomponent.Buildertypes, making their fluent setter methods' results ignorable.Methods in com.google.errorprone.bugpatterns.checkreturnvalue with parameters of type VisitorStateModifier and TypeMethodDescriptionPackagesRule.evaluate(com.sun.tools.javac.code.Symbol symbol, VisitorState state) ExternalCanIgnoreReturnValue.evaluateMethod(com.sun.tools.javac.code.Symbol.MethodSymbol method, VisitorState state) UnnecessarilyUsedValue.matchAssignment(AssignmentTree assignmentTree, VisitorState state) NoCanIgnoreReturnValueOnClasses.matchClass(ClassTree tree, VisitorState state) UsingJsr305CheckReturnValue.matchImport(ImportTree tree, VisitorState state) BuilderReturnThis.matchMethod(MethodTree tree, VisitorState state) CanIgnoreReturnValueSuggester.matchMethod(MethodTree methodTree, VisitorState state) UnnecessarilyUsedValue.matchVariable(VariableTree variableTree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.collectionincompatibletype
Methods in com.google.errorprone.bugpatterns.collectionincompatibletype with parameters of type VisitorStateModifier and TypeMethodDescriptionstatic @Nullable AbstractCollectionIncompatibleTypeMatcher.MatchResultContainmentMatchers.firstNonNullMatchResult(ExpressionTree tree, VisitorState state) CollectionIncompatibleType.match(ExpressionTree tree, VisitorState state) CollectionUndefinedEquality.match(ExpressionTree tree, VisitorState state) CompatibleWithMisuse.matchAnnotation(AnnotationTree annoTree, VisitorState state) final @Nullable AbstractCollectionIncompatibleTypeMatcher.MatchResultAbstractCollectionIncompatibleTypeMatcher.matches(ExpressionTree tree, VisitorState state) CollectionIncompatibleType.matchMemberReference(MemberReferenceTree tree, VisitorState state) CollectionUndefinedEquality.matchMemberReference(MemberReferenceTree tree, VisitorState state) CollectionIncompatibleType.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) CollectionUndefinedEquality.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) IncompatibleArgumentType.matchMethodInvocation(MethodInvocationTree methodInvocationTree, VisitorState state) JUnitIncompatibleType.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) TruthIncompatibleType.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.flogger
Methods in com.google.errorprone.bugpatterns.flogger with parameters of type VisitorStateModifier and TypeMethodDescriptionFloggerLogWithCause.matchCatch(CatchTree tree, VisitorState state) FloggerRequiredModifiers.matchIdentifier(IdentifierTree tree, VisitorState state) FloggerRedundantIsEnabled.matchIf(IfTree ifTree, VisitorState state) FloggerRequiredModifiers.matchMemberSelect(MemberSelectTree tree, VisitorState state) FloggerSplitLogStatement.matchMethod(MethodTree tree, VisitorState state) FloggerArgumentToString.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FloggerFormatString.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FloggerLogString.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FloggerLogVarargs.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FloggerMessageFormat.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FloggerPerWithoutRateLimit.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FloggerRequiredModifiers.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FloggerStringConcatenation.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FloggerWithCause.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FloggerWithoutCause.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FloggerRequiredModifiers.matchVariable(VariableTree tree, VisitorState state) FloggerSplitLogStatement.matchVariable(VariableTree tree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.formatstring
Methods in com.google.errorprone.bugpatterns.formatstring with parameters of type VisitorStateModifier and TypeMethodDescriptionstatic com.google.common.collect.ImmutableList<ExpressionTree> FormatStringUtils.formatMethodArguments(MethodInvocationTree tree, VisitorState state) static intLenientFormatStringUtils.getLenientFormatStringPosition(ExpressionTree tree, VisitorState state) Returns the index of the lenient format string parameter intree, or-1if there is none.InlineFormatString.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) FormatStringAnnotationChecker.matchMethod(MethodTree tree, VisitorState state) AnnotateFormatMethod.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FormatString.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FormatStringAnnotationChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) LenientFormatStringValidation.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FormatStringAnnotationChecker.matchNewClass(NewClassTree tree, VisitorState state) LenientFormatStringValidation.matchNewClass(NewClassTree tree, VisitorState state) static @Nullable FormatStringValidation.ValidationResultFormatStringValidation.validate(@Nullable com.sun.tools.javac.code.Symbol.MethodSymbol formatMethodSymbol, Collection<? extends ExpressionTree> arguments, VisitorState state) static @Nullable FormatStringValidation.ValidationResultStrictFormatStringValidation.validate(ExpressionTree formatStringTree, List<? extends ExpressionTree> args, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.inject
Methods in com.google.errorprone.bugpatterns.inject with parameters of type VisitorStateModifier and TypeMethodDescriptionAssistedInjectAndInjectOnSameConstructor.matchAnnotation(AnnotationTree annotationTree, VisitorState state) final DescriptionAutoFactoryAtInject.matchAnnotation(AnnotationTree annotationTree, VisitorState state) JavaxInjectOnFinalField.matchAnnotation(AnnotationTree annotationTree, VisitorState state) MoreThanOneInjectableConstructor.matchAnnotation(AnnotationTree tree, VisitorState state) MoreThanOneQualifier.matchAnnotation(AnnotationTree annotationTree, VisitorState state) final DescriptionScopeAnnotationOnInterfaceOrAbstractClass.matchAnnotation(AnnotationTree annotationTree, VisitorState state) final DescriptionAssistedInjectAndInjectOnConstructors.matchClass(ClassTree classTree, VisitorState state) final DescriptionInjectOnMemberAndConstructor.matchClass(ClassTree classTree, VisitorState state) final DescriptionInvalidTargetingOnScopingAnnotation.matchClass(ClassTree classTree, VisitorState state) final DescriptionMissingRuntimeRetention.matchClass(ClassTree classTree, VisitorState state) final DescriptionMoreThanOneScopeAnnotationOnClass.matchClass(ClassTree classTree, VisitorState state) final DescriptionOverlappingQualifierAndScopeAnnotation.matchClass(ClassTree classTree, VisitorState state) QualifierWithTypeUse.matchClass(ClassTree tree, VisitorState state) CloseableProvides.matchMethod(MethodTree tree, VisitorState state) InjectedConstructorAnnotations.matchMethod(MethodTree methodTree, VisitorState state) Matches injected constructors annotated with @Inject(optional=true) or binding annotations.InjectOnConstructorOfAbstractClass.matchMethod(MethodTree methodTree, VisitorState state) JavaxInjectOnAbstractMethod.matchMethod(MethodTree methodTree, VisitorState state) MisplacedScopeAnnotations.matchMethod(MethodTree tree, VisitorState state) QualifierOrScopeOnInjectMethod.matchMethod(MethodTree tree, VisitorState state) MisplacedScopeAnnotations.matchVariable(VariableTree tree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.inject.dagger
Methods in com.google.errorprone.bugpatterns.inject.dagger with parameters of type VisitorStateModifier and TypeMethodDescriptionPrivateConstructorForNoninstantiableModule.matchClass(ClassTree classTree, VisitorState state) ScopeOnModule.matchClass(ClassTree classTree, VisitorState state) AndroidInjectionBeforeSuper.matchMethod(MethodTree tree, VisitorState state) EmptySetMultibindingContributions.matchMethod(MethodTree method, VisitorState state) UseBinds.matchMethod(MethodTree method, VisitorState state) RefersToDaggerCodegen.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ProvidesNull.matchReturn(ReturnTree returnTree, VisitorState state) Matches explicit "return null" statements in methods annotated with@Providesbut not@Nullable. -
Uses of VisitorState in com.google.errorprone.bugpatterns.inject.guice
Methods in com.google.errorprone.bugpatterns.inject.guice with parameters of type VisitorStateModifier and TypeMethodDescriptionProvidesMethodOutsideOfModule.matchAnnotation(AnnotationTree annotation, VisitorState state) final DescriptionAssistedInjectScoping.matchClass(ClassTree classTree, VisitorState state) final DescriptionAssistedParameters.matchMethod(MethodTree constructor, VisitorState state) BindingToUnqualifiedCommonType.matchMethod(MethodTree method, VisitorState state) OverridesGuiceInjectableMethod.matchMethod(MethodTree methodTree, VisitorState state) OverridesJavaxInjectableMethod.matchMethod(MethodTree methodTree, VisitorState state) BindingToUnqualifiedCommonType.matchMethodInvocation(MethodInvocationTree methodInvocation, VisitorState state) InjectOnFinalField.matchVariable(VariableTree tree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.inlineme
Methods in com.google.errorprone.bugpatterns.inlineme with parameters of type VisitorStateModifier and TypeMethodDescriptionInliner.matchMemberReference(MemberReferenceTree tree, VisitorState state) Suggester.matchMethod(MethodTree tree, VisitorState state) Validator.matchMethod(MethodTree tree, VisitorState state) Inliner.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) Inliner.matchNewClass(NewClassTree tree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.javadoc
Methods in com.google.errorprone.bugpatterns.javadoc with parameters of type VisitorStateModifier and TypeMethodDescriptionEmptyBlockTag.matchClass(ClassTree classTree, VisitorState state) EscapedEntity.matchClass(ClassTree classTree, VisitorState state) InheritDoc.matchClass(ClassTree classTree, VisitorState state) InvalidBlockTag.matchClass(ClassTree classTree, VisitorState state) InvalidInlineTag.matchClass(ClassTree classTree, VisitorState state) InvalidLink.matchClass(ClassTree classTree, VisitorState state) InvalidParam.matchClass(ClassTree classTree, VisitorState state) InvalidSnippet.matchClass(ClassTree classTree, VisitorState state) MalformedInlineTag.matchClass(ClassTree classTree, VisitorState state) MissingSummary.matchClass(ClassTree classTree, VisitorState state) UnescapedEntity.matchClass(ClassTree classTree, VisitorState state) UnrecognisedJavadocTag.matchClass(ClassTree classTree, VisitorState state) UrlInSee.matchClass(ClassTree classTree, VisitorState state) AlmostJavadoc.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) NotJavadoc.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) EmptyBlockTag.matchMethod(MethodTree methodTree, VisitorState state) EscapedEntity.matchMethod(MethodTree methodTree, VisitorState state) InheritDoc.matchMethod(MethodTree methodTree, VisitorState state) InvalidBlockTag.matchMethod(MethodTree methodTree, VisitorState state) InvalidInlineTag.matchMethod(MethodTree methodTree, VisitorState state) InvalidLink.matchMethod(MethodTree methodTree, VisitorState state) InvalidParam.matchMethod(MethodTree methodTree, VisitorState state) InvalidSnippet.matchMethod(MethodTree methodTree, VisitorState state) InvalidThrows.matchMethod(MethodTree methodTree, VisitorState state) InvalidThrowsLink.matchMethod(MethodTree methodTree, VisitorState state) MalformedInlineTag.matchMethod(MethodTree methodTree, VisitorState state) MissingSummary.matchMethod(MethodTree methodTree, VisitorState state) ReturnFromVoid.matchMethod(MethodTree methodTree, VisitorState state) UnescapedEntity.matchMethod(MethodTree methodTree, VisitorState state) UnrecognisedJavadocTag.matchMethod(MethodTree methodTree, VisitorState state) UrlInSee.matchMethod(MethodTree methodTree, VisitorState state) EmptyBlockTag.matchVariable(VariableTree variableTree, VisitorState state) EscapedEntity.matchVariable(VariableTree variableTree, VisitorState state) InheritDoc.matchVariable(VariableTree variableTree, VisitorState state) InvalidBlockTag.matchVariable(VariableTree variableTree, VisitorState state) InvalidInlineTag.matchVariable(VariableTree variableTree, VisitorState state) InvalidLink.matchVariable(VariableTree variableTree, VisitorState state) InvalidSnippet.matchVariable(VariableTree variableTree, VisitorState state) MalformedInlineTag.matchVariable(VariableTree variableTree, VisitorState state) MissingSummary.matchVariable(VariableTree variableTree, VisitorState state) UnescapedEntity.matchVariable(VariableTree variableTree, VisitorState state) UnrecognisedJavadocTag.matchVariable(VariableTree variableTree, VisitorState state) UrlInSee.matchVariable(VariableTree variableTree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.nullness
Methods in com.google.errorprone.bugpatterns.nullness with parameters of type VisitorStateModifier and TypeMethodDescriptionMultipleNullnessAnnotations.matchAnnotatedType(AnnotatedTypeTree tree, VisitorState state) NullablePrimitive.matchAnnotatedType(AnnotatedTypeTree tree, VisitorState state) NullableWildcard.matchAnnotatedType(AnnotatedTypeTree tree, VisitorState state) FieldMissingNullable.matchAssignment(AssignmentTree tree, VisitorState state) UnsafeWildcard.matchAssignment(AssignmentTree tree, VisitorState state) FieldMissingNullable.matchBinary(BinaryTree tree, VisitorState state) ParameterMissingNullable.matchBinary(BinaryTree tree, VisitorState state) RedundantNullCheck.matchBinary(BinaryTree tree, VisitorState state) UnsafeWildcard.matchClass(ClassTree tree, VisitorState state) AddNullMarkedToPackageInfo.matchCompilationUnit(CompilationUnitTree unit, VisitorState state) ReturnMissingNullable.matchCompilationUnit(CompilationUnitTree tree, VisitorState stateForCompilationUnit) UnsafeWildcard.matchConditionalExpression(ConditionalExpressionTree tree, VisitorState state) UnsafeWildcard.matchLambdaExpression(LambdaExpressionTree tree, VisitorState state) DereferenceWithNullBranch.matchMemberSelect(MemberSelectTree select, VisitorState state) EqualsBrokenForNull.matchMethod(MethodTree tree, VisitorState state) EqualsMissingNullable.matchMethod(MethodTree methodTree, VisitorState state) MultipleNullnessAnnotations.matchMethod(MethodTree tree, VisitorState state) NullablePrimitive.matchMethod(MethodTree tree, VisitorState state) NullablePrimitiveArray.matchMethod(MethodTree tree, VisitorState state) VoidMissingNullable.matchMethod(MethodTree tree, VisitorState state) NullArgumentForNonNullParameter.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ParameterMissingNullable.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) RedundantNullCheck.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) UnnecessaryCheckNotNull.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) UnsafeWildcard.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) NullArgumentForNonNullParameter.matchNewClass(NewClassTree tree, VisitorState state) ParameterMissingNullable.matchNewClass(NewClassTree tree, VisitorState state) UnsafeWildcard.matchNewClass(NewClassTree tree, VisitorState state) VoidMissingNullable.matchParameterizedType(ParameterizedTypeTree parameterizedTypeTree, VisitorState state) UnsafeWildcard.matchParenthesized(ParenthesizedTree tree, VisitorState state) UnsafeWildcard.matchReturn(ReturnTree tree, VisitorState state) UnsafeWildcard.matchTypeCast(TypeCastTree tree, VisitorState state) ExtendsObject.matchTypeParameter(TypeParameterTree tree, VisitorState state) NullableTypeParameter.matchTypeParameter(TypeParameterTree tree, VisitorState state) FieldMissingNullable.matchVariable(VariableTree tree, VisitorState state) MultipleNullnessAnnotations.matchVariable(VariableTree tree, VisitorState state) NullablePrimitive.matchVariable(VariableTree tree, VisitorState state) NullablePrimitiveArray.matchVariable(VariableTree tree, VisitorState state) UnsafeWildcard.matchVariable(VariableTree tree, VisitorState state) VoidMissingNullable.matchVariable(VariableTree tree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.overloading
Methods in com.google.errorprone.bugpatterns.overloading with parameters of type VisitorStateModifier and TypeMethodDescriptionInconsistentOverloads.matchClass(ClassTree classTree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.bugpatterns.threadsafety
Methods in com.google.errorprone.bugpatterns.threadsafety that return VisitorStateMethods in com.google.errorprone.bugpatterns.threadsafety with parameters of type VisitorStateModifier and TypeMethodDescriptionstatic voidHeldLockAnalyzer.analyze(VisitorState state, HeldLockAnalyzer.LockEventListener listener, Predicate<Tree> isSuppressed) Analyzes a method body, tracking the set of held locks and checking accesses to guarded members.static Optional<GuardedByExpression> GuardedByBinder.bindExpression(com.sun.tools.javac.tree.JCTree.JCExpression exp, VisitorState visitorState) Creates aGuardedByExpressionfrom a bound AST node, or returnsOptional.empty()if the AST node doesn't correspond to a 'simple' lock expression.static @Nullable com.sun.tools.javac.code.SymbolGuardedByUtils.bindGuardedByString(Tree tree, String guard, VisitorState visitorState) final ThreadSafetyThreadSafety.Builder.build(VisitorState state) protected DescriptionGuardedByChecker.checkGuardedAccess(Tree tree, GuardedByExpression guard, com.google.errorprone.bugpatterns.threadsafety.HeldLockSet locks, VisitorState state) ConstantExpressions.constantExpression(ExpressionTree tree, VisitorState state) ImmutableAnalysis.Factory.create(BiPredicate<com.sun.tools.javac.code.Symbol, VisitorState> suppressionChecker, VisitorState state, com.google.common.collect.ImmutableSet<String> immutableAnnotations) ThreadSafeAnalysis.Factory.create(BugChecker bugChecker, VisitorState state) static GuardedBySymbolResolverGuardedBySymbolResolver.from(Tree tree, VisitorState visitorState) static GuardedBySymbolResolverGuardedBySymbolResolver.from(com.sun.tools.javac.code.Symbol.ClassSymbol owner, com.google.errorprone.bugpatterns.threadsafety.GuardedBySymbolResolver.MethodInfo method, CompilationUnitTree compilationUnit, com.sun.tools.javac.util.Context context, Tree leaf, VisitorState visitorState) static Optional<GuardedByExpression> HeldLockAnalyzer.ExpectedLockCalculator.from(com.sun.tools.javac.tree.JCTree.JCExpression guardedMemberExpression, GuardedByExpression guard, VisitorState state) Determine the lock expression that needs to be held when accessing a specific guarded member.ThreadSafety.getInheritedAnnotation(com.sun.tools.javac.code.Symbol sym, VisitorState state) Gets the possibly inherited marker annotation on the given symbol, and reverse-propagates containerOf spec's from super-classes.ThreadSafety.getMarkerOrAcceptedAnnotation(com.sun.tools.javac.code.Symbol sym, VisitorState state) Gets theSymbol's annotation info, either from a marker annotation on the symbol, from an accepted annotation on the symbol, or from the list of well-known types.static booleanWellKnownMutability.isAnnotation(VisitorState state, com.sun.tools.javac.code.Type type) Returns true if the type is an annotation.static com.google.errorprone.bugpatterns.threadsafety.GuardedByUtils.GuardedByValidationResultGuardedByUtils.isGuardedByValid(Tree tree, VisitorState state) static booleanWellKnownMutability.isProto2MessageClass(VisitorState state, com.sun.tools.javac.code.Type type) Compile-time equivalent ofcom.google.io.protocol.ProtocolSupport#isProto2MessageClass.static booleanWellKnownMutability.isProto2MutableMessageClass(VisitorState state, com.sun.tools.javac.code.Type type) Compile-time equivalent ofcom.google.io.protocol.ProtocolSupport#isProto2MutableMessageClass.static booleanWellKnownMutability.isProtoEnum(VisitorState state, com.sun.tools.javac.code.Type type) booleanConstantExpressions.isSame(ExpressionTree aTree, ExpressionTree bTree, VisitorState state) Returns whetheraTreeandbTreeseem to correspond to the same expression.ImmutableAnnotationChecker.matchClass(ClassTree tree, VisitorState state) ImmutableChecker.matchClass(ClassTree tree, VisitorState state) ImmutableEnumChecker.matchClass(ClassTree tree, VisitorState state) ThreadSafeChecker.matchClass(ClassTree tree, VisitorState state) ImmutableRefactoring.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) DoubleCheckedLocking.matchIf(IfTree outerIf, VisitorState state) GuardedByChecker.matchLambdaExpression(LambdaExpressionTree tree, VisitorState state) ImmutableChecker.matchLambdaExpression(LambdaExpressionTree tree, VisitorState state) GuardedByChecker.matchMemberReference(MemberReferenceTree tree, VisitorState state) ImmutableChecker.matchMemberReference(MemberReferenceTree tree, VisitorState state) ThreadSafeChecker.matchMemberReference(MemberReferenceTree tree, VisitorState state) GuardedByChecker.matchMethod(MethodTree tree, VisitorState state) ImmutableChecker.matchMethod(MethodTree tree, VisitorState state) ImmutableChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ThreadPriorityCheck.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ThreadSafeChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ImmutableChecker.matchNewClass(NewClassTree tree, VisitorState state) ThreadSafeChecker.matchNewClass(NewClassTree tree, VisitorState state) StaticGuardedByInstance.matchSynchronized(SynchronizedTree tree, VisitorState state) SynchronizeOnNonFinalField.matchSynchronized(SynchronizedTree tree, VisitorState state) ThreadSafeChecker.matchTypeParameter(TypeParameterTree tree, VisitorState state) GuardedByChecker.matchVariable(VariableTree tree, VisitorState state) ConstantExpressions.symbolizeImmutableExpression(ExpressionTree tree, VisitorState state) Returns a list of the methods called to get to this expression, as well as a terminating variable if needed.ConstantExpressions.truthiness(ExpressionTree tree, boolean not, VisitorState state) Scans anExpressionTreeto find anything guaranteed to be false or true if this expression is true.Method parameters in com.google.errorprone.bugpatterns.threadsafety with type arguments of type VisitorStateModifier and TypeMethodDescriptionImmutableAnalysis.Factory.create(BiPredicate<com.sun.tools.javac.code.Symbol, VisitorState> suppressionChecker, VisitorState state, com.google.common.collect.ImmutableSet<String> immutableAnnotations) -
Uses of VisitorState in com.google.errorprone.bugpatterns.time
Methods in com.google.errorprone.bugpatterns.time with parameters of type VisitorStateModifier and TypeMethodDescriptionTimeUnitMismatch.matchAssignment(AssignmentTree tree, VisitorState state) TimeUnitMismatch.matchBinary(BinaryTree tree, VisitorState state) TimeInStaticInitializer.matchBlock(BlockTree tree, VisitorState state) StronglyTypeTime.matchCompilationUnit(CompilationUnitTree tree, VisitorState state) JodaDateTimeConstants.matchIdentifier(IdentifierTree tree, VisitorState state) JodaDateTimeConstants.matchMemberSelect(MemberSelectTree tree, VisitorState state) DateChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) DurationFrom.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) DurationGetTemporalUnit.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) DurationTemporalUnit.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) DurationToLongTimeUnit.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) FromTemporalAccessor.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) InstantTemporalUnit.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) InvalidJavaTimeConstant.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JavaDurationGetSecondsGetNano.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JavaDurationGetSecondsToToSeconds.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JavaDurationWithNanos.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JavaDurationWithSeconds.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JavaInstantGetSecondsGetNano.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JavaLocalDateTimeGetNano.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JavaLocalTimeGetNano.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JavaPeriodGetDays.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JavaTimeDefaultTimeZone.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JodaDurationWithMillis.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JodaInstantWithMillis.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JodaNewPeriod.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JodaPlusMinusLong.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JodaTimeConverterManager.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JodaToSelf.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) JodaWithDurationAddedLong.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) LocalDateTemporalAmount.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) PeriodFrom.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) PeriodGetTemporalUnit.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) PeriodTimeMath.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) PreferJavaTimeOverload.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ProtoDurationGetSecondsGetNano.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ProtoTimestampGetSecondsGetNano.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) TemporalAccessorGetChronoField.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) TimeUnitConversionChecker.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) TimeUnitMismatch.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) ZoneIdOfZ.matchMethodInvocation(MethodInvocationTree tree, VisitorState state) DateChecker.matchNewClass(NewClassTree tree, VisitorState state) JodaConstructors.matchNewClass(NewClassTree tree, VisitorState state) JodaToSelf.matchNewClass(NewClassTree tree, VisitorState state) TimeUnitMismatch.matchNewClass(NewClassTree tree, VisitorState state) TimeInStaticInitializer.matchVariable(VariableTree tree, VisitorState state) TimeUnitMismatch.matchVariable(VariableTree tree, VisitorState state) -
Uses of VisitorState in com.google.errorprone.fixes
Methods in com.google.errorprone.fixes with parameters of type VisitorStateModifier and TypeMethodDescriptionstatic Optional<SuggestedFix> SuggestedFixes.addMembers(ClassTree classTree, VisitorState state, SuggestedFixes.AdditionPosition where, Iterable<String> members) static SuggestedFixSuggestedFixes.addMembers(ClassTree classTree, VisitorState state, SuggestedFixes.AdditionPosition where, String firstMember, String... otherMembers) Returns aFixthat adds members defined byfirstMember(and optionallyotherMembers) to the class referenced byclassTree.static SuggestedFixSuggestedFixes.addMembers(ClassTree classTree, VisitorState state, String firstMember, String... otherMembers) Returns aFixthat adds members defined byfirstMember(and optionallyotherMembers) to the end of the class referenced byclassTree.static Optional<SuggestedFix> SuggestedFixes.addModifiers(Tree tree, VisitorState state, Modifier... modifiers) Adds modifiers to the given class, method, or field declaration.static Optional<SuggestedFix> SuggestedFixes.addModifiers(Tree tree, ModifiersTree originalModifiers, VisitorState state, Set<Modifier> modifiers) Adds modifiers to the given declaration and corresponding modifiers tree.static voidSuggestedFixes.addSuppressWarnings(SuggestedFix.Builder fixBuilder, VisitorState state, String warningToSuppress) ModifiesfixBuilderto either create a new@SuppressWarningselement on the closest suppressible node, or addwarningToSuppressto that node if there's already aSuppressWarningsannotation there.static voidSuggestedFixes.addSuppressWarnings(SuggestedFix.Builder fixBuilder, VisitorState state, String warningToSuppress, @Nullable String lineComment) ModifiesfixBuilderto either create a new@SuppressWarningselement on the closest suppressible node, or addwarningToSuppressto that node if there's already aSuppressWarningsannotation there.static voidSuggestedFixes.addSuppressWarnings(SuggestedFix.Builder fixBuilder, VisitorState state, String warningToSuppress, @Nullable String lineComment, boolean commentOnNewLine) ModifiesfixBuilderto either create a new@SuppressWarningselement on the closest suppressible node, or addwarningToSuppressto that node if there's already aSuppressWarningsannotation there.static SuggestedFixSuggestedFixes.addSuppressWarnings(VisitorState state, String warningToSuppress) Returns a fix that adds a@SuppressWarnings(warningToSuppress)to the closest suppressible element to the node pointed at bystate.getPath().static SuggestedFixSuggestedFixes.addSuppressWarnings(VisitorState state, String warningToSuppress, @Nullable String lineComment) Returns a fix that adds a@SuppressWarnings(warningToSuppress)to the closest suppressible element to the node pointed at bystate.getPath(), optionally suffixing the suppression with a comment suffix (e.g. a reason for the suppression).static SuggestedFix.BuilderSuggestedFixes.addValuesToAnnotationArgument(AnnotationTree annotation, String parameterName, Collection<String> newValues, VisitorState state) Returns a fix that appendsnewValuesto theparameterNameargument forannotation, regardless of whether there is already an argument.static StringSuggestedFixes.castTree(ExpressionTree expressionTree, String toType, VisitorState state) Casts the givenexpressionTreetotoType, adding parentheses if necessary.static booleanSuggestedFixes.compilesWithFix(Fix fix, VisitorState state) Returns true if the current compilation would succeed with the given fix applied.static booleanSuggestedFixes.compilesWithFix(Fix fix, VisitorState state, com.google.common.collect.ImmutableList<String> extraOptions, boolean onlyInSameCompilationUnit) Returns true if the current compilation would succeed with the given fix applied, using the given additional compiler options, optionally limiting the checking of compilation failures to the compilation unit in which the fix is applied.static SuggestedFixes.FixCompilerSuggestedFixes.FixCompiler.create(Fix fix, VisitorState state) static FixSuggestedFixes.deleteExceptions(MethodTree tree, VisitorState state, List<ExpressionTree> toDelete) Deletes the given exceptions from a method's throws clause.static URISuggestedFixes.FixCompiler.getModifiedFileUri(VisitorState state) static StringSuggestedFixes.prettyType(@Nullable VisitorState state, @Nullable SuggestedFix.Builder existingFix, com.sun.tools.javac.code.Type type) Pretty-prints a Type for use in fixes, qualifying any enclosed type names usingSuggestedFixes.qualifyType(VisitorState, SuggestedFix.Builder, Symbol)}.static StringSuggestedFixes.prettyType(com.sun.tools.javac.code.Type type, @Nullable VisitorState state) Pretty-prints a Type for use in diagnostic messages, qualifying any enclosed type names usingSuggestedFixes.qualifyType(VisitorState, SuggestedFix.Builder, Symbol)}.static voidSuggestedFixes.qualifyDocReference(SuggestedFix.Builder fix, DocTreePath docPath, VisitorState state) Fully qualifies a javadoc reference, e.g. for replacing{@link List}with{@link java.util.List}.static StringSuggestedFixes.qualifyStaticImport(String qualifiedName, SuggestedFix.Builder fix, VisitorState state) Provides a name to use for the (fully qualified) method provided inqualifiedName, trying to static import it if possible.static StringSuggestedFixes.qualifyType(VisitorState state, SuggestedFix.Builder fix, com.sun.tools.javac.code.Symbol sym) Returns a human-friendly name of the givenSymbolfor use in fixes.static StringSuggestedFixes.qualifyType(VisitorState state, SuggestedFix.Builder fix, String typeName) Returns a human-friendly name of the giventypeNamefor use in fixes.static StringSuggestedFixes.qualifyType(VisitorState state, SuggestedFix.Builder fix, TypeMirror type) Returns a human-friendly name of the given type for use in fixes.static SuggestedFixSuggestedFixes.removeElement(Tree tree, List<? extends Tree> trees, VisitorState state) Removestreefromtrees, assuming thattreesrepresents a comma-separated list of expressions containingtree.static Optional<SuggestedFix> SuggestedFixes.removeModifiers(ModifiersTree originalModifiers, VisitorState state, Set<Modifier> toRemove) Removes modifiers to the given declaration and corresponding modifiers tree.static Optional<SuggestedFix> SuggestedFixes.removeModifiers(Tree tree, VisitorState state, Modifier... modifiers) Removes modifiers from the given class, method, or field declaration.static voidSuggestedFixes.removeSuppressWarnings(SuggestedFix.Builder fixBuilder, VisitorState state, String warningToRemove) ModifiesfixBuilderto either remove awarningToRemovewarning from the closestSuppressWarningnode or remove the entireSuppressWarningnode ifwarningToRemoveis the only warning in that node.static SuggestedFixSuggestedFixes.renameClassWithUses(ClassTree tree, String replacement, VisitorState state) Rename a class and all uses of it in the current file.static SuggestedFixSuggestedFixes.renameMethod(MethodTree tree, String replacement, VisitorState state) Be warned, only changes method name at the declaration.static SuggestedFixSuggestedFixes.renameMethodInvocation(MethodInvocationTree tree, String replacement, VisitorState state) Replaces the name of the method being invoked intreewithreplacement.static SuggestedFixSuggestedFixes.renameMethodWithInvocations(MethodTree tree, String replacement, VisitorState state) Renames the givenMethodTreeand its usages in the current compilation unit toreplacement.static SuggestedFixSuggestedFixes.renameTypeParameter(TypeParameterTree typeParameter, Tree owningTree, String typeVarReplacement, VisitorState state) Renames a type parametertypeParameterowned byowningTreetotypeVarReplacement.static SuggestedFixSuggestedFixes.renameVariable(VariableTree tree, String replacement, VisitorState state) Renames the givenVariableTreeand its usages in the current compilation unit toreplacement.static SuggestedFixSuggestedFixes.renameVariableUsages(VariableTree tree, String replacement, VisitorState state) Renames usage of the givenVariableTreein the current compilation unit toreplacement.static SuggestedFixSuggestedFixes.replaceIncludingComments(TreePath path, String replacement, VisitorState state) Replaces the tree atpathalong with any Javadocs/associated single-line comments.static Optional<SuggestedFix> SuggestedFixes.suggestExemptingAnnotation(String exemptingAnnotation, TreePath where, VisitorState state) Create a fix to add a suppression annotation on the surrounding class.SuggestedFix.Builder.swap(Tree node1, Tree node2, VisitorState state) static SuggestedFixSuggestedFix.swap(Tree node1, Tree node2, VisitorState state) static SuggestedFix.BuilderSuggestedFixes.updateAnnotationArgumentValues(AnnotationTree annotation, VisitorState state, String parameterName, Collection<String> newValues) Returns a fix that updatesnewValuesto theparameterNameargument forannotation, regardless of whether there is already an argument. -
Uses of VisitorState in com.google.errorprone.matchers
Methods in com.google.errorprone.matchers with parameters of type VisitorStateModifier and TypeMethodDescriptionstatic booleanUnusedReturnValueMatcher.expectedExceptionTest(VisitorState state) Allow return values to be ignored in tests that expect an exception to be thrown.UnusedReturnValueMatcher.getAllowReasons(ExpressionTree tree, VisitorState state) Returns a stream of reasons the given expression is allowed to have an unused return value based on its context.protected Iterable<? extends AnnotationTree> AnnotationMatcher.getChildNodes(T tree, VisitorState state) ChildMultiMatcher.getChildNodes(T tree, VisitorState state) Returns the set of child nodes to match.protected Iterable<? extends MethodTree> ConstructorOfClass.getChildNodes(ClassTree classTree, VisitorState state) protected Iterable<? extends ExpressionTree> HasArguments.getChildNodes(MethodInvocationTree methodInvocationTree, VisitorState state) protected Iterable<? extends VariableTree> MethodHasParameters.getChildNodes(MethodTree methodTree, VisitorState state) static booleanCompileTimeConstantExpressionMatcher.hasCompileTimeConstantAnnotation(VisitorState state, com.sun.tools.javac.code.Symbol symbol) static booleanJUnitMatchers.hasJUnitAnnotation(MethodTree tree, VisitorState state) Checks if a method, or any overridden method, is annotated with any annotation from the org.junit package.static booleanTestNgMatchers.hasTestNgAnnotation(MethodTree tree, VisitorState state) Checks if a method, or any overridden method, is annotated with any annotation from the org.testng package.booleanUnusedReturnValueMatcher.isAllowed(ExpressionTree tree, VisitorState state) Returnstrueif the given expression is allowed to have an unused return value based on its context.static booleanUnusedReturnValueMatcher.isReturnValueUnused(ExpressionTree tree, VisitorState state) Returnstrueif and only if the giventreeis an invocation of or reference to a constructor or non-voidmethod for which the return value is considered unused.static booleanMatchers.isThrowingFunctionalInterface(com.sun.tools.javac.code.Type clazzType, VisitorState state) abstract booleanAbstractTypeMatcher.matches(T tree, VisitorState state) booleanAnnotationDoesNotHaveArgument.matches(AnnotationTree annotationTree, VisitorState state) booleanAnnotationHasArgumentWithValue.matches(AnnotationTree annotationTree, VisitorState state) booleanAnnotationType.matches(AnnotationTree annotationTree, VisitorState state) booleanAsserts.matches(StatementTree statementTree, VisitorState state) booleanChildMultiMatcher.matches(T tree, VisitorState state) booleanCompileTimeConstantExpressionMatcher.matches(ExpressionTree t, VisitorState state) booleanCompoundAssignment.matches(CompoundAssignmentTree compoundAssignmentTree, VisitorState state) booleanContains.matches(Tree tree, VisitorState state) booleanEnclosing.BlockOrCase.matches(T unused, VisitorState state) booleanHasIdentifier.matches(Tree tree, VisitorState state) booleanIsNonNullMatcher.matches(ExpressionTree tree, VisitorState state) booleanIsSameType.matches(T tree, VisitorState state) booleanIsSubtypeOf.matches(T tree, VisitorState state) booleanMatcher.matches(T t, VisitorState state) booleanMethodInvocation.matches(ExpressionTree expressionTree, VisitorState state) booleanMethodInvocationArgument.matches(MethodInvocationTree methodInvocationTree, VisitorState state) booleanMethodVisibility.matches(MethodTree t, VisitorState state) booleanNullnessMatcher.matches(ExpressionTree expr, VisitorState state) booleanReturns.matches(StatementTree expressionTree, VisitorState state) booleanStringLiteral.matches(ExpressionTree expressionTree, VisitorState state) booleanThrows.matches(StatementTree expressionTree, VisitorState state) booleanUnusedReturnValueMatcher.matches(ExpressionTree tree, VisitorState state) static booleanMatchers.methodCallInDeclarationOfThrowingRunnable(VisitorState state) static booleanUnusedReturnValueMatcher.mockitoInvocation(Tree tree, VisitorState state) Don't match the method that is invoked throughMockito.verify(t)ordoReturn(val).when(t).ChildMultiMatcher.multiMatchResult(T tree, VisitorState state) MultiMatcher.multiMatchResult(T tree, VisitorState vs) Attempt to match the given node, and return the associated subnodes that matched.booleanSuppressible.suppressedByAnyOf(Set<com.sun.tools.javac.util.Name> annotations, VisitorState s) Method parameters in com.google.errorprone.matchers with type arguments of type VisitorStateModifier and TypeMethodDescriptionMatchers.symbolMatcher(BiPredicate<com.sun.tools.javac.code.Symbol, VisitorState> pred) Match a Tree based solely on the Symbol produced byASTHelpers.getSymbol(Tree). -
Uses of VisitorState in com.google.errorprone.predicates
Methods in com.google.errorprone.predicates with parameters of type VisitorStateModifier and TypeMethodDescriptionbooleanTypePredicate.apply(com.sun.tools.javac.code.Type type, VisitorState state) -
Uses of VisitorState in com.google.errorprone.predicates.type
Methods in com.google.errorprone.predicates.type with parameters of type VisitorStateModifier and TypeMethodDescriptionbooleanDescendantOf.apply(com.sun.tools.javac.code.Type type, VisitorState state) booleanDescendantOfAny.apply(com.sun.tools.javac.code.Type type, VisitorState state) booleanExact.apply(com.sun.tools.javac.code.Type type, VisitorState state) booleanExactAny.apply(com.sun.tools.javac.code.Type type, VisitorState state) -
Uses of VisitorState in com.google.errorprone.scanner
Subclasses with type arguments of type VisitorState in com.google.errorprone.scannerModifier and TypeClassDescriptionclassTODO(eaftan): I'm worried about this performance of this code, specifically the part that handles SuppressWarnings.Methods in com.google.errorprone.scanner with parameters of type VisitorStateModifier and TypeMethodDescriptionprotected Set<? extends com.sun.tools.javac.util.Name> ErrorProneScanner.getCustomSuppressionAnnotations(VisitorState state) protected Set<? extends com.sun.tools.javac.util.Name> Scanner.getCustomSuppressionAnnotations(VisitorState state) Returns a set of all the custom suppression annotation types used by theBugCheckers in thisScanner.protected SuppressionInfo.SuppressedStateScanner.isSuppressed(Suppressible suppressible, ErrorProneOptions errorProneOptions, VisitorState state) Returns if this checker should be suppressed on the current tree path.protected voidScanner.reportMatch(Description description, VisitorState state) Scanner.scan(Tree tree, VisitorState state) Scan a single node.Scanner.scan(TreePath path, VisitorState state) Scan a tree from a position identified by a TreePath.ErrorProneScanner.visitAnnotatedType(AnnotatedTypeTree tree, VisitorState visitorState) ErrorProneScanner.visitAnnotation(AnnotationTree tree, VisitorState visitorState) ErrorProneScanner.visitArrayAccess(ArrayAccessTree tree, VisitorState visitorState) ErrorProneScanner.visitArrayType(ArrayTypeTree tree, VisitorState visitorState) ErrorProneScanner.visitAssert(AssertTree tree, VisitorState visitorState) ErrorProneScanner.visitAssignment(AssignmentTree tree, VisitorState visitorState) ErrorProneScanner.visitBinary(BinaryTree tree, VisitorState visitorState) ErrorProneScanner.visitBindingPattern(BindingPatternTree tree, VisitorState visitorState) ErrorProneScanner.visitBlock(BlockTree tree, VisitorState visitorState) ErrorProneScanner.visitBreak(BreakTree tree, VisitorState visitorState) ErrorProneScanner.visitCase(CaseTree tree, VisitorState visitorState) ErrorProneScanner.visitCatch(CatchTree tree, VisitorState visitorState) ErrorProneScanner.visitClass(ClassTree tree, VisitorState visitorState) ErrorProneScanner.visitCompilationUnit(CompilationUnitTree tree, VisitorState visitorState) ErrorProneScanner.visitCompoundAssignment(CompoundAssignmentTree tree, VisitorState visitorState) ErrorProneScanner.visitConditionalExpression(ConditionalExpressionTree tree, VisitorState visitorState) ErrorProneScanner.visitContinue(ContinueTree tree, VisitorState visitorState) ErrorProneScanner.visitDoWhileLoop(DoWhileLoopTree tree, VisitorState visitorState) ErrorProneScanner.visitEmptyStatement(EmptyStatementTree tree, VisitorState visitorState) ErrorProneScanner.visitEnhancedForLoop(EnhancedForLoopTree tree, VisitorState visitorState) ErrorProneScanner.visitExports(ExportsTree tree, VisitorState visitorState) ErrorProneScanner.visitExpressionStatement(ExpressionStatementTree tree, VisitorState visitorState) ErrorProneScanner.visitForLoop(ForLoopTree tree, VisitorState visitorState) ErrorProneScanner.visitIdentifier(IdentifierTree tree, VisitorState visitorState) ErrorProneScanner.visitIf(IfTree tree, VisitorState visitorState) ErrorProneScanner.visitImport(ImportTree tree, VisitorState visitorState) ErrorProneScanner.visitInstanceOf(InstanceOfTree tree, VisitorState visitorState) ErrorProneScanner.visitIntersectionType(IntersectionTypeTree tree, VisitorState visitorState) ErrorProneScanner.visitLabeledStatement(LabeledStatementTree tree, VisitorState visitorState) ErrorProneScanner.visitLambdaExpression(LambdaExpressionTree tree, VisitorState visitorState) ErrorProneScanner.visitLiteral(LiteralTree tree, VisitorState visitorState) ErrorProneScanner.visitMemberReference(MemberReferenceTree tree, VisitorState visitorState) ErrorProneScanner.visitMemberSelect(MemberSelectTree tree, VisitorState visitorState) ErrorProneScanner.visitMethod(MethodTree tree, VisitorState visitorState) ErrorProneScanner.visitMethodInvocation(MethodInvocationTree tree, VisitorState visitorState) ErrorProneScanner.visitModifiers(ModifiersTree tree, VisitorState visitorState) ErrorProneScanner.visitModule(ModuleTree tree, VisitorState visitorState) ErrorProneScanner.visitNewArray(NewArrayTree tree, VisitorState visitorState) ErrorProneScanner.visitNewClass(NewClassTree tree, VisitorState visitorState) ErrorProneScanner.visitOpens(OpensTree tree, VisitorState visitorState) ErrorProneScanner.visitPackage(PackageTree tree, VisitorState visitorState) ErrorProneScanner.visitParameterizedType(ParameterizedTypeTree tree, VisitorState visitorState) ErrorProneScanner.visitParenthesized(ParenthesizedTree tree, VisitorState visitorState) ErrorProneScanner.visitPrimitiveType(PrimitiveTypeTree tree, VisitorState visitorState) ErrorProneScanner.visitProvides(ProvidesTree tree, VisitorState visitorState) ErrorProneScanner.visitRequires(RequiresTree tree, VisitorState visitorState) ErrorProneScanner.visitReturn(ReturnTree tree, VisitorState visitorState) ErrorProneScanner.visitSwitch(SwitchTree tree, VisitorState visitorState) ErrorProneScanner.visitSwitchExpression(SwitchExpressionTree tree, VisitorState visitorState) ErrorProneScanner.visitSynchronized(SynchronizedTree tree, VisitorState visitorState) ErrorProneScanner.visitThrow(ThrowTree tree, VisitorState visitorState) ErrorProneScanner.visitTry(TryTree tree, VisitorState visitorState) ErrorProneScanner.visitTypeCast(TypeCastTree tree, VisitorState visitorState) ErrorProneScanner.visitTypeParameter(TypeParameterTree tree, VisitorState visitorState) ErrorProneScanner.visitUnary(UnaryTree tree, VisitorState visitorState) ErrorProneScanner.visitUnionType(UnionTypeTree tree, VisitorState visitorState) ErrorProneScanner.visitUses(UsesTree tree, VisitorState visitorState) ErrorProneScanner.visitVariable(VariableTree tree, VisitorState visitorState) ErrorProneScanner.visitWhileLoop(WhileLoopTree tree, VisitorState visitorState) ErrorProneScanner.visitWildcard(WildcardTree tree, VisitorState visitorState) ErrorProneScanner.visitYield(YieldTree tree, VisitorState visitorState) -
Uses of VisitorState in com.google.errorprone.suppliers
Methods in com.google.errorprone.suppliers with parameters of type VisitorState -
Uses of VisitorState in com.google.errorprone.util
Methods in com.google.errorprone.util with parameters of type VisitorStateModifier and TypeMethodDescriptionstatic Set<com.sun.tools.javac.util.Name> ASTHelpers.annotationsAmong(com.sun.tools.javac.code.Symbol sym, Set<? extends com.sun.tools.javac.util.Name> annotationClasses, VisitorState state) Determines which of a set of annotations are present on a symbol.static booleanASTHelpers.canBeRemoved(com.sun.tools.javac.code.Symbol symbol, VisitorState state) Returns whether this symbol is safe to remove.static com.sun.tools.javac.code.Symbol.MethodSymbolASTHelpers.canonicalConstructor(com.sun.tools.javac.code.Symbol.ClassSymbol record, VisitorState state) Finds the canonical constructor on a record.static StringSignatures.classDescriptor(com.sun.tools.javac.code.Type type, VisitorState state) Returns the binary names of the class.static booleanASTHelpers.containsComments(Tree tree, VisitorState state) Returns whether the giventreecontains any comments in its source.static StringSignatures.descriptor(com.sun.tools.javac.code.Type type, VisitorState state) Returns a JVMS 4.3.3 method descriptor.static com.google.common.collect.ImmutableList<com.sun.tools.javac.code.Symbol.VarSymbol> FindIdentifiers.findAllFields(com.sun.tools.javac.code.Type classType, VisitorState state) Finds all the visible fields declared or inherited in the target classstatic com.google.common.collect.ImmutableSet<com.sun.tools.javac.code.Symbol.VarSymbol> FindIdentifiers.findAllIdents(VisitorState state) Finds the set of all bare variable identifiers in scope at the current location.static @Nullable ClassTreeASTHelpers.findClass(com.sun.tools.javac.code.Symbol.ClassSymbol symbol, VisitorState state) Returns the class tree that matches the given symbol within the compilation unit, or null if none was found.static com.google.common.collect.ImmutableList<Commented<ExpressionTree>> Comments.findCommentsForArguments(MethodInvocationTree methodInvocationTree, VisitorState state) Attach comments to nodes on arguments of method calls.static com.google.common.collect.ImmutableList<Commented<ExpressionTree>> Comments.findCommentsForArguments(NewClassTree newClassTree, VisitorState state) Attach comments to nodes on arguments of constructor calls.static @Nullable MethodTreeASTHelpers.findEnclosingMethod(VisitorState state) Finds the enclosingMethodTree.static com.sun.tools.javac.code.SymbolFindIdentifiers.findIdent(String name, VisitorState state) Finds a variable declaration with the given name that is in scope at the current location.static @Nullable com.sun.tools.javac.code.SymbolFindIdentifiers.findIdent(String name, VisitorState state, com.sun.tools.javac.code.Kinds.KindSelector kind) Finds a declaration with the given name and type that is in scope at the current location.static @Nullable MethodTreeASTHelpers.findMethod(com.sun.tools.javac.code.Symbol.MethodSymbol symbol, VisitorState state) Returns the method tree that matches the given symbol within the compilation unit, or null if none was found.static com.google.common.collect.ImmutableSet<com.sun.tools.javac.code.Symbol.VarSymbol> FindIdentifiers.findUnusedIdentifiers(VisitorState state) Finds all variable declarations which are unused at this point in the AST (i.e. they might be used further on).static @Nullable com.sun.tools.javac.code.TypeAnnotations.AnnotationTypeASTHelpers.getAnnotationType(AnnotationTree anno, @Nullable com.sun.tools.javac.code.Symbol target, VisitorState state) Returns whetherannocorresponds to a type annotation, ornullif it could not be determined.static com.google.common.collect.ImmutableSet<String> ASTHelpers.getGeneratedBy(VisitorState state) Returns the value of the@Generatedannotation on enclosing classes, if present.static com.google.common.collect.ImmutableSet<String> ASTHelpers.getGeneratedBy(com.sun.tools.javac.code.Symbol symbol, VisitorState state) Deprecated.TODO(ghm): delete after a JavaBuilder releasestatic NullnessASTHelpers.getNullnessValue(ExpressionTree expr, VisitorState state, NullnessAnalysis nullnessAnalysis) Returns theNullnessfor an expression as determined by the nullness dataflow analysis.static com.google.common.collect.ImmutableSet<com.sun.tools.javac.code.Type> ASTHelpers.getThrownExceptions(Tree tree, VisitorState state) Returns the exceptions thrown bytree.static booleanASTHelpers.hasAnnotation(Tree tree, Class<? extends Annotation> annotationClass, VisitorState state) Deprecated.preferASTHelpers.hasAnnotation(Symbol, String, VisitorState)to avoid needing a runtime dependency on the annotation class, and to prevent issues if there is skew between the definition of the annotation on the runtime and compile-time classpathsstatic booleanASTHelpers.hasAnnotation(Tree tree, String annotationClass, VisitorState state) Check for the presence of an annotation, considering annotation inheritance.static booleanASTHelpers.hasAnnotation(com.sun.tools.javac.code.Symbol sym, Class<? extends Annotation> annotationClass, VisitorState state) Deprecated.preferASTHelpers.hasAnnotation(Symbol, String, VisitorState)to avoid needing a runtime dependency on the annotation class, and to prevent issues if there is skew between the definition of the annotation on the runtime and compile-time classpathsstatic booleanASTHelpers.hasAnnotation(com.sun.tools.javac.code.Symbol sym, String annotationClass, VisitorState state) Determines whether a symbol has an annotation of the given type.static booleanASTHelpers.hasExplicitSource(Tree tree, VisitorState state) Returns whether the given tree has an explicit source code representation.static booleanASTHelpers.hasImplicitType(VariableTree tree, VisitorState state) Returns whether this is avaror a lambda parameter that has no explicit type.static booleanASTHelpers.hasOverloadWithOnlyOneParameter(com.sun.tools.javac.code.Symbol.MethodSymbol existingMethod, com.sun.tools.javac.util.Name targetMethodName, com.sun.tools.javac.code.Type onlyParameterType, VisitorState state) Returns whetherexistingMethodhas an overload (or "nearly" an overload) with the giventargetMethodName, and only a single parameter of typeonlyParameterType.static booleanASTHelpers.inSamePackage(com.sun.tools.javac.code.Symbol targetSymbol, VisitorState state) Return true if the given symbol is defined in the current package.static booleanASTHelpers.isBugCheckerCode(VisitorState state) Returnstrueif the code is in a BugChecker class.static booleanASTHelpers.isCastable(com.sun.tools.javac.code.Type s, com.sun.tools.javac.code.Type t, VisitorState state) Returns true iferasure(s)is castable toerasure(t).static booleanASTHelpers.isCheckedExceptionType(com.sun.tools.javac.code.Type t, VisitorState state) Returns true iftis a subtype of Throwable but not a subtype of RuntimeException or Error.static booleanASTHelpers.isInStaticInitializer(VisitorState state) Attempts to detect whether we're in a static-initializer-like context: that includes direct assignments to static fields, assignments to enum fields, being contained within an expression which is ultimately assigned to a static field.static booleanASTHelpers.isJUnitTestCode(VisitorState state) Returns true if the leaf node in theTreePathfromstatesits somewhere underneath a class or method that is marked as JUnit 3 or 4 test code.static booleanASTHelpers.isKotlin(com.sun.tools.javac.code.Symbol symbol, VisitorState state) Returnstrueif this symbol was declared in Kotlin source.static booleanASTHelpers.isSameType(com.sun.tools.javac.code.Type s, com.sun.tools.javac.code.Type t, VisitorState state) Returns true iferasure(s) == erasure(t).static booleanASTHelpers.isSubtype(com.sun.tools.javac.code.Type s, com.sun.tools.javac.code.Type t, VisitorState state) Returns true iferasure(s) <: erasure(t).static booleanASTHelpers.isTestNgTestCode(VisitorState state) Returns true if the leaf node in theTreePathfromstatesits somewhere underneath a class or method that is marked as TestNG test code.static booleanASTHelpers.isVoidType(com.sun.tools.javac.code.Type type, VisitorState state) Return true if the given type is 'void' or 'Void'.static @Nullable List<ExpressionTree> ASTHelpers.matchBinaryTree(BinaryTree tree, List<Matcher<ExpressionTree>> matchers, VisitorState state) Given a BinaryTree to match against and a list of two matchers, applies the matchers to the operands in both orders.static booleanASTHelpers.methodIsPublicAndNotAnOverride(com.sun.tools.javac.code.Symbol.MethodSymbol method, VisitorState state) Returns true if the given method symbol is public (both the method and the enclosing class) and does not have a super-method (i.e., it is not an@Override).static booleanASTHelpers.requiresParentheses(ExpressionTree expression, VisitorState state) Checks whether an expression requires parentheses.static @Nullable com.sun.tools.javac.code.Symbol.MethodSymbolASTHelpers.resolveExistingMethod(VisitorState state, com.sun.tools.javac.code.Symbol.TypeSymbol base, com.sun.tools.javac.util.Name name, Iterable<com.sun.tools.javac.code.Type> argTypes, Iterable<com.sun.tools.javac.code.Type> tyargTypes) Given a Type (base), find the method namedname, with the appropriateargTypesandtyargTypesand return its MethodSymbol.abstract booleanVisibility.shouldBeVisible(Tree tree, VisitorState state) Whethertreeshould be visible from the path instateassuming we're in prod code.abstract booleanVisibility.shouldBeVisible(com.sun.tools.javac.code.Symbol symbol, VisitorState state) Whethersymbolshould be visible from the path instateassuming we're in prod code.static @Nullable TargetTypeASTHelpers.targetType(VisitorState state) Deprecated.use TargetType.targetType directlystatic @Nullable TargetTypeTargetType.targetType(VisitorState state) Returns the target type of the tree at the givenVisitorState's path, or elsenull.Constructors in com.google.errorprone.util with parameters of type VisitorState