From: Joe E. <jo...@em...> - 2005-03-04 20:15:53
|
Rib Rdb wrote: >Maybe instead of having a ClassName field, DeviceDescriptor should >have a createDevice(Preferences) method. > Ick. I don't really like Preferences much. >That way the XML driver (and >any other future driver that supports multiple devices) doesn't have >to abuse class names or use some other sort of hack. > I'm not sure what you mean by "abuse" class names. >At the moment I >can't think of a good way to get a DeviceDescriptor from a Java >driver, > My initial thoughts would be that the drivers would have something like: public DeviceDescriptors[] getDeviceDescriptors() Since most of the data items in a descriptor are already fields in the device classes anyway, we could probably just add this method to the Device superclass and be 95% of the way there. - Joe |