use of org.hibernate.boot.jaxb.mapping.spi.JaxbMapKeyClass in project hibernate-orm by hibernate.
the class JPAXMLOverriddenAnnotationReader method getMapKeyClass.
private void getMapKeyClass(List<Annotation> annotationList, JaxbMapKeyClass element, XMLContext.Default defaults) {
String nodeName = "map-key-class";
if (element != null) {
String mapKeyClassName = element.getClazz();
AnnotationDescriptor ad = new AnnotationDescriptor(MapKeyClass.class);
if (StringHelper.isNotEmpty(mapKeyClassName)) {
Class clazz;
try {
clazz = classLoaderAccess.classForName(XMLContext.buildSafeClassName(mapKeyClassName, defaults));
} catch (ClassLoadingException e) {
throw new AnnotationException("Unable to find " + nodeName + ": " + mapKeyClassName, e);
}
ad.setValue("value", clazz);
}
annotationList.add(AnnotationFactory.create(ad));
}
}
Aggregations