public static @Nullable LongRangeSet typeRange(@Nullable PsiType type, boolean useAnnotations) {
    if (!(type instanceof PsiPrimitiveType) && !TypeConversionUtil.isPrimitiveWrapper(type)) return null;
    type = PsiPrimitiveType.getOptionallyUnboxedType(type);
    if (type != null) {
      LongRangeSet result = LongRangeSet.all();
      if (useAnnotations) {
        for (PsiAnnotation annotation : type.getAnnotations()) {
          result = result.meet(fromAnnotation(annotation));
        }
      }
      if (type.equals(PsiTypes.byteType())) {
        return BYTE_RANGE.meet(result);
      }
      if (type.equals(PsiTypes.charType())) {
        return CHAR_RANGE.meet(result);
      }
      if (type.equals(PsiTypes.shortType())) {
        return SHORT_RANGE.meet(result);
      }
      if (type.equals(PsiTypes.intType())) {
        return INT_RANGE.meet(result);
      }
      if (type.equals(PsiTypes.longType())) {
        return result;
      }
    }
    return null;
  }
public static @Nullable LongRangeSet typeRange(@Nullable PsiType type, boolean useAnnotations)