public static AbstractModule module()

in src/main/java/com/googlesource/gerrit/plugins/uploadvalidator/ContentTypeUtil.java [40:62]


  public static AbstractModule module() {
    return new AbstractModule() {

      @Override
      protected void configure() {
        bind(ContentTypeUtil.class).in(Scopes.SINGLETON);
        bind(ProjectConfigEntry.class)
            .annotatedWith(Exports.named(KEY_BINARY_TYPES))
            .toInstance(
                new ProjectConfigEntry(
                    "Binary Types",
                    null,
                    ProjectConfigEntryType.ARRAY,
                    null,
                    false,
                    "At the moment, there is no ideal solution to detect binary "
                        + "files. But some checks shouldn't run on binary files "
                        + "(e. g. InvalidLineEndingCheck). Because of that you can "
                        + "enter content types to avoid that these checks run on "
                        + "files with one of the entered content types."));
      }
    };
  }