Class ErrorCodeConfig


  • public class ErrorCodeConfig
    extends Object
    This class represents the contents of the errorCodeConfig.yml. It is created by ErrorCodeConfigReader.
    • Method Detail

      • getErrorTagForPackage

        public Optional<String> getErrorTagForPackage​(String packageName)
        Get the error tag configured for a specific java package.
        Parameters:
        packageName - name of the package
        Returns:
        corresponding error tag
      • getPackagesForErrorTag

        public List<String> getPackagesForErrorTag​(String errorTag)
        Parameters:
        errorTag - error tag e.g: EXA-TEST
        Returns:
        list of packages that can declare this error code
      • hasErrorTag

        public boolean hasErrorTag​(String errorTag)
        Check if a specific error tag is declared in the configuration file.
        Parameters:
        errorTag - error tag to check
        Returns:
        true if the tag was declared.
      • getHighestIndexForErrorTag

        public int getHighestIndexForErrorTag​(String errorTag)
        Get the highest index of an error code.
        Parameters:
        errorTag - error code
        Returns:
        highest index (according to the config file)