Package org.jsynthlib.xmldevice

Examples of org.jsynthlib.xmldevice.PropertySpec


                        BeanUtils.describe(patchNameSender);
                Iterator<Entry<String, String>> iterator =
                        description.entrySet().iterator();
                while (iterator.hasNext()) {
                    Entry<String, String> entry = iterator.next();
                    PropertySpec property = xmlSender.addNewProperty();
                    property.setName(entry.getKey());
                    property.setValue(entry.getValue());
                }
            } catch (InvocationTargetException e) {
                LOG.warn(e.getMessage(), e);
            } catch (NoSuchMethodException e) {
                LOG.warn(e.getMessage(), e);
View Full Code Here


    @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 =
                        map.entrySet().iterator();
                while (iterator.hasNext()) {
                    Entry<String, String> entry = iterator.next();
                    if (entry.getKey().equals("class")) {
                        continue;
                    }
                    PropertySpec propertySpec = midiSenderSpec.addNewProperty();
                    propertySpec.setName(entry.getKey());
                    propertySpec.setValue(entry.getValue());
                }
            } catch (IllegalAccessException e) {
                LOG.warn(e.getMessage(), e);
            } catch (InvocationTargetException e) {
                LOG.warn(e.getMessage(), e);
View Full Code Here

        Class<? extends IParamModel> class1 = paramModel.getClass();
        paramModelSpec.setModelClass(class1.getName());
        if (paramModel instanceof org.jsynthlib.device.model.ParamModel) {
            org.jsynthlib.device.model.ParamModel concreteParamModel =
                    (org.jsynthlib.device.model.ParamModel) paramModel;
            PropertySpec property = paramModelSpec.addNewProperty();
            property.setName("offset");
            property.setValue(Integer.toString(concreteParamModel.getOffset()));
        }
    }
View Full Code Here

TOP

Related Classes of org.jsynthlib.xmldevice.PropertySpec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.