The next section of code displays the results of the
General
data class data returned in the
sysInfo
object:
print("GENERAL", sysInfo.getGeneral().getHostName()); print("GENERAL", sysInfo.getGeneral().getOsName()); print("GENERAL", sysInfo.getGeneral().getOsVersion()); print("GENERAL", sysInfo.getGeneral().getOsDistName()); print("GENERAL", sysInfo.getGeneral().getOsDistVersion()); print("GENERAL", sysInfo.getGeneral().getSystemModel()); print("GENERAL", sysInfo.getGeneral().getSystemManufacturerFull());
Each line passes a TypeString
object to the
print
method.
All SysInfo data class's consist of attributes.
Each attribute has a defined type.
Each defined type is self-describing. That is, it contains not just
a value but descriptive data like a description of what the value is and
a brief "label" value suitable for display.
We have choosen to report only attributes which are
of type TypeString
in this example.