private static @NotNull ThreeState isDeprecatedByAnnotation(@NotNull PsiModifierListOwner owner, @Nullable PsiElement context) {
    PsiAnnotation annotation = AnnotationUtil.findAnnotation(owner, CommonClassNames.JAVA_LANG_DEPRECATED);
    if (annotation == null) return ThreeState.UNSURE;
    if (context == null) return ThreeState.YES;
    String since = null;
    PsiAnnotationMemberValue value = annotation.findAttributeValue("since");
    if (value instanceof PsiLiteralExpression) {
      since = ObjectUtils.tryCast(((PsiLiteralExpression)value).getValue(), String.class);
    }
    if (since == null || JdkUtils.getJdkForElement(owner) == null) return ThreeState.YES;
    LanguageLevel deprecationLevel = LanguageLevel.parse(since);
    return ThreeState.fromBoolean(deprecationLevel == null || PsiUtil.getLanguageLevel(context).isAtLeast(deprecationLevel));
  }
private static @NotNull ThreeState isDeprecatedByAnnotation(@NotNull PsiModifierListOwner owner, @Nullable PsiElement context)