Package adams.core
Class SystemInfo
- java.lang.Object
-
- adams.core.SystemInfo
-
- All Implemented Interfaces:
SpreadSheetSupporter
,Serializable
public class SystemInfo extends Object implements Serializable, SpreadSheetSupporter
Gathers information about system properties.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ADAMS_STARTUP
the key for the ADAMS startup time.static String
ENV_PREFIX
the environment prefix.static String
JVM_PID
the key for the JVM PID.protected Map<String,String>
m_Info
the hashtable containing the information.static String
MEMORY_PREFIX
the memory prefix.static String
MODULE_PREFIX
the module prefix.static String
NUM_CORES
the key for the # cores.static String
OS_BITNESS
the key for the OS bitness.static String
OS_ISANDROID
the key for the is android?.static String
OS_ISLINUX
the key for the is linux?.static String
OS_ISMAC
the key for the is mac?.static String
OS_ISWINDOWS
the key for the is windows?.static String
PLACEHOLDER_PREFIX
the placeholder prefix.static String
PROJECT_PREFIX
the project prefix.static String
USER_GID
the key for the user's group ID (*nix only).static String
USER_UID
the key for the user's ID (*nix only).
-
Constructor Summary
Constructors Constructor Description SystemInfo()
Initializes the object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getInfo()
Returns the gathered information.protected void
initialize()
Gathers the system info.static void
main(String[] args)
Outputs the system info in the console.SpreadSheet
toSpreadSheet()
Returns the content as spreadsheet.String
toString()
Returns a string representation of the gathered information.
-
-
-
Field Detail
-
JVM_PID
public static final String JVM_PID
the key for the JVM PID.- See Also:
- Constant Field Values
-
PROJECT_PREFIX
public static final String PROJECT_PREFIX
the project prefix.- See Also:
- Constant Field Values
-
PLACEHOLDER_PREFIX
public static final String PLACEHOLDER_PREFIX
the placeholder prefix.- See Also:
- Constant Field Values
-
MEMORY_PREFIX
public static final String MEMORY_PREFIX
the memory prefix.- See Also:
- Constant Field Values
-
NUM_CORES
public static final String NUM_CORES
the key for the # cores.- See Also:
- Constant Field Values
-
ENV_PREFIX
public static final String ENV_PREFIX
the environment prefix.- See Also:
- Constant Field Values
-
MODULE_PREFIX
public static final String MODULE_PREFIX
the module prefix.- See Also:
- Constant Field Values
-
ADAMS_STARTUP
public static final String ADAMS_STARTUP
the key for the ADAMS startup time.- See Also:
- Constant Field Values
-
OS_BITNESS
public static final String OS_BITNESS
the key for the OS bitness.- See Also:
- Constant Field Values
-
OS_ISWINDOWS
public static final String OS_ISWINDOWS
the key for the is windows?.- See Also:
- Constant Field Values
-
OS_ISMAC
public static final String OS_ISMAC
the key for the is mac?.- See Also:
- Constant Field Values
-
OS_ISLINUX
public static final String OS_ISLINUX
the key for the is linux?.- See Also:
- Constant Field Values
-
OS_ISANDROID
public static final String OS_ISANDROID
the key for the is android?.- See Also:
- Constant Field Values
-
USER_UID
public static final String USER_UID
the key for the user's ID (*nix only).- See Also:
- Constant Field Values
-
USER_GID
public static final String USER_GID
the key for the user's group ID (*nix only).- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
protected void initialize()
Gathers the system info.
-
getInfo
public Map<String,String> getInfo()
Returns the gathered information.- Returns:
- the information
-
toString
public String toString()
Returns a string representation of the gathered information.
-
toSpreadSheet
public SpreadSheet toSpreadSheet()
Returns the content as spreadsheet.- Specified by:
toSpreadSheet
in interfaceSpreadSheetSupporter
- Returns:
- the content
-
-