} catch (InvocationTargetException ite) {
throw makeException(ite.getCause().getMessage(), ite.getCause(), def);
}
loggingService.incrementNum("JavaCallCount");
}
ValueProvider vp;
if (def != null) {
TypeDef typeDef = def.getType(part);
vp = (ret instanceof ValueProvider) ? (ValueProvider) ret : (ValueProvider) typeDef.wrap(ret);
} else {
vp = (ret instanceof ValueProvider) ? (ValueProvider) ret : new JavaValueProvider(ret);
}
if (stem != null) {
ret = vp.getValue(stem);
}
} catch (AuraRuntimeException lre) {
throw lre;
} catch (Exception e) {
throw makeException(e.getMessage(), e, def);