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
+ ")");