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 StringADAMS_STARTUPthe key for the ADAMS startup time.static StringENV_PREFIXthe environment prefix.static StringJVM_PIDthe key for the JVM PID.protected Map<String,String>m_Infothe hashtable containing the information.static StringMEMORY_PREFIXthe memory prefix.static StringMODULE_PREFIXthe module prefix.static StringNUM_CORESthe key for the # cores.static StringOS_BITNESSthe key for the OS bitness.static StringOS_ISANDROIDthe key for the is android?.static StringOS_ISLINUXthe key for the is linux?.static StringOS_ISMACthe key for the is mac?.static StringOS_ISWINDOWSthe key for the is windows?.static StringPLACEHOLDER_PREFIXthe placeholder prefix.static StringPROJECT_PREFIXthe project prefix.static StringUSER_GIDthe key for the user's group ID (*nix only).static StringUSER_UIDthe 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 voidinitialize()Gathers the system info.static voidmain(String[] args)Outputs the system info in the console.SpreadSheettoSpreadSheet()Returns the content as spreadsheet.StringtoString()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:
toSpreadSheetin interfaceSpreadSheetSupporter- Returns:
- the content
-
-