|
@@ -77,13 +77,15 @@ public class MapperEntityFactory implements EntityFactory {
|
|
String simpleClassName = beanClass.getPackage().getName().concat(".Simple").concat(beanClass.getSimpleName());
|
|
String simpleClassName = beanClass.getPackage().getName().concat(".Simple").concat(beanClass.getSimpleName());
|
|
try {
|
|
try {
|
|
realType = (Class<T>) Class.forName(simpleClassName);
|
|
realType = (Class<T>) Class.forName(simpleClassName);
|
|
- mapper = new Mapper<>(realType, new DefaultInstanceGetter(realType));
|
|
|
|
- realTypeMapper.put(beanClass, mapper);
|
|
|
|
- return mapper.getInstanceGetter().get();
|
|
|
|
} catch (ClassNotFoundException e) {
|
|
} catch (ClassNotFoundException e) {
|
|
throw new NotFoundException(e.getMessage());
|
|
throw new NotFoundException(e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (realType != null) {
|
|
|
|
+ mapper = new Mapper<>(realType, new DefaultInstanceGetter(realType));
|
|
|
|
+ realTypeMapper.put(beanClass, mapper);
|
|
|
|
+ return mapper.getInstanceGetter().get();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
throw new NotFoundException("can't create instance for " + beanClass);
|
|
throw new NotFoundException("can't create instance for " + beanClass);
|
|
}
|
|
}
|