Class CommandLineArgStringifier


  • public class CommandLineArgStringifier
    extends Object
    Helper methods to convert / validate objects that are command line arguments for actions
    • Method Detail

      • asString

        public static String asString​(ArtifactFilesystem filesystem,
                                      boolean absolute,
                                      CommandLineArgs.ArgAndFormatString argAndFormatString)
        Parameters:
        filesystem - the filesystem to use to stringify Artifacts
        absolute - If the path returned should be absolute. This can be necessary for functions like ProcessBuilder.start(). On windows it does not do path resolution properly for relative paths, even if the directory is set so an absolute path must be provided.
        argAndFormatString - the object to stringify and the format string to apply after initial stringification
        Returns:
        the string representation of an argument to pass to a command line application in an action
      • asString

        public static String asString​(ArtifactFilesystem filesystem,
                                      boolean absolute,
                                      Object object)
                               throws CommandLineArgException
        Parameters:
        filesystem - the filesystem to use to stringify Artifacts
        absolute - If the path returned should be absolute. This can be necessary for functions like ProcessBuilder.start(). On windows it does not do path resolution properly for relative paths, even if the directory is set so an absolute path must be provided.
        object - the object to stringify
        Returns:
        the string representation of an argument to pass to a command line application in an action
        Throws:
        CommandLineArgException