ClassLoader tmp = type.getClassLoader();
Injector injector;
// If the component belongs to a plugin, then use the plugin's injector
if (tmp instanceof PluginClassLoader) {
PluginClassLoader cl = (PluginClassLoader)tmp;
injector = container.injector(cl.getPlugin());
}
else {
// Use the root injector if we did not load from a plugin
injector = ((SmoothieContainerImpl)container).rootInjector();
}