use of com.google.inject.internal.util.Stopwatch in project roboguice by roboguice.
the class RoboActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
stopwatch = new Stopwatch();
final RoboInjector injector = RoboGuice.getInjector(this);
stopwatch.resetAndLog("RoboActivity creation of injector");
eventManager = injector.getInstance(EventManager.class);
stopwatch.resetAndLog("RoboActivity creation of eventmanager");
injector.injectMembersWithoutViews(this);
stopwatch.resetAndLog("RoboActivity inject members without views");
super.onCreate(savedInstanceState);
stopwatch.resetAndLog("RoboActivity super onCreate");
eventManager.fire(new OnCreateEvent<Activity>(this, savedInstanceState));
stopwatch.resetAndLog("RoboActivity fire event");
}
use of com.google.inject.internal.util.Stopwatch in project roboguice by roboguice.
the class RoboGuice method getOrCreateBaseApplicationInjector.
/**
* Return the cached Injector instance for this application, or create a new one if necessary.
* <b>One of RoboGuice's entry points</b>.
*/
public static Injector getOrCreateBaseApplicationInjector(Application application, Stage stage) {
final Stopwatch stopwatch = new Stopwatch();
synchronized (RoboGuice.class) {
initializeAnnotationDatabaseFinderAndHierarchyTraversalFilterFactory(application);
final List<Module> modules = extractModulesFromManifest(application);
return createGuiceInjector(application, stage, stopwatch, modules.toArray(new Module[modules.size()]));
}
}
Aggregations