
io.quarkus.info.runtime.OsInfoContributor Maven / Gradle / Ivy
package io.quarkus.info.runtime;
import java.util.LinkedHashMap;
import java.util.Map;
import io.quarkus.info.runtime.spi.InfoContributor;
public class OsInfoContributor implements InfoContributor {
@Override
public String name() {
return "os";
}
@Override
public Map data() {
Map result = new LinkedHashMap<>();
result.put("name", getName());
result.put("version", getVersion());
result.put("arch", getArchitecture());
return result;
}
static String getName() {
return System.getProperty("os.name");
}
static String getVersion() {
return System.getProperty("os.version");
}
static String getArchitecture() {
return System.getProperty("os.arch");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy