Class UnsafeWildcard
java.lang.Object
com.google.errorprone.bugpatterns.BugChecker
com.google.errorprone.bugpatterns.nullness.UnsafeWildcard
- All Implemented Interfaces:
BugChecker.AssignmentTreeMatcher
,BugChecker.ClassTreeMatcher
,BugChecker.ConditionalExpressionTreeMatcher
,BugChecker.LambdaExpressionTreeMatcher
,BugChecker.MethodInvocationTreeMatcher
,BugChecker.NewClassTreeMatcher
,BugChecker.ParenthesizedTreeMatcher
,BugChecker.ReturnTreeMatcher
,BugChecker.TypeCastTreeMatcher
,BugChecker.VariableTreeMatcher
,Suppressible
,Serializable
public class UnsafeWildcard
extends BugChecker
implements BugChecker.AssignmentTreeMatcher, BugChecker.ClassTreeMatcher, BugChecker.ConditionalExpressionTreeMatcher, BugChecker.LambdaExpressionTreeMatcher, BugChecker.MethodInvocationTreeMatcher, BugChecker.NewClassTreeMatcher, BugChecker.ParenthesizedTreeMatcher, BugChecker.ReturnTreeMatcher, BugChecker.TypeCastTreeMatcher, BugChecker.VariableTreeMatcher
Check to detect unsafe upcasts of
null
values to wildcard types.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.errorprone.bugpatterns.BugChecker
BugChecker.AnnotatedTypeTreeMatcher, BugChecker.AnnotationTreeMatcher, BugChecker.ArrayAccessTreeMatcher, BugChecker.ArrayTypeTreeMatcher, BugChecker.AssertTreeMatcher, BugChecker.AssignmentTreeMatcher, BugChecker.BinaryTreeMatcher, BugChecker.BlockTreeMatcher, BugChecker.BreakTreeMatcher, BugChecker.CaseTreeMatcher, BugChecker.CatchTreeMatcher, BugChecker.ClassTreeMatcher, BugChecker.CompilationUnitTreeMatcher, BugChecker.CompoundAssignmentTreeMatcher, BugChecker.ConditionalExpressionTreeMatcher, BugChecker.ContinueTreeMatcher, BugChecker.DoWhileLoopTreeMatcher, BugChecker.EmptyStatementTreeMatcher, BugChecker.EnhancedForLoopTreeMatcher, BugChecker.ExpressionStatementTreeMatcher, BugChecker.ForLoopTreeMatcher, BugChecker.IdentifierTreeMatcher, BugChecker.IfTreeMatcher, BugChecker.ImportTreeMatcher, BugChecker.InstanceOfTreeMatcher, BugChecker.IntersectionTypeTreeMatcher, BugChecker.LabeledStatementTreeMatcher, BugChecker.LambdaExpressionTreeMatcher, BugChecker.LiteralTreeMatcher, BugChecker.MemberReferenceTreeMatcher, BugChecker.MemberSelectTreeMatcher, BugChecker.MethodInvocationTreeMatcher, BugChecker.MethodTreeMatcher, BugChecker.ModifiersTreeMatcher, BugChecker.NewArrayTreeMatcher, BugChecker.NewClassTreeMatcher, BugChecker.ParameterizedTypeTreeMatcher, BugChecker.ParenthesizedTreeMatcher, BugChecker.PrimitiveTypeTreeMatcher, BugChecker.ReturnTreeMatcher, BugChecker.SuppressibleTreePathScanner<R,
P>, BugChecker.SwitchTreeMatcher, BugChecker.SynchronizedTreeMatcher, BugChecker.ThrowTreeMatcher, BugChecker.TryTreeMatcher, BugChecker.TypeCastTreeMatcher, BugChecker.TypeParameterTreeMatcher, BugChecker.UnaryTreeMatcher, BugChecker.UnionTypeTreeMatcher, BugChecker.VariableTreeMatcher, BugChecker.WhileLoopTreeMatcher, BugChecker.WildcardTreeMatcher -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionmatchAssignment
(com.sun.source.tree.AssignmentTree tree, VisitorState state) matchClass
(com.sun.source.tree.ClassTree tree, VisitorState state) matchConditionalExpression
(com.sun.source.tree.ConditionalExpressionTree tree, VisitorState state) matchLambdaExpression
(com.sun.source.tree.LambdaExpressionTree tree, VisitorState state) matchMethodInvocation
(com.sun.source.tree.MethodInvocationTree tree, VisitorState state) matchNewClass
(com.sun.source.tree.NewClassTree tree, VisitorState state) matchParenthesized
(com.sun.source.tree.ParenthesizedTree tree, VisitorState state) matchReturn
(com.sun.source.tree.ReturnTree tree, VisitorState state) matchTypeCast
(com.sun.source.tree.TypeCastTree tree, VisitorState state) matchVariable
(com.sun.source.tree.VariableTree tree, VisitorState state) Methods inherited from class com.google.errorprone.bugpatterns.BugChecker
allNames, buildDescription, buildDescription, buildDescription, canonicalName, customSuppressionAnnotations, defaultSeverity, describeMatch, describeMatch, describeMatch, describeMatch, describeMatch, describeMatch, disableable, equals, hashCode, isSuppressed, isSuppressed, isSuppressed, isSuppressed, linkUrl, message, supportsSuppressWarnings, suppressedByAnyOf, suppressedRegions
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.errorprone.matchers.Suppressible
allNames, canonicalName, customSuppressionAnnotations, supportsSuppressWarnings, suppressedByAnyOf
-
Constructor Details
-
UnsafeWildcard
public UnsafeWildcard()
-
-
Method Details
-
matchAssignment
- Specified by:
matchAssignment
in interfaceBugChecker.AssignmentTreeMatcher
-
matchClass
- Specified by:
matchClass
in interfaceBugChecker.ClassTreeMatcher
-
matchConditionalExpression
public Description matchConditionalExpression(com.sun.source.tree.ConditionalExpressionTree tree, VisitorState state) - Specified by:
matchConditionalExpression
in interfaceBugChecker.ConditionalExpressionTreeMatcher
-
matchLambdaExpression
public Description matchLambdaExpression(com.sun.source.tree.LambdaExpressionTree tree, VisitorState state) - Specified by:
matchLambdaExpression
in interfaceBugChecker.LambdaExpressionTreeMatcher
-
matchMethodInvocation
public Description matchMethodInvocation(com.sun.source.tree.MethodInvocationTree tree, VisitorState state) - Specified by:
matchMethodInvocation
in interfaceBugChecker.MethodInvocationTreeMatcher
-
matchNewClass
- Specified by:
matchNewClass
in interfaceBugChecker.NewClassTreeMatcher
-
matchParenthesized
public Description matchParenthesized(com.sun.source.tree.ParenthesizedTree tree, VisitorState state) - Specified by:
matchParenthesized
in interfaceBugChecker.ParenthesizedTreeMatcher
-
matchReturn
- Specified by:
matchReturn
in interfaceBugChecker.ReturnTreeMatcher
-
matchTypeCast
- Specified by:
matchTypeCast
in interfaceBugChecker.TypeCastTreeMatcher
-
matchVariable
- Specified by:
matchVariable
in interfaceBugChecker.VariableTreeMatcher
-