public class SystemInformationImpl extends Object implements SystemInformation
SystemInformation
interface.Modifier and Type | Field and Description |
---|---|
private boolean |
limitedDevice |
private String |
systemArchitecture |
private String |
systemName |
private String |
systemType |
private String |
systemVersion |
SYSTEM_TYPE_BSD, SYSTEM_TYPE_LINUX, SYSTEM_TYPE_MAC_IOS, SYSTEM_TYPE_MAINFRAIME, SYSTEM_TYPE_OTHER, SYSTEM_TYPE_UNIX, SYSTEM_TYPE_WINDOWS
Constructor and Description |
---|
SystemInformationImpl()
The constructor.
|
SystemInformationImpl(String systemName,
String systemVersion,
String systemArchitecture)
The constructor.
|
SystemInformationImpl(String systemName,
String systemVersion,
String systemArchitecture,
String systemType,
boolean mobileDevice)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
private static boolean |
detectLimitedDevice(String osName,
String osArchitecture,
boolean currentSystem) |
private static String |
detectSystemType(String osName,
boolean currentSystem) |
String |
getSystemArchitecture()
This method gets the architecture of the operating system running this java virtual machine.
|
String |
getSystemName()
This method gets the name of the operating system running this java virtual machine.
|
String |
getSystemType()
This method gets the type of the operating system running this java virtual machine.
|
String |
getSystemVersion()
This method gets the version of the operating system running this java virtual machine in lower-case.
|
boolean |
isLimitedDevice()
This method determines if the operating system running this java virtual machine is for mobile or
embedded devices or maybe tablets but not for full-fledged PC or server machines.
|
private final String systemName
getSystemName()
private final String systemVersion
getSystemVersion()
private final String systemArchitecture
getSystemArchitecture()
private final String systemType
getSystemType()
private final boolean limitedDevice
isLimitedDevice()
public SystemInformationImpl()
public SystemInformationImpl(String systemName, String systemVersion, String systemArchitecture)
systemName
- - see getSystemName()
.systemVersion
- - see getSystemVersion()
.systemArchitecture
- - see getSystemArchitecture()
.public SystemInformationImpl(String systemName, String systemVersion, String systemArchitecture, String systemType, boolean mobileDevice)
systemName
- - see getSystemName()
.systemVersion
- - see getSystemVersion()
.systemArchitecture
- - see getSystemArchitecture()
.systemType
- - see getSystemType()
.mobileDevice
- - see isLimitedDevice()
.private static String detectSystemType(String osName, boolean currentSystem)
osName
- - see getSystemName()
.currentSystem
- - true
if the value should be determined for the system and JVM
currently running (in this case additional system-properties might be evaluated),
false
otherwise.isLimitedDevice()
.getSystemType()
private static boolean detectLimitedDevice(String osName, String osArchitecture, boolean currentSystem)
osName
- - see getSystemName()
.osArchitecture
- - see getSystemArchitecture()
.currentSystem
- - true
if the value should be determined for the system and JVM
currently running (in this case additional system-properties might be evaluated),
false
otherwise.isLimitedDevice()
.isLimitedDevice()
public String getSystemName()
getSystemName
in interface SystemInformation
SystemUtil.PROPERTY_OS_NAME
public String getSystemArchitecture()
getSystemArchitecture
in interface SystemInformation
SystemUtil.PROPERTY_OS_NAME
public String getSystemVersion()
getSystemVersion
in interface SystemInformation
SystemUtil.PROPERTY_OS_VERSION
public String getSystemType()
system-name
to make things easier for you.getSystemType
in interface SystemInformation
SYSTEM_TYPE_*
constants defined in
this interface.SystemInformation.SYSTEM_TYPE_WINDOWS
,
SystemInformation.SYSTEM_TYPE_MAC_IOS
,
SystemInformation.SYSTEM_TYPE_LINUX
,
SystemInformation.SYSTEM_TYPE_BSD
,
SystemInformation.SYSTEM_TYPE_UNIX
,
SystemInformation.SYSTEM_TYPE_OTHER
public boolean isLimitedDevice()
isLimitedDevice
in interface SystemInformation
true
if operating system is for limited device, false
otherwise.Copyright © 2001–2014 mmm-Team. All rights reserved.