use of org.qi4j.api.common.ConstructionException in project qi4j-sdk by Qi4j.
the class Qi4jObjectFactory method createQi4jObject.
@SuppressWarnings("unchecked")
private Object createQi4jObject(Class aClass, boolean isAddToTypes) {
if (objectFactory == null) {
return null;
}
ConstructionException exception = null;
Object obj = null;
try {
obj = objectFactory.newObject(aClass);
} catch (NoSuchObjectException e) {
return null;
} catch (ConstructionException e) {
exception = e;
}
if (isAddToTypes) {
addToType(aClass, qi4jObject);
}
if (exception != null) {
throw exception;
}
return obj;
}
Aggregations