.singleton("objectclass"));
Attribute oc = attributes.get("objectclass");
if (oc == null) {
// No object classes.
throw new DefinitionDecodingException(d, Reason.NO_TYPE_INFORMATION);
}
final Set<String> objectClasses = new HashSet<String>();
NamingEnumeration<?> values = oc.getAll();
while (values.hasMore()) {
Object value = values.next();
if (value != null) {
objectClasses.add(value.toString().toLowerCase().trim());
}
}
if (objectClasses.isEmpty()) {
// No object classes.
throw new DefinitionDecodingException(d, Reason.NO_TYPE_INFORMATION);
}
// Resolve the appropriate sub-type based on the object classes.
DefinitionResolver resolver = new DefinitionResolver() {