Class SourceTreeAnalyzer


  • final class SourceTreeAnalyzer
    extends Object
    Performing file analysis on a folder level by navigating through the folder tree structure.
    • Method Detail

      • listFiles

        public static Stream<Path> listFiles​(Path root)
        Lists files found under given folder.
        Parameters:
        root - Path of the folder where files are searched for.
        Returns:
        Stream pointing to the Path of detected files.
      • analyze

        public AnalyzeResult analyze​(BannedImportGroups groups)
        Checks the files in enclosed folder for not allowed import statements.
        Parameters:
        groups - BannedImportGroups contains the info about banned imports and base packages from which they are banned.
        Returns:
        AnalyzeResult that reports of found matches.