com.github.cameltooling.lsp.internal.telemetry.OS Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of camel-lsp-server Show documentation
Show all versions of camel-lsp-server Show documentation
Server Implementation of the Language Server Protocol for Apache Camel
package com.github.cameltooling.lsp.internal.telemetry;
/**
* OS information
*
* Mostly duplicated from Eclipse Lemminx, the xml language server
*/
public class OS {
private final String name;
private final String version;
private final String arch;
private final boolean isWindows;
public OS() {
this.name = Platform.getSystemProperty("os.name");
this.version = Platform.getSystemProperty("os.version");
this.arch = Platform.getSystemProperty("os.arch");
isWindows = name != null && name.toLowerCase().contains("win");
}
/**
* Returns the OS name.
*
* @return the OS name.
*/
public String getName() {
return name;
}
/**
* Returns the OS version.
*
* @return the OS version.
*/
public String getVersion() {
return version;
}
/**
* Returns the OS arch.
*
* @return the OS arch.
*/
public String getArch() {
return arch;
}
/**
* Returns true if the operating system is Windows and false otherwise
*
* @return true if the operating system is Windows and false otherwise
*/
public boolean isWindows() {
return isWindows;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy