@SuppressWarnings("unchecked")
void setSender(MidiSender midiSenderSpec, ISender sender) {
midiSenderSpec.setSenderClass(sender.getClass().getName());
if (sender instanceof AbstractSender) {
AbstractSender aSender = (AbstractSender) sender;
PropertySpec property = midiSenderSpec.addNewProperty();
property.setName("offset");
property.setValue(Integer.toString(aSender.getOffset()));
} else {
try {
Map<String, String> map =
BeanUtilsBean.getInstance().describe(sender);
Iterator<Entry<String, String>> iterator =