public class DfaPsiUtil
extends java.lang.Object
Constructor and Description |
---|
DfaPsiUtil() |
public static boolean isFinalField(PsiVariable var)
public static Nullability getElementNullability(PsiType resultType, PsiModifierListOwner owner)
public static Nullability getElementNullabilityIgnoringParameterInference(PsiType resultType, PsiModifierListOwner owner)
public static Nullability inferParameterNullability(PsiParameter parameter)
public static Nullability getTypeNullability(PsiType type)
public static NullabilityAnnotationInfo getTypeNullabilityInfo(PsiType type)
public static Nullability getFunctionalParameterNullability(PsiFunctionalExpression function, int index)
function
- functional expressionindex
- parameter indexpublic static boolean isInitializedNotNull(PsiField field)
public static java.util.List<PsiExpression> findAllConstructorInitializers(PsiField field)
public static PsiElement getTopmostBlockInSameClass(PsiElement position)
public static java.util.Collection<PsiExpression> getVariableAssignmentsInFile(PsiVariable psiVariable, boolean literalsOnly, PsiElement place)
public static PsiType tryGenerify(PsiExpression expression, PsiType type)
expression
- expression which type is a supertype of the type to generifytype
- a type to generifypublic static DfType fromLiteral(PsiLiteralExpression expr)
expr
- literal to create a constant type from