Class SystemInfo
java.lang.Object
oshi.SystemInfo
System information. This is the main entry point to OSHI.
This object provides getters which instantiate the appropriate platform-specific implementations of
OperatingSystem (software) and HardwareAbstractionLayer (hardware).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final PlatformEnumprivate final Supplier<HardwareAbstractionLayer> private static final Stringprivate final Supplier<OperatingSystem> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static HardwareAbstractionLayerprivate static OperatingSystemstatic PlatformEnumGets thePlatformEnumvalue representing this system.Creates a new instance of the appropriate platform-specificHardwareAbstractionLayer.Creates a new instance of the appropriate platform-specificOperatingSystem.
-
Field Details
-
CURRENT_PLATFORM
-
NOT_SUPPORTED
- See Also:
-
os
-
hardware
-
-
Constructor Details
-
SystemInfo
public SystemInfo()Create a new instance ofSystemInfo. This is the main entry point to OSHI and provides access to cross-platform code.Platform-specific Hardware and Software objects are retrieved via memoized suppliers. To conserve memory at the cost of additional processing time, create a new version of SystemInfo() for subsequent calls. To conserve processing time at the cost of additional memory usage, re-use the same
SystemInfoobject for future queries.
-
-
Method Details
-
getCurrentPlatform
Gets thePlatformEnumvalue representing this system.- Returns:
- Returns the current platform
-
getOperatingSystem
Creates a new instance of the appropriate platform-specificOperatingSystem.- Returns:
- A new instance of
OperatingSystem.
-
createOperatingSystem
-
getHardware
Creates a new instance of the appropriate platform-specificHardwareAbstractionLayer.- Returns:
- A new instance of
HardwareAbstractionLayer.
-
createHardware
-