private static List<Value> getValues(PsiModifierListOwner target, PsiType type, PsiElement context) {
    if (target == null) {
      return null;
    }
    MagicConstantUtils.AllowedValues values = MagicConstantUtils.getAllowedValues(target, type, context);
    if (values != null && !values.isFlagSet() && values.getValues().length <= MAX_NUMBER_OF_BRANCHES) {
      List<Value> result = new ArrayList<>();
      for (PsiAnnotationMemberValue value : values.getValues()) {
        Value val = null;
        if (value instanceof PsiReferenceExpression ref) {
          PsiField field = ObjectUtils.tryCast(ref.resolve(), PsiField.class);
          if (field != null) {
            val = Value.fromField(field);
          }
        }
        else if (value instanceof PsiExpression expr) {
          final Object o = ExpressionUtils.computeConstantExpression(expr);
          val = Value.fromConstant(o);
        }
        if (val == null) return Collections.emptyList();
        result.add(val);
      }
      return result;
    }
    return null;
  }
private static List<Value> getValues(PsiModifierListOwner target, PsiType type, PsiElement context)