Search in sources :

Example 1 with GinScope

use of com.google.gwt.inject.rebind.GinScope in project google-gin by gwtplus.

the class ReachabilityAnalyzer method doTraceEagerSingletons.

private void doTraceEagerSingletons(GinjectorBindings bindings) {
    for (Map.Entry<Key<?>, Binding> entry : bindings.getBindings()) {
        Key<?> key = entry.getKey();
        Binding binding = entry.getValue();
        GinScope scope = bindings.determineScope(key);
        if (scope == GinScope.EAGER_SINGLETON) {
            PrettyPrinter.log(logger, TreeLogger.DEBUG, "ROOT -> %s:%s [eager singleton: %s]", bindings, key, binding);
            traceKey(key, bindings);
        }
    }
    for (GinjectorBindings child : bindings.getChildren()) {
        doTraceEagerSingletons(child);
    }
}
Also used : ExposedChildBinding(com.google.gwt.inject.rebind.binding.ExposedChildBinding) Binding(com.google.gwt.inject.rebind.binding.Binding) ParentBinding(com.google.gwt.inject.rebind.binding.ParentBinding) GinjectorBindings(com.google.gwt.inject.rebind.GinjectorBindings) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map) Key(com.google.inject.Key) GinScope(com.google.gwt.inject.rebind.GinScope)

Aggregations

GinScope (com.google.gwt.inject.rebind.GinScope)1 GinjectorBindings (com.google.gwt.inject.rebind.GinjectorBindings)1 Binding (com.google.gwt.inject.rebind.binding.Binding)1 ExposedChildBinding (com.google.gwt.inject.rebind.binding.ExposedChildBinding)1 ParentBinding (com.google.gwt.inject.rebind.binding.ParentBinding)1 Key (com.google.inject.Key)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1