Examples of ConfigField


Examples of org.dcm4che3.conf.api.generic.ConfigField

            metadata.put("type", "Integer");
        }

        @Override
        public Integer read(ReflectiveConfig config, ConfigReader reader, Field field) throws ConfigurationException {
            ConfigField fieldAnno = field.getAnnotation(ConfigField.class);
            return reader.asInt(fieldAnno.name(), (fieldAnno.def().equals("N/A") ? "0" : fieldAnno.def()));
        }
View Full Code Here

Examples of org.dcm4che3.conf.api.generic.ConfigField

            metadata.put("type", "Boolean");
        }

        @Override
        public Boolean read(ReflectiveConfig config, ConfigReader reader, Field field) throws ConfigurationException {
            ConfigField fieldAnno = field.getAnnotation(ConfigField.class);
            return reader.asBoolean(fieldAnno.name(), (fieldAnno.def().equals("N/A") ? "false" : fieldAnno.def()));
        }
View Full Code Here

Examples of org.dcm4che3.conf.api.generic.ConfigField

            return false;
        }

        @Override
        public Object read(ReflectiveConfig config, ConfigReader reader, Field field) throws ConfigurationException {
            ConfigField fieldAnno = field.getAnnotation(ConfigField.class);

            if (String.class.isAssignableFrom(field.getType().getComponentType()))
                return reader.asStringArray(fieldAnno.name());
            else if (int.class.isAssignableFrom(field.getType().getComponentType()))
                return reader.asIntArray(fieldAnno.name());
            else if (Code.class.isAssignableFrom(field.getType().getComponentType()))
                return reader.asCodeArray(fieldAnno.name());
            else
                return null;
        }
View Full Code Here

Examples of org.dcm4che3.conf.api.generic.ConfigField

        // figure out the class of declared generic parameter
        Class clazz = (Class) ptypes[1];

        Attributes attrs = new BasicAttributes(true);
        ConfigField fieldAnno = field.getAnnotation(ConfigField.class);
        ConfigClass classAnno = (ConfigClass) clazz.getAnnotation(ConfigClass.class);

        if (classAnno != null) {
            attrs.put("objectClass", classAnno.objectClass());
        } else if (!fieldAnno.mapElementObjectClass().equals("")) {
            attrs.put("objectClass", fieldAnno.mapElementObjectClass());
        } else
            throw new ConfigurationException("objectClass for collection element cannot be resolved, key (" + keyName + " - " + keyValue
                    + ")");

        return new LdapConfigIO(attrs, getCollectionElementDn(keyName, keyValue), config);
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.