public static AbstractModule module()

in src/main/java/com/googlesource/gerrit/plugins/uploadvalidator/ChangeEmailValidator.java [38:67]


  public static AbstractModule module() {
    return new AbstractModule() {
      @Override
      public void configure() {
        DynamicSet.bind(binder(), CommitValidationListener.class).to(ChangeEmailValidator.class);
        bind(ProjectConfigEntry.class)
            .annotatedWith(Exports.named(KEY_ALLOWED_AUTHOR_EMAIL_PATTERN))
            .toInstance(
                new ProjectConfigEntry(
                    "Author Email Pattern",
                    null,
                    ProjectConfigEntryType.ARRAY,
                    null,
                    false,
                    "Commits with author email not matching one of these pattterns will be"
                        + " rejected."));
        bind(ProjectConfigEntry.class)
            .annotatedWith(Exports.named(KEY_ALLOWED_COMMITTER_EMAIL_PATTERN))
            .toInstance(
                new ProjectConfigEntry(
                    "Committer Email Pattern",
                    null,
                    ProjectConfigEntryType.ARRAY,
                    null,
                    false,
                    "Commits with committer email not matching one of these patterns will be"
                        + " rejected."));
      }
    };
  }