private static @Nullable PsiClass createClassNamed(@Nullable String newClassName,
                                                     @NotNull Properties properties,
                                                     String templateName,
                                                     @NotNull PsiDirectory directory) throws IncorrectOperationException {
    if (newClassName == null) {
      return null;
    }
    final String className = extractClassName(newClassName);
    properties.setProperty(CLASS_NAME_PROPERTY, className);
    properties.setProperty(INTERFACE_NAME_PROPERTY, className);

    return createClassFromTemplate(properties, templateName, directory, newClassName);
  }
private static @Nullable PsiClass createClassNamed(@Nullable String newClassName,
                                                     @NotNull Properties properties,
                                                     String templateName,
                                                     @NotNull PsiDirectory directory)