HHH-8816 - Unable to instantiate AttributeConverter: root cause of exception hidden

This commit is contained in:
Steve Ebersole 2014-03-20 11:28:43 -05:00
parent 9d0af62385
commit 414a0fbb24
1 changed files with 8 additions and 0 deletions

View File

@ -106,6 +106,7 @@ public class MetadataSources {
private LinkedHashSet<Class<?>> annotatedClasses = new LinkedHashSet<Class<?>>();
private LinkedHashSet<String> annotatedClassNames = new LinkedHashSet<String>();
private LinkedHashSet<String> annotatedPackages = new LinkedHashSet<String>();
private List<Class<? extends AttributeConverter>> converterClasses;
private boolean hasOrmXmlJaxbRoots;
@ -298,6 +299,13 @@ public class MetadataSources {
return this;
}
/**
* Adds an AttributeConverter by class.
*
* @param converterClass The AttributeConverter class.
*
* @return this (for method chaining purposes)
*/
public MetadataSources addAttributeConverter(Class<? extends AttributeConverter> converterClass) {
if ( converterClasses == null ) {
converterClasses = new ArrayList<Class<? extends AttributeConverter>>();