Examples of failIfNotPresent()


Examples of org.dcm4che3.conf.api.generic.ConfigField.failIfNotPresent()

            if (customRep != null) {
                try {
                    Object value = customRep.read(config, reader, classField);
                    cnode.put(fieldAnno.name(), value);
                } catch (ConfigurationNotFoundException e) {
                    if (fieldAnno.failIfNotPresent()) throw e;
                }
            } else
                throw new ConfigurationException("Corresponding 'reader' was not found for field " + fieldAnno.name());
        }
View Full Code Here

Examples of org.dcm4che3.conf.api.generic.ConfigField.failIfNotPresent()

            if (customRep != null) {
                try {
                    Object value = customRep.deserialize(serialized.get(fieldAnno.name()), config, classField);

                    // set using a setter, exception is when failIfNotPresent is false and there were no value
                    if (value != null || fieldAnno.failIfNotPresent())
                        PropertyUtils.setSimpleProperty(confObj, classField.getName(), value);
                } catch (Exception e) {
                    throw new ConfigurationException("Error while reading configuration field " + fieldAnno.name(), e);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.