Nullability (@NotNull PsiParameter parameter) { if (parameter.getType() instanceof PsiPrimitiveType) return Nullability.UNKNOWN; PsiParameterList parent = ObjectUtils.tryCast(parameter.getParent(), PsiParameterList.class); if (parent == null) return Nullability.UNKNOWN; PsiMethodImpl method = ObjectUtils.tryCast(parent.getParent(), PsiMethodImpl.class); if (method == null) return Nullability.UNKNOWN; BitSet notNullParameters = getInferenceData(method).notNullParameters; if (!notNullParameters.isEmpty()) { int index = parent.getParameterIndex(parameter); if (notNullParameters.get(index)) { return Nullability.NOT_NULL; } } return Nullability.UNKNOWN; }