Add toString methods
This commit is contained in:
parent
f3ae3337d5
commit
ad87ef7c19
@ -235,4 +235,14 @@ public final class Usb4JavaConfiguration implements UsbConfiguration
|
||||
if (iConfiguration == 0) return null;
|
||||
return this.device.getString(iConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("USB configuration %02x",
|
||||
this.descriptor.bConfigurationValue());
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,4 +89,14 @@ public final class Usb4JavaEndpoint implements UsbEndpoint
|
||||
{
|
||||
return this.pipe;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("USB endpoint %02x",
|
||||
this.descriptor.bEndpointAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@ -295,4 +295,14 @@ public final class Usb4JavaInterface implements UsbInterface
|
||||
if (iInterface == 0) return null;
|
||||
return this.configuration.getUsbDevice().getString(iInterface);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("USB interface %02x",
|
||||
this.descriptor.bInterfaceNumber());
|
||||
}
|
||||
}
|
||||
|
||||
@ -340,4 +340,14 @@ public final class Usb4JavaPipe implements UsbPipe
|
||||
this.listeners.dataEventOccurred(new UsbPipeDataEvent(this, irp));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("USB pipe of endpoint %02x",
|
||||
this.endpoint.getUsbEndpointDescriptor().bEndpointAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@ -341,4 +341,14 @@ public final class VirtualRootHub implements UsbHub,
|
||||
{
|
||||
this.ports.disconnectUsbDevice(device);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return this.getManufacturerString() + " " + this.getProductString() +
|
||||
" " + this.getSerialNumberString();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user