oshi.hardware.platform.mac.MacHardwareAbstractionLayer Maven / Gradle / Ivy
package oshi.hardware.platform.mac;
import oshi.hardware.*;
import oshi.hardware.common.AbstractHardwareAbstractionLayer;
/**
* @author angju
*
*/
public class MacHardwareAbstractionLayer extends AbstractHardwareAbstractionLayer {
private static final long serialVersionUID = 1L;
/**
* {@inheritDoc}
*/
@Override
public ComputerSystem getComputerSystem() {
if (this.computerSystem == null) {
this.computerSystem = new MacComputerSystem();
}
return this.computerSystem;
}
/**
* {@inheritDoc}
*/
@Override
public CentralProcessor getProcessor() {
if (this.processor == null) {
this.processor = new MacCentralProcessor();
}
return this.processor;
}
/**
* {@inheritDoc}
*/
@Override
public GlobalMemory getMemory() {
if (this.memory == null) {
this.memory = new MacGlobalMemory();
}
return this.memory;
}
/**
* {@inheritDoc}
*/
@Override
public PowerSource[] getPowerSources() {
return MacPowerSource.getPowerSources();
}
/**
* {@inheritDoc}
*/
@Override
public HWDiskStore[] getDiskStores() {
return new MacDisks().getDisks();
}
/**
* {@inheritDoc}
*/
@Override
public Display[] getDisplays() {
return MacDisplay.getDisplays();
}
/**
* {@inheritDoc}
*/
@Override
public Sensors getSensors() {
if (this.sensors == null) {
this.sensors = new MacSensors();
}
return this.sensors;
}
/**
* {@inheritDoc}
*/
@Override
public NetworkIF[] getNetworkIFs() {
return new MacNetworks().getNetworks();
}
/**
* {@inheritDoc}
*/
@Override
public UsbDevice[] getUsbDevices(boolean tree) {
return MacUsbDevice.getUsbDevices(tree);
}
}