Class DebugPathSanitizer

    • Constructor Detail

      • DebugPathSanitizer

        public DebugPathSanitizer​(boolean useUnixPathSeparator)
        useUnixPathSeparator - use unix path separator in paths.
      • DebugPathSanitizer

        public DebugPathSanitizer()
    • Method Detail

      • getPaddedDir

        public static String getPaddedDir​(String path,
                                          int size,
                                          char pad)
        the given path as a string, expanded using separator to fulfill the required pathSize.
      • getCompilationEnvironment

        public abstract<String,​String> getCompilationEnvironment​(Path workingDir,
                                                                                                              boolean shouldSanitize)
      • getCompilationFlags

        public<String> getCompilationFlags​(Compiler compiler,
                                                                                   Path workingDir,
                                                                         <Path,​Path> prefixMap)
      • getCompilationDirectory

        public abstract String getCompilationDirectory()
      • sanitizer

        public java.util.function.Function<String,​String> sanitizer​(Optional<Path> workingDir)
        Return a Function to perform sanitization of string. Applying this function to a string will return a version of it with paths replaced by their sanitized version.

        When sanitizing multiple values, it is much more efficient to get the sanitizer once and sanitize multiple values with it.

      • sanitizeFlags

        public<String> sanitizeFlags​(Iterable<String> flags)
        Sanitizes a list of flags.
      • restoreCompilationDirectory

        public abstract void restoreCompilationDirectory​(Path path,
                                                         Path workingDir)