@Override
  public @Nullable PsiElement resolve() {
    final Object value = myElement.getValue();
    if (value instanceof String name) {
      final String type = getMemberType(myElement);

      if (type != null) {
        final ReflectiveClass ownerClass = getReflectiveClass(myContext);
        if (ownerClass != null) {
          return switch (type) {
            case FIND_GETTER, FIND_SETTER, FIND_VAR_HANDLE ->
              resolveField(name, ownerClass, JavaLangInvokeHandleReference::isNonStaticField);
            case FIND_STATIC_GETTER, FIND_STATIC_SETTER, FIND_STATIC_VAR_HANDLE ->
              resolveField(name, ownerClass, JavaLangInvokeHandleReference::isStaticField);
            case FIND_VIRTUAL, FIND_SPECIAL -> resolveMethod(name, ownerClass, JavaLangInvokeHandleReference::isNonStaticMethod);
            case FIND_STATIC -> resolveMethod(name, ownerClass, JavaLangInvokeHandleReference::isStaticMethod);
            default -> null;
          };
        }
      }
    }
    return null;
  }
@Override
  public @Nullable PsiElement resolve()