| Modifier and Type | Field and Description |
|---|---|
| public static final List | ANDROID_DETECTION_PROPERTIES
System properties consulted in order to detect |
| private static final AtomicReference | |
| public static final String | ANDROID_MODE_OVERRIDE_PROP
Property that can be used to override the reported value from |
| public static final Predicate | |
| private static final AtomicReference | |
| public static final String | CURRENT_USER_OVERRIDE_PROP
Property that can be used to override the reported value from |
| private static final AtomicReference | |
| public static final List | DALVIK_DETECTION_PROPERTIES
System properties consulted in order to detect |
| private static final AtomicReference | |
| public static final String | DALVIK_MACHINE_OVERRIDE_PROP
Property that can be used to override the reported value from |
| public static final Predicate | |
| private static final AtomicReference | |
| public static final String | JAVA_VERSION_OVERRIDE_PROP
Property that can be used to override the reported value from |
| public static final List | |
| public static final String | |
| private static final AtomicReference | |
| public static final String | OS_TYPE_OVERRIDE_PROP
Property that can be used to override the reported value from |
| public static final String | |
| public static final List | |
| public static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: The canonical user - unchanged ifUnix O/SThe original username - ignored if user)null/emptyRemove |
| public static String | Returns: A path that can be compared with another one where case sensitivity of the underlying O/S has been taken into account - nevernullThe original path path)
|
| public static String | |
| public static Path | |
| public static VersionInfo | |
| private static String | |
| public static boolean | |
| public static boolean | Returns: true if currently running on a Dalvik machine. Note: isUNIX() and/or
isAndroid() are also probably true as well, so special care must be taken in code that
consults these values
|
| public static boolean | |
| public static boolean | Returns: true if the host is a UNIX system (and not Windows). Note: this does not precludeisAndroid() or isDalvikMachine() from being true as well.
|
| public static boolean | |
| private static boolean | resolveAndroidSettingFlag(AtomicReference<Boolean> flagHolder, String overrideProp, Collection<String> detectionProps, Predicate<? super String> detector)
|
| public static String | Returns: The canonical group nameThe original group name - used if not group, String null/emptyThe owner name - sometimes it contains a group name user)Attempts to resolve canonical group name for |
| public static List | |
| public static List | |
| public static String | |
| public static String | |
| public static void | setAndroid(Boolean
Value to set if value)null then value is auto-detectedOverride the value returned by |
| public static void | setCurrentUser(String
The username to set - if username)null then CURRENT_USER_OVERRIDE_PROP will be consultedCan be used to programmatically set the username reported by |
| public static void | setCurrentWorkingDirectoryResolver(Supplier<? extends Path> cwdProvider)
Allows the user to "plug-in" a resolver for the |
| public static void | setDalvikMachine(Boolean
Value to set if value)null then value is auto-detectedOverride the value returned by |
| public static void | setJavaVersion(VersionInfo
The version - if version)null then it will be automatically resolvedSet programmatically the reported Java version |
| public static void |
| ANDROID_DETECTION_PROPERTIES | back to summary |
|---|---|
| public static final List<String> ANDROID_DETECTION_PROPERTIES System properties consulted in order to detect
| |
| ANDROID_HOLDER | back to summary |
|---|---|
| private static final AtomicReference<Boolean> ANDROID_HOLDER | |
| ANDROID_MODE_OVERRIDE_PROP | back to summary |
|---|---|
| public static final String ANDROID_MODE_OVERRIDE_PROP Property that can be used to override the reported value from
| |
| ANDROID_PROPERTY_VALUE_MATCHER | back to summary |
|---|---|
| public static final Predicate<String> ANDROID_PROPERTY_VALUE_MATCHER | |
| CURRENT_USER_HOLDER | back to summary |
|---|---|
| private static final AtomicReference<String> CURRENT_USER_HOLDER | |
| CURRENT_USER_OVERRIDE_PROP | back to summary |
|---|---|
| public static final String CURRENT_USER_OVERRIDE_PROP Property that can be used to override the reported value from | |
| CWD_PROVIDER_HOLDER | back to summary |
|---|---|
| private static final AtomicReference<Supplier<? extends Path>> CWD_PROVIDER_HOLDER | |
| DALVIK_DETECTION_PROPERTIES | back to summary |
|---|---|
| public static final List<String> DALVIK_DETECTION_PROPERTIES System properties consulted in order to detect
| |
| DALVIK_HOLDER | back to summary |
|---|---|
| private static final AtomicReference<Boolean> DALVIK_HOLDER | |
| DALVIK_MACHINE_OVERRIDE_PROP | back to summary |
|---|---|
| public static final String DALVIK_MACHINE_OVERRIDE_PROP Property that can be used to override the reported value from | |
| DALVIK_PROPERTY_VALUE_MATCHER | back to summary |
|---|---|
| public static final Predicate<String> DALVIK_PROPERTY_VALUE_MATCHER | |
| JAVA_VERSION_HOLDER | back to summary |
|---|---|
| private static final AtomicReference<VersionInfo> JAVA_VERSION_HOLDER | |
| JAVA_VERSION_OVERRIDE_PROP | back to summary |
|---|---|
| public static final String JAVA_VERSION_OVERRIDE_PROP Property that can be used to override the reported value from | |
| LINUX_COMMAND | back to summary |
|---|---|
| public static final List<String> LINUX_COMMAND | |
| LINUX_SHELL_COMMAND_NAME | back to summary |
|---|---|
| public static final String LINUX_SHELL_COMMAND_NAME | |
| OS_TYPE_HOLDER | back to summary |
|---|---|
| private static final AtomicReference<String> OS_TYPE_HOLDER | |
| OS_TYPE_OVERRIDE_PROP | back to summary |
|---|---|
| public static final String OS_TYPE_OVERRIDE_PROP Property that can be used to override the reported value from | |
| ROOT_USER | back to summary |
|---|---|
| public static final String ROOT_USER | |
| WINDOWS_COMMAND | back to summary |
|---|---|
| public static final List<String> WINDOWS_COMMAND | |
| WINDOWS_SHELL_COMMAND_NAME | back to summary |
|---|---|
| public static final String WINDOWS_SHELL_COMMAND_NAME | |
| OsUtils | back to summary |
|---|---|
| private OsUtils() | |
| getCanonicalUser | back to summary |
|---|---|
| public static String getCanonicalUser(String user) Remove | |
| getComparablePath | back to summary |
|---|---|
| public static String getComparablePath(String path) | |
| getCurrentUser | back to summary |
|---|---|
| public static String getCurrentUser() Get current user name
| |
| getCurrentWorkingDirectory | back to summary |
|---|---|
public static Path getCurrentWorkingDirectory()
| |
| getJavaVersion | back to summary |
|---|---|
| public static VersionInfo getJavaVersion() Resolves the reported Java version by consulting
| |
| getOS | back to summary |
|---|---|
private static String getOS()
| |
| isAndroid | back to summary |
|---|---|
public static boolean isAndroid()
| |
| isDalvikMachine | back to summary |
|---|---|
public static boolean isDalvikMachine()
| |
| isOSX | back to summary |
|---|---|
public static boolean isOSX()
| |
| isUNIX | back to summary |
|---|---|
public static boolean isUNIX()
| |
| isWin32 | back to summary |
|---|---|
public static boolean isWin32()
| |
| resolveAndroidSettingFlag | back to summary |
|---|---|
| private static boolean resolveAndroidSettingFlag(AtomicReference<Boolean> flagHolder, String overrideProp, Collection<String> detectionProps, Predicate<? super String> detector) | |
| resolveCanonicalGroup | back to summary |
|---|---|
| public static String resolveCanonicalGroup(String group, String user) Attempts to resolve canonical group name for | |
| resolveDefaultInteractiveCommandElements | back to summary |
|---|---|
| public static List | |
| resolveDefaultInteractiveCommandElements | back to summary |
|---|---|
| public static List | |
| resolveDefaultInteractiveShellCommand | back to summary |
|---|---|
| public static String resolveDefaultInteractiveShellCommand() | |
| resolveDefaultInteractiveShellCommand | back to summary |
|---|---|
| public static String resolveDefaultInteractiveShellCommand(boolean winOS) | |
| setAndroid | back to summary |
|---|---|
| public static void setAndroid(Boolean value) Override the value returned by
| |
| setCurrentUser | back to summary |
|---|---|
| public static void setCurrentUser(String username) Can be used to programmatically set the username reported by
| |
| setCurrentWorkingDirectoryResolver | back to summary |
|---|---|
| public static void setCurrentWorkingDirectoryResolver(Supplier<? extends Path> cwdProvider) Allows the user to "plug-in" a resolver for the | |
| setDalvikMachine | back to summary |
|---|---|
| public static void setDalvikMachine(Boolean value) Override the value returned by
| |
| setJavaVersion | back to summary |
|---|---|
| public static void setJavaVersion(VersionInfo version) Set programmatically the reported Java version
| |
| setOS | back to summary |
|---|---|
| public static void setOS(String os) Can be used to enforce Win32 or Linux report from | |