Class CommandLineArgStringifier
- java.lang.Object
-
- com.facebook.buck.core.rules.actions.lib.args.CommandLineArgStringifier
-
public class CommandLineArgStringifier extends Object
Helper methods to convert / validate objects that are command line arguments for actions
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
asString(ArtifactFilesystem filesystem, boolean absolute, CommandLineArgs.ArgAndFormatString argAndFormatString)
static String
asString(ArtifactFilesystem filesystem, boolean absolute, Object object)
-
-
-
Method Detail
-
asString
public static String asString(ArtifactFilesystem filesystem, boolean absolute, CommandLineArgs.ArgAndFormatString argAndFormatString)
- Parameters:
filesystem
- the filesystem to use to stringifyArtifact
sabsolute
- If the path returned should be absolute. This can be necessary for functions likeProcessBuilder.start()
. On windows it does not do path resolution properly for relative paths, even if thedirectory
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 stringifyArtifact
sabsolute
- If the path returned should be absolute. This can be necessary for functions likeProcessBuilder.start()
. On windows it does not do path resolution properly for relative paths, even if thedirectory
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
-
-