Search in sources :

Example 1 with ExtensionModule

use of org.hudsonci.inject.internal.extension.ExtensionModule in project hudson-2.x by hudson.

the class SmoothieContainerBootstrap method bootstrap.

public SmoothieContainer bootstrap(final ClassLoader classLoader, final Class... types) {
    log.info("Bootstrapping Smoothie");
    // Build the root space for the given types
    ClassSpace space = new ClassSpaceFactory().create(classLoader, types);
    // Start up the container
    SmoothieContainer container = new SmoothieContainerImpl(new ExtensionModule(space, true));
    Smoothie.setContainer(container);
    // Enable aspect-based injection
    InjectomaticAspectHelper.setEnabled(true);
    return container;
}
Also used : ClassSpace(org.sonatype.guice.bean.reflect.ClassSpace) SmoothieContainer(org.hudsonci.inject.SmoothieContainer) ExtensionModule(org.hudsonci.inject.internal.extension.ExtensionModule)

Aggregations

SmoothieContainer (org.hudsonci.inject.SmoothieContainer)1 ExtensionModule (org.hudsonci.inject.internal.extension.ExtensionModule)1 ClassSpace (org.sonatype.guice.bean.reflect.ClassSpace)1