public final class Platform extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Platform.Architecture
The architecture of an operating system.
|
static class |
Platform.OperatingSystem
Operating systems.
|
| Modifier and Type | Field and Description |
|---|---|
Platform.Architecture |
architecture
The architecture of the platform.
|
Platform.OperatingSystem |
operatingSystem
The operating system of the platform.
|
| Modifier and Type | Method and Description |
|---|---|
static Platform |
detected()
Returns the detected platform.
|
String |
getClassifier()
Returns the classifier associated with this platform.
|
static String |
getDetectionProperties() |
String |
getDownloadSuffix()
Returns the suffix to append to the cmake download filename.
|
String |
getEnvironment(ProcessBuilder processBuilder,
String name)
Returns the value of a
ProcessBuilder's environment variable. |
Path |
getExecutableOnPath(String filename,
String path)
Returns the fully qualified path of the executable.
|
String |
getExecutableSuffix()
Returns the suffix to append to the cmake executables.
|
boolean |
isDownloadAvailable() |
void |
overrideEnvironmentVariables(Map<String,String> source,
ProcessBuilder target)
Overrides the environment variables of a process builder.
|
boolean |
supportsPosix(InputStream in)
Indicates if the operating system supports POSIX attributes.
|
String |
toString() |
public final Platform.OperatingSystem operatingSystem
public final Platform.Architecture architecture
public static Platform detected()
public static String getDetectionProperties()
public boolean isDownloadAvailable()
public String getClassifier()
UnsupportedOperationException - if CMake's website
does not provide binaries for this platformpublic Path getExecutableOnPath(String filename, String path) throws FileNotFoundException
filename - the filename of a binarypath - the PATH environment variableNullPointerException - if any of the arguments are nullFileNotFoundException - if the binary could not be foundpublic String getExecutableSuffix()
UnsupportedOperationException - if CMake's website
does not provide binaries for this platformpublic String getDownloadSuffix()
UnsupportedOperationException - if CMake's website
does not provide binaries for this platformpublic boolean supportsPosix(InputStream in)
in - the InputStream associated with the archiveUnsupportedOperationException - if CMake's website
does not provide binaries for this platformpublic String getEnvironment(ProcessBuilder processBuilder, String name)
ProcessBuilder's environment variable.processBuilder - a ProcessBuildername - an environment variablepublic void overrideEnvironmentVariables(Map<String,String> source, ProcessBuilder target)
source - new environment variablestarget - existing environment variablesNullPointerException - if any of the arguments are nullCopyright © 2023. All rights reserved.