private static boolean isProtobufGetter(@NotNull PsiModifierListOwner listOwner) {
    if (!(listOwner instanceof PsiMethod method)) return false;
    if (!method.getName().startsWith("get")) return false;
    if (method.hasModifierProperty(PsiModifier.STATIC)) return false;
    PsiClass aClass = method.getContainingClass();
    if (aClass == null) return false;
    if (method.getReturnType() instanceof PsiPrimitiveType) return false;
    PsiReferenceList extendsList = aClass.getExtendsList();
    if (extendsList == null) return false;
    PsiClassType[] types = extendsList.getReferencedTypes();
    return ContainerUtil.exists(types, t -> TypeUtils.typeEquals("com.google.protobuf.GeneratedMessage", t) ||
                                            TypeUtils.typeEquals("com.google.protobuf.GeneratedMessageV3", t) ||
                                            TypeUtils.typeEquals("com.google.protobuf.GeneratedMessageLite", t));
  }
private static boolean isProtobufGetter(@NotNull PsiModifierListOwner listOwner)