Class Validations


  • public class Validations
    extends Object
    • Constructor Detail

      • Validations

        public Validations()
    • Method Detail

      • verifyPackageName

        public static void verifyPackageName​(String name)
        Ensures the package name isn't null.
        Parameters:
        name -
      • verifySchemaPaths

        public static void verifySchemaPaths​(Collection<File> files)
        We sort the input files by their paths to ensure a consistent order for processing.

        We maintain two sets: encounteredDirectories to keep track of encountered directories encounteredPaths to keep track of encountered paths.

        We iterate through the sorted files and perform the following checks: Directory overlap: throw an exception if duplicate directories are configured. Duplicate files: throw an exception if duplicate files are configured. Ancestry in already added directories: if files exist in configured directories or subdirectories of configured directories throw an exception

        Parameters:
        files -