T
- a type of anchor element which could be associated with given nullability problem kindpublic class NullabilityProblemKind<T extends PsiElement>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
NullabilityProblemKind.NullabilityProblem<T extends PsiElement>
Represents a concrete nullability problem on PSI which consists of PSI element (anchor) and
NullabilityProblemKind . |
Modifier and Type | Method and Description |
---|---|
NullabilityProblemKind.NullabilityProblem<T> |
asMyProblem(NullabilityProblemKind.NullabilityProblem<?> problem)
Returns the supplied problem with adjusted type parameter or null if supplied problem kind is not this kind
|
static NullabilityProblemKind.NullabilityProblem<?> |
fromContext(PsiExpression expression,
java.util.Map<PsiExpression,NullabilityProblemKind<? super PsiExpression>> customNullabilityProblems) |
void |
ifMyProblem(NullabilityProblemKind.NullabilityProblem<?> problem,
java.util.function.Consumer<? super T> consumer)
Executes given consumer if the supplied problem has the same kind as this kind
|
NullabilityProblemKind.NullabilityProblem<T> |
problem(T anchor,
PsiExpression expression)
Creates a new
NullabilityProblemKind.NullabilityProblem of this kind using given anchor |
java.lang.String |
toString() |
public static final NullabilityProblemKind<PsiMethodCallExpression> callNPE
public static final NullabilityProblemKind<PsiMethodReferenceExpression> callMethodRefNPE
public static final NullabilityProblemKind<PsiNewExpression> innerClassNPE
public static final NullabilityProblemKind<PsiExpression> fieldAccessNPE
public static final NullabilityProblemKind<PsiArrayAccessExpression> arrayAccessNPE
public static final NullabilityProblemKind<PsiElement> unboxingNullable
public static final NullabilityProblemKind<PsiExpression> assigningToNotNull
public static final NullabilityProblemKind<PsiExpression> assigningToNonAnnotatedField
public static final NullabilityProblemKind<PsiExpression> storingToNotNullArray
public static final NullabilityProblemKind<PsiExpression> nullableReturn
public static final NullabilityProblemKind<PsiExpression> nullableFunctionReturn
public static final NullabilityProblemKind<PsiExpression> passingToNotNullParameter
public static final NullabilityProblemKind<PsiMethodReferenceExpression> passingToNotNullMethodRefParameter
public static final NullabilityProblemKind<PsiExpression> passingToNonAnnotatedParameter
public static final NullabilityProblemKind<PsiMethodReferenceExpression> passingToNonAnnotatedMethodRefParameter
public static final NullabilityProblemKind<PsiExpression> assumeNotNull
public static final NullabilityProblemKind<PsiExpression> noProblem
public final NullabilityProblemKind.NullabilityProblem<T> problem(T anchor, PsiExpression expression)
NullabilityProblemKind.NullabilityProblem
of this kind using given anchoranchor
- anchor to bind the problem toexpression
- shortest expression which is actually violates the nullabilitypublic final NullabilityProblemKind.NullabilityProblem<T> asMyProblem(NullabilityProblemKind.NullabilityProblem<?> problem)
problem
- problem to checkpublic void ifMyProblem(NullabilityProblemKind.NullabilityProblem<?> problem, java.util.function.Consumer<? super T> consumer)
problem
- a problem to checkconsumer
- a consumer to execute. A problem anchor is supplied as the consumer argument.public java.lang.String toString()
toString
in class java.lang.Object
public static NullabilityProblemKind.NullabilityProblem<?> fromContext(PsiExpression expression, java.util.Map<PsiExpression,NullabilityProblemKind<? super PsiExpression>> customNullabilityProblems)