private static boolean hasGetterName(final PsiMethod method, boolean acceptBoxedBooleanIsPrefix) {
    if (method == null) return false;

    if (method.isConstructor()) return false;

    String methodName = method.getName();
    GetterFlavour flavour = getMethodNameGetterFlavour(methodName);
    switch (flavour) {
      case GENERIC:
        PsiType returnType = method.getReturnType();
        return !PsiTypes.voidType().equals(returnType);
      case BOOLEAN:
        PsiType propertyType = method.getReturnType();
        return isBoolean(propertyType) ||
               (acceptBoxedBooleanIsPrefix && propertyType != null &&
                CommonClassNames.JAVA_LANG_BOOLEAN.equals(propertyType.getCanonicalText()));
      case NOT_A_GETTER:
      default:
        return false;
    }
  }
private static boolean hasGetterName(final PsiMethod method, boolean acceptBoxedBooleanIsPrefix)