View Javadoc
1   /*
2    * SPDX-FileCopyrightText: Copyright (c) 2011-2026 Yegor Bugayenko
3    * SPDX-License-Identifier: MIT
4    */
5   package com.qulice.spi;
6   
7   import java.io.File;
8   import java.util.Collection;
9   
10  /**
11   * Validator.
12   *
13   * @since 0.17
14   */
15  public interface ResourceValidator {
16  
17      /**
18       * Validate and throws exception if there are any problems.
19       *
20       * @param files Files to validate
21       * @return Validation results
22       */
23      Collection<Violation> validate(Collection<File> files);
24  
25      /**
26       * Name of this validator.
27       *
28       * @return Name of this validator
29       */
30      String name();
31  
32      /**
33       * How many rules this validator applies to every file it reads.
34       *
35       * @return Number of rules, or zero when the validator cannot tell
36       */
37      int rules();
38  }