PageRenderTime 104ms queryTime 58ms sortTime 1ms getByIdsTime 41ms findMatchingLines 66ms

100+ results results for 'com.google guice createinjector' (104 ms)

Not the results you expected?
MethodInterceptionTest.java https://gitlab.com/metamorphiccode/guice | Java | 369 lines
                    
67  public void testSharedProxyClasses() {
                    
68    Injector injector = Guice.createInjector(new AbstractModule() {
                    
69      protected void configure() {
                    
151    final MethodInterceptor returnNullInterceptor = new ReturnNullInterceptor();
                    
152    Injector injector = Guice.createInjector(new AbstractModule() {
                    
153      protected void configure() {
                    
203  public void testNotInterceptedMethodsInInterceptedClassDontAddFrames() {
                    
204    Injector injector = Guice.createInjector(new AbstractModule() {
                    
205      protected void configure() {
                    
256  public void testInterceptingNonBridgeWorks() {
                    
257    Injector injector = Guice.createInjector(new AbstractModule() {
                    
258      @Override
                    
317  public void testDeDuplicateInterceptors() throws Exception {
                    
318    Injector injector = Guice.createInjector(new AbstractModule() {
                    
319      @Override protected void configure() {
                    
                
Module.html https://github.com/jstrachan/guicey.git | HTML | 280 lines
                    
137<CODE>static&nbsp;<A HREF="../../../../com/google/inject/Injector.html" title="interface in com.google.inject">Injector</A></CODE></FONT></TD>
                    
138<TD><CODE><B>Guice.</B><B><A HREF="../../../../com/google/inject/Guice.html#createInjector(com.google.inject.Module...)">createInjector</A></B>(<A HREF="../../../../com/google/inject/Module.html" title="interface in com.google.inject">Module</A>...&nbsp;modules)</CODE>
                    
139
                    
145<CODE>static&nbsp;<A HREF="../../../../com/google/inject/Injector.html" title="interface in com.google.inject">Injector</A></CODE></FONT></TD>
                    
146<TD><CODE><B>Guice.</B><B><A HREF="../../../../com/google/inject/Guice.html#createInjector(com.google.inject.Stage, com.google.inject.Module...)">createInjector</A></B>(<A HREF="../../../../com/google/inject/Stage.html" title="enum in com.google.inject">Stage</A>&nbsp;stage,
                    
147               <A HREF="../../../../com/google/inject/Module.html" title="interface in com.google.inject">Module</A>...&nbsp;modules)</CODE>
                    
174<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
                    
175<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../com/google/inject/package-summary.html">com.google.inject</A> with type arguments of type <A HREF="../../../../com/google/inject/Module.html" title="interface in com.google.inject">Module</A></FONT></TH>
                    
176</TR>
                    
179<CODE>static&nbsp;<A HREF="../../../../com/google/inject/Injector.html" title="interface in com.google.inject">Injector</A></CODE></FONT></TD>
                    
180<TD><CODE><B>Guice.</B><B><A HREF="../../../../com/google/inject/Guice.html#createInjector(java.lang.Iterable)">createInjector</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;<A HREF="../../../../com/google/inject/Module.html" title="interface in com.google.inject">Module</A>&gt;&nbsp;modules)</CODE>
                    
181
                    
187<CODE>static&nbsp;<A HREF="../../../../com/google/inject/Injector.html" title="interface in com.google.inject">Injector</A></CODE></FONT></TD>
                    
188<TD><CODE><B>Guice.</B><B><A HREF="../../../../com/google/inject/Guice.html#createInjector(com.google.inject.Stage, java.lang.Iterable)">createInjector</A></B>(<A HREF="../../../../com/google/inject/Stage.html" title="enum in com.google.inject">Stage</A>&nbsp;stage,
                    
189               <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;<A HREF="../../../../com/google/inject/Module.html" title="interface in com.google.inject">Module</A>&gt;&nbsp;modules)</CODE>
                    
                
VAppHandlerTest.java https://github.com/dmitrib/jclouds.git | Java | 184 lines
                    
43
                    
44import com.google.common.collect.ImmutableListMultimap;
                    
45import com.google.common.collect.ImmutableSet;
                    
45import com.google.common.collect.ImmutableSet;
                    
46import com.google.common.collect.ListMultimap;
                    
47import com.google.inject.AbstractModule;
                    
47import com.google.inject.AbstractModule;
                    
48import com.google.inject.Guice;
                    
49import com.google.inject.name.Names;
                    
61   protected void setUpInjector() {
                    
62      injector = Guice.createInjector(new SaxParserModule(), new AbstractModule() {
                    
63
                    
                
CommaFeedApplication.java https://gitlab.com/gmi7/commafeed | Java | 174 lines
                    
48import com.commafeed.frontend.session.SessionHelperFactoryProvider;
                    
49import com.google.inject.Guice;
                    
50import com.google.inject.Injector;
                    
50import com.google.inject.Injector;
                    
51import com.google.inject.Key;
                    
52import com.google.inject.TypeLiteral;
                    
110		// guice init
                    
111		Injector injector = Guice.createInjector(new CommaFeedModule(hibernateBundle.getSessionFactory(), config, environment.metrics()));
                    
112
                    
                
ModuleAnnotatedMethodScannerTest.java https://gitlab.com/metamorphiccode/guice | Java | 394 lines
                    
62    };
                    
63    Injector injector = Guice.createInjector(module, NamedMunger.module());
                    
64
                    
248  public void testPrivateModuleInheritScanner_usingPrivateModule() {
                    
249    Injector injector = Guice.createInjector(NamedMunger.module(), new PrivateModule() {
                    
250      @Override protected void configure() {}
                    
259  public void testPrivateModule_skipSourcesWithinPrivateModule() {
                    
260    Injector injector = Guice.createInjector(NamedMunger.module(), new PrivateModule() {
                    
261      @Override protected void configure() {
                    
317  public void testPrivateModuleInheritScanner_skipSourcesFromPrivateBinder2() {
                    
318    Injector injector = Guice.createInjector(NamedMunger.module(), new AbstractModule() {
                    
319      @Override protected void configure() {
                    
332  public void testPrivateModuleScannersDontImpactSiblings_usingPrivateModule() {
                    
333    Injector injector = Guice.createInjector(new PrivateModule() {
                    
334      @Override protected void configure() {
                    
                
Util.java https://github.com/neville-agius/Jetwick.git | Java | 353 lines
                    
17
                    
18import com.google.inject.Guice;
                    
19import com.google.inject.Inject;
                    
19import com.google.inject.Inject;
                    
20import com.google.inject.Injector;
                    
21import com.google.inject.Module;
                    
21import com.google.inject.Module;
                    
22import com.google.inject.Provider;
                    
23import de.jetwick.config.Configuration;
                    
132        Module module = new DefaultModule();
                    
133        Guice.createInjector(module).injectMembers(this);
                    
134    }
                    
144        Module module = new DefaultModule();
                    
145        Injector injector = Guice.createInjector(module);
                    
146        Provider<RMIClient> rmiProvider = injector.getProvider(RMIClient.class);
                    
                
TestLifeCycleManager.java https://gitlab.com/github-cloud-corp/airlift | Java | 328 lines
                    
20import com.google.inject.CreationException;
                    
21import com.google.inject.Guice;
                    
22import com.google.inject.Injector;
                    
124        };
                    
125        Injector injector = Guice.createInjector(
                    
126                Stage.PRODUCTION,
                    
249    {
                    
250        Injector injector = Guice.createInjector(
                    
251                Stage.PRODUCTION,
                    
275    {
                    
276        Injector injector = Guice.createInjector(
                    
277                Stage.PRODUCTION,
                    
314        };
                    
315        Injector injector = Guice.createInjector(
                    
316                Stage.PRODUCTION,
                    
                
VAppHandlerTest.java https://github.com/dmitrib/jclouds.git | Java | 196 lines
                    
20
                    
21import static com.google.common.collect.Iterables.find;
                    
22import static org.testng.Assert.assertEquals;
                    
45
                    
46import com.google.common.collect.ImmutableList;
                    
47import com.google.common.collect.ImmutableSet;
                    
47import com.google.common.collect.ImmutableSet;
                    
48import com.google.common.collect.Iterables;
                    
49import com.google.common.collect.Lists;
                    
50import com.google.inject.AbstractModule;
                    
51import com.google.inject.Guice;
                    
52import com.google.inject.name.Names;
                    
65   protected void setUpInjector() {
                    
66      injector = Guice.createInjector(new SaxParserModule(), new AbstractModule() {
                    
67
                    
                
ParentInjectorTest.java https://gitlab.com/metamorphiccode/guice | Java | 331 lines
                    
93  public void testBindingsInherited() {
                    
94    Injector parent = Guice.createInjector(bindsB);
                    
95    Injector child = parent.createChildInjector();
                    
99  public void testGetParent() {
                    
100    Injector top = Guice.createInjector(bindsA);
                    
101    Injector middle = top.createChildInjector(bindsB);
                    
165  public void testTypeConvertersConflicting() {
                    
166    Injector parent = Guice.createInjector(bindListConverterModule);
                    
167    Injector child = parent.createChildInjector(bindListConverterModule, bindStringNamedB);
                    
177  public void testInjectorInjectionSpanningInjectors() {
                    
178    Injector parent = Guice.createInjector();
                    
179    Injector child = parent.createChildInjector(new AbstractModule() {
                    
253  public void testErrorInParentAndChild() {
                    
254    Injector parent = Guice.createInjector();
                    
255    Injector childInjector = parent.createChildInjector();
                    
                
LimeTestUtils.java https://github.com/WIZARDISHUNGRY/limewire.git | Java | 318 lines
                    
29import com.google.inject.AbstractModule;
                    
30import com.google.inject.Guice;
                    
31import com.google.inject.Injector;
                    
171    
                    
172    public static Injector createInjector(Stage stage, Class<? extends ActivityCallback> callbackClass, Module...modules) {
                    
173        Module combinedReplacements = Modules.combine(modules);
                    
175        Module replaced = Modules.override(combinedOriginals).with(combinedReplacements);
                    
176        return Guice.createInjector(stage, replaced);
                    
177    }
                    
179    /**
                    
180     * Wraps {@link #createInjector(Module, Class) createInjector(Module, ActivityCallbackStub.class)}.
                    
181     */
                    
208    /**
                    
209     * Wraps {@link #createInjectorAndStart(Module, Class) createInjectorAndStart(Module, ActivityCallbackStub.class)}.
                    
210     */
                    
                
ExceptionMeteredTest.java https://github.com/dinomite/metrics.git | Java | 387 lines
                    
2
                    
3import com.google.inject.Guice;
                    
4import com.google.inject.Injector;
                    
6import com.yammer.metrics.guice.ExceptionMetered;
                    
7import com.yammer.metrics.guice.InstrumentationModule;
                    
8
                    
26    public void setup() {
                    
27        Injector injector = Guice.createInjector(new InstrumentationModule());
                    
28        instance = injector.getInstance(InstrumentedWithExceptionMetered.class);
                    
235
                    
236        assertThat("Guice creates a meter with the given rate unit",
                    
237                   ((MeterMetric) metric).rateUnit(),
                    
260
                    
261        assertThat("Guice creates a metric",
                    
262                   errorMetric,
                    
                
LocalToJpaDataMigratorTest.java https://gitlab.com/unofficial-mirrors/eclipse-che | Java | 300 lines
                    
12
                    
13import com.google.common.collect.ImmutableMap;
                    
14import com.google.gson.Gson;
                    
15import com.google.gson.JsonElement;
                    
16import com.google.gson.JsonObject;
                    
17import com.google.gson.JsonPrimitive;
                    
18import com.google.gson.JsonSerializationContext;
                    
19import com.google.gson.JsonSerializer;
                    
20import com.google.inject.AbstractModule;
                    
20import com.google.inject.AbstractModule;
                    
21import com.google.inject.Guice;
                    
22import com.google.inject.Injector;
                    
104        factory = new LocalStorageFactory(workingDir.toString());
                    
105        injector = Guice.createInjector(Stage.PRODUCTION, new AbstractModule() {
                    
106            @Override
                    
                
ProvidesIntoTest.java https://gitlab.com/metamorphiccode/guice | Java | 373 lines
                    
49  public void testAnnotation() throws Exception {
                    
50    Injector injector = Guice.createInjector(MultibindingsScanner.asModule(), new AbstractModule() {
                    
51      @Override protected void configure() {}
                    
297    try {
                    
298      Guice.createInjector(MultibindingsScanner.asModule(), m);
                    
299      fail();
                    
312    try {
                    
313      Guice.createInjector(MultibindingsScanner.asModule(), m);
                    
314      fail();
                    
339    try {
                    
340      Guice.createInjector(MultibindingsScanner.asModule(), m);
                    
341      fail();
                    
364    try {
                    
365      Guice.createInjector(MultibindingsScanner.asModule(), m);
                    
366      fail();
                    
                
BTSwarmCoordinatorTest.java https://github.com/r3n/limewire5-ruby.git | Java | 352 lines
                    
26
                    
27import com.google.inject.Guice;
                    
28import com.google.inject.Injector;
                    
77    protected void setUp() throws Exception {
                    
78        injector = Guice.createInjector(new LimeWireCoreModule(ActivityCallbackStub.class));
                    
79        metaInfoFactory = injector.getInstance(BTMetaInfoFactory.class);
                    
                
VirtualboxLiveTest.java https://github.com/edwardt/jclouds.git | Java | 329 lines
                    
20
                    
21import static com.google.common.base.Preconditions.checkNotNull;
                    
22import static org.testng.Assert.assertEquals;
                    
59import com.google.common.base.Predicate;
                    
60import com.google.inject.Guice;
                    
61import com.google.inject.Injector;
                    
143
                    
144      injector = Guice.createInjector(new SshjSshClientModule(), new SLF4JLoggingModule(),
                    
145            new BouncyCastleCryptoModule());
                    
                
ParseAsyncJobFromHttpResponseTest.java https://github.com/regularfry/jclouds.git | Java | 170 lines
                    
36import com.google.common.collect.ImmutableMap;
                    
37import com.google.inject.Guice;
                    
38import com.google.inject.Injector;
                    
46
                    
47   Injector i = Guice.createInjector(new GsonModule() {
                    
48
                    
                
BindVAppConfigurationToXmlPayloadTest.java https://github.com/gnodet/jclouds.git | Java | 220 lines
                    
20
                    
21import static com.google.common.base.Preconditions.checkNotNull;
                    
22import static org.easymock.EasyMock.expect;
                    
43
                    
44import com.google.common.collect.ImmutableList;
                    
45import com.google.common.collect.ImmutableListMultimap;
                    
45import com.google.common.collect.ImmutableListMultimap;
                    
46import com.google.common.collect.ImmutableSet;
                    
47import com.google.common.collect.Maps;
                    
48import com.google.inject.AbstractModule;
                    
49import com.google.inject.Guice;
                    
50import com.google.inject.Injector;
                    
59public class BindVAppConfigurationToXmlPayloadTest {
                    
60   Injector injector = Guice.createInjector(new AbstractModule() {
                    
61
                    
                
PackageFilterTests.java https://github.com/manzke/guice-automatic-injection.git | Java | 145 lines
                    
25import com.google.inject.ConfigurationException;
                    
26import com.google.inject.Guice;
                    
27import com.google.inject.Injector;
                    
40	public void createDynamicModule() {
                    
41		Injector injector = Guice.createInjector(new TestStartupModule(SonatypeScanner.class,
                    
42			PackageFilter.create(PackageFilterTests.class)));
                    
63	public void createTestInterface() {
                    
64		Injector injector = Guice.createInjector(new TestStartupModule(SonatypeScanner.class,
                    
65			PackageFilter.create(PackageFilterTests.class)));
                    
76	public void createSecondTestInterface() {
                    
77		Injector injector = Guice.createInjector(new TestStartupModule(SonatypeScanner.class,
                    
78			PackageFilter.create(PackageFilterTests.class)));
                    
89	public void createAllInterfaces() {
                    
90		Injector injector = Guice.createInjector(new TestStartupModule(SonatypeScanner.class,
                    
91			PackageFilter.create(PackageFilterTests.class)));
                    
                
AutobindTests.java https://github.com/manzke/guice-automatic-injection.git | Java | 145 lines
                    
25import com.google.inject.ConfigurationException;
                    
26import com.google.inject.Guice;
                    
27import com.google.inject.Injector;
                    
40	public void createDynamicModule() {
                    
41		Injector injector = Guice.createInjector(new TestStartupModule(SonatypeScanner.class,
                    
42			PackageFilter.create(AutobindTests.class, false)));
                    
63	public void createTestInterface() {
                    
64		Injector injector = Guice.createInjector(new TestStartupModule(SonatypeScanner.class,
                    
65			PackageFilter.create(AutobindTests.class, false)));
                    
76	public void createSecondTestInterface() {
                    
77		Injector injector = Guice.createInjector(new TestStartupModule(SonatypeScanner.class,
                    
78			PackageFilter.create(AutobindTests.class, false)));
                    
89	public void createAllInterfaces() {
                    
90		Injector injector = Guice.createInjector(new TestStartupModule(SonatypeScanner.class,
                    
91			PackageFilter.create(AutobindTests.class, false)));
                    
                
TestAleaGameCheck.java https://github.com/PoliM/playground.git | Java | 228 lines
                    
31import com.google.inject.AbstractModule;
                    
32import com.google.inject.Guice;
                    
33
                    
45		MockitoAnnotations.initMocks(this);
                    
46		WorkflowServiceFactory.setInjector(Guice.createInjector(new AbstractModule() {
                    
47
                    
                
ElasticStackClientLiveTest.java https://github.com/regularfry/jclouds.git | Java | 385 lines
                    
20
                    
21import static com.google.common.base.Preconditions.checkNotNull;
                    
22import static org.testng.Assert.assertEquals;
                    
60
                    
61import com.google.common.base.Predicate;
                    
62import com.google.common.base.Predicates;
                    
62import com.google.common.base.Predicates;
                    
63import com.google.common.collect.ImmutableMap;
                    
64import com.google.common.collect.ImmutableSet;
                    
65import com.google.gson.Gson;
                    
66import com.google.inject.Guice;
                    
67import com.google.inject.Module;
                    
314   protected void doConnectViaSsh(Server server, Credentials creds) throws IOException {
                    
315      SshClient ssh = Guice.createInjector(new SshjSshClientModule()).getInstance(SshClient.Factory.class).create(
                    
316               new IPSocket(server.getVnc().getIp(), 22), creds);
                    
                
SiteProgram.java https://gitlab.com/chenfengxu/gerrit | Java | 266 lines
                    
41import com.google.inject.CreationException;
                    
42import com.google.inject.Guice;
                    
43import com.google.inject.Injector;
                    
157    modules.add(configModule);
                    
158    Injector cfgInjector = Guice.createInjector(sitePathModule, configModule);
                    
159    Config cfg = cfgInjector.getInstance(Key.get(Config.class, GerritServerConfig.class));
                    
171    DataSourceType dst =
                    
172        Guice.createInjector(new DataSourceModule(), configModule, sitePathModule)
                    
173            .getInstance(Key.get(DataSourceType.class, Names.named(dbType.toLowerCase())));
                    
187    try {
                    
188      return Guice.createInjector(PRODUCTION, modules);
                    
189    } catch (CreationException ce) {
                    
243    modules.add(new DataSourceModule());
                    
244    Injector i = Guice.createInjector(modules);
                    
245    List<Binding<DataSourceType>> dsTypeBindings =
                    
                
AbstractLdapSynchronizer.java https://gitlab.com/gesnaud/xivo-lib-ldap | Java | 252 lines
                    
29
                    
30import com.google.inject.Guice;
                    
31import com.google.inject.Inject;
                    
31import com.google.inject.Inject;
                    
32import com.google.inject.Injector;
                    
33
                    
60        AbstractLDAPModule module = getModuleInstance(moduleClass, parsing);
                    
61        Injector injector = Guice.createInjector(module);
                    
62        AbstractLdapSynchronizer synchronizer = injector.getInstance(AbstractLdapSynchronizer.class);
                    
                
VDCHandlerTest.java https://github.com/regularfry/jclouds.git | Java | 81 lines
                    
36import com.google.common.collect.ImmutableMap;
                    
37import com.google.inject.Guice;
                    
38import com.google.inject.Injector;
                    
49      InputStream is = getClass().getResourceAsStream("/vdc.xml");
                    
50      Injector injector = Guice.createInjector(new SaxParserModule());
                    
51      Factory factory = injector.getInstance(ParseSax.Factory.class);
                    
                
VDCHandlerTest.java https://github.com/raschyoung/jclouds.git | Java | 193 lines
                    
36import com.google.common.collect.ImmutableSet;
                    
37import com.google.inject.Guice;
                    
38import com.google.inject.Injector;
                    
49      InputStream is = getClass().getResourceAsStream("/vdc.xml");
                    
50      Injector injector = Guice.createInjector(new SaxParserModule());
                    
51      Factory factory = injector.getInstance(ParseSax.Factory.class);
                    
95      InputStream is = getClass().getResourceAsStream("/vdc-1net.xml");
                    
96      Injector injector = Guice.createInjector(new SaxParserModule());
                    
97      Factory factory = injector.getInstance(ParseSax.Factory.class);
                    
120      InputStream is = getClass().getResourceAsStream("/vdc-failed.xml");
                    
121      Injector injector = Guice.createInjector(new SaxParserModule());
                    
122      Factory factory = injector.getInstance(ParseSax.Factory.class);
                    
139      InputStream is = getClass().getResourceAsStream("/vdc-saved.xml");
                    
140      Injector injector = Guice.createInjector(new SaxParserModule());
                    
141      Factory factory = injector.getInstance(ParseSax.Factory.class);
                    
                
ParseObjectMetadataFromHeadersTest.java https://github.com/regularfry/jclouds.git | Java | 162 lines
                    
43
                    
44import com.google.common.collect.ImmutableMap;
                    
45import com.google.common.collect.ImmutableMultimap;
                    
46import com.google.inject.AbstractModule;
                    
47import com.google.inject.Guice;
                    
48import com.google.inject.name.Names;
                    
149   void setUp() {
                    
150      parser = Guice.createInjector(new AbstractModule() {
                    
151
                    
                
ElasticStackErrorHandlerTest.java https://github.com/regularfry/jclouds.git | Java | 140 lines
                    
38
                    
39import com.google.inject.Guice;
                    
40
                    
102
                    
103      ElasticStackErrorHandler function = Guice.createInjector().getInstance(ElasticStackErrorHandler.class);
                    
104
                    
                
Activator.java https://github.com/peterlynch/spice.git | Java | 244 lines
                    
12 */
                    
13package org.sonatype.guice.bean.containers;
                    
14
                    
31import org.sonatype.guice.bean.binders.SpaceModule;
                    
32import org.sonatype.guice.bean.binders.WireModule;
                    
33import org.sonatype.guice.bean.locators.DefaultBeanLocator;
                    
33import org.sonatype.guice.bean.locators.DefaultBeanLocator;
                    
34import org.sonatype.guice.bean.locators.MutableBeanLocator;
                    
35import org.sonatype.guice.bean.reflect.BundleClassSpace;
                    
38import com.google.inject.Binder;
                    
39import com.google.inject.Guice;
                    
40import com.google.inject.Injector;
                    
185            final ClassSpace space = new BundleClassSpace( bundle );
                    
186            injector = Guice.createInjector( new WireModule( this, new SpaceModule( space ) ) );
                    
187            final Dictionary<Object, Object> metadata = new Hashtable<Object, Object>();
                    
                
RedirectionRetryHandlerTest.java https://github.com/regularfry/jclouds.git | Java | 184 lines
                    
38
                    
39import com.google.common.collect.ImmutableMultimap;
                    
40import com.google.common.collect.LinkedHashMultimap;
                    
40import com.google.common.collect.LinkedHashMultimap;
                    
41import com.google.common.collect.Multimap;
                    
42import com.google.inject.AbstractModule;
                    
42import com.google.inject.AbstractModule;
                    
43import com.google.inject.Guice;
                    
44import com.google.inject.Injector;
                    
44import com.google.inject.Injector;
                    
45import com.google.inject.Provides;
                    
46
                    
53public class RedirectionRetryHandlerTest {
                    
54   Injector injector = Guice.createInjector(new MockModule(), new RestModule(), new AbstractModule() {
                    
55      @SuppressWarnings("unused")
                    
                
TestHttpServerModule.java https://gitlab.com/CORP-RESELLER/airlift | Java | 379 lines
                    
27import com.google.inject.Binder;
                    
28import com.google.inject.Guice;
                    
29import com.google.inject.Injector;
                    
121        ConfigurationFactory configFactory = new ConfigurationFactory(properties);
                    
122        Injector injector = Guice.createInjector(new HttpServerModule(),
                    
123                new NodeModule(),
                    
149        ConfigurationFactory configFactory = new ConfigurationFactory(properties);
                    
150        Injector injector = Guice.createInjector(new HttpServerModule(),
                    
151                new NodeModule(),
                    
190        ConfigurationFactory configFactory = new ConfigurationFactory(properties);
                    
191        Injector injector = Guice.createInjector(new HttpServerModule(),
                    
192                new NodeModule(),
                    
264        ConfigurationFactory configFactory = new ConfigurationFactory(properties);
                    
265        Injector injector = Guice.createInjector(new HttpServerModule(),
                    
266                new NodeModule(),
                    
                
ConfigurationFactoryTest.java https://gitlab.com/CORP-RESELLER/airlift | Java | 464 lines
                    
20import com.google.inject.CreationException;
                    
21import com.google.inject.Guice;
                    
22import com.google.inject.Injector;
                    
22import com.google.inject.Injector;
                    
23import com.google.inject.Module;
                    
24import com.google.inject.spi.Message;
                    
113        TestMonitor monitor = new TestMonitor();
                    
114        Injector injector = createInjector(properties, monitor, new Module()
                    
115        {
                    
137        TestMonitor monitor = new TestMonitor();
                    
138        Injector injector = createInjector(properties, monitor, new Module()
                    
139        {
                    
297        List<Message> messages = new ConfigurationValidator(configurationFactory, null).validate(module);
                    
298        return Guice.createInjector(new ConfigurationModule(configurationFactory), module, new ValidationErrorModule(messages));
                    
299    }
                    
                
BaseTemplateBuilderLiveTest.java https://github.com/mattstep/jclouds.git | Java | 305 lines
                    
50
                    
51import com.google.common.base.Predicate;
                    
52import com.google.common.base.Predicates;
                    
52import com.google.common.base.Predicates;
                    
53import com.google.common.base.Splitter;
                    
54import com.google.common.collect.ImmutableSet;
                    
54import com.google.common.collect.ImmutableSet;
                    
55import com.google.common.collect.Iterables;
                    
56import com.google.common.collect.Sets;
                    
57import com.google.common.io.InputSupplier;
                    
58import com.google.inject.Guice;
                    
59import com.google.inject.Module;
                    
121      Map<OsFamily, Map<String, String>> map = new BaseComputeServiceContextModule() {
                    
122      }.provideOsVersionMap(new ComputeServiceConstants.ReferenceData(), Guice.createInjector(new GsonModule())
                    
123            .getInstance(Json.class));
                    
                
S3ParserTest.java https://github.com/regularfry/jclouds.git | Java | 190 lines
                    
52import com.google.common.collect.Iterables;
                    
53import com.google.inject.Guice;
                    
54import com.google.inject.Injector;
                    
69   protected void setUpInjector() {
                    
70      injector = Guice.createInjector(new SaxParserModule() {
                    
71         public void configure() {
                    
                
GuiceInjectorBuilder.scala https://github.com/playframework/playframework.git | Scala | 463 lines
                    
199      }
                    
200      val guiceInjector = Guice.createInjector(stage, applicationModule())
                    
201      guiceInjector.getInstance(classOf[PlayInjector])
                    
306    case playModule: PlayModule   => fromPlayModule(playModule)
                    
307    case guiceModule: GuiceModule => fromGuiceModule(guiceModule)
                    
308    case unknown =>
                    
331
                    
332  implicit def fromGuiceModule(guiceModule: GuiceModule): GuiceableModule = fromGuiceModules(Seq(guiceModule))
                    
333
                    
333
                    
334  implicit def fromGuiceModules(guiceModules: Seq[GuiceModule]): GuiceableModule = new GuiceableModule {
                    
335    def guiced(env: Environment, conf: Configuration, binderOptions: Set[BinderOption]): Seq[GuiceModule] = guiceModules
                    
335    def guiced(env: Environment, conf: Configuration, binderOptions: Set[BinderOption]): Seq[GuiceModule] = guiceModules
                    
336    def disable(classes: Seq[Class[_]]): GuiceableModule                                                  = fromGuiceModules(filterOut(classes, guiceModules))
                    
337    override def toString                                                                                 = s"GuiceableModule(${guiceModules.mkString(", ")})"
                    
                
WebAppTests.java https://github.com/bmahe/hadoop-common.git | Java | 172 lines
                    
28
                    
29import com.google.inject.Module;
                    
30import com.google.inject.Scopes;
                    
30import com.google.inject.Scopes;
                    
31import com.google.inject.servlet.RequestScoped;
                    
32import com.google.inject.AbstractModule;
                    
32import com.google.inject.AbstractModule;
                    
33import com.google.inject.Guice;
                    
34import com.google.inject.Injector;
                    
34import com.google.inject.Injector;
                    
35import com.google.inject.Provides;
                    
36
                    
56                                                final Module... modules) {
                    
57    return Guice.createInjector(new AbstractModule() {
                    
58      final PrintWriter writer = spy(new PrintWriter(System.out));
                    
                
CatalogHandlerTest.java https://github.com/regularfry/jclouds.git | Java | 137 lines
                    
36
                    
37import com.google.common.collect.ImmutableList;
                    
38import com.google.common.collect.ImmutableMap;
                    
38import com.google.common.collect.ImmutableMap;
                    
39import com.google.inject.Guice;
                    
40import com.google.inject.Injector;
                    
55      InputStream is = getClass().getResourceAsStream("/catalog-blank.xml");
                    
56      injector = Guice.createInjector(new SaxParserModule());
                    
57      factory = injector.getInstance(ParseSax.Factory.class);
                    
67      InputStream is = getClass().getResourceAsStream("/catalog.xml");
                    
68      injector = Guice.createInjector(new SaxParserModule());
                    
69      factory = injector.getInstance(ParseSax.Factory.class);
                    
                
TransferRequestIntegrationTest.java https://gitlab.com/metamorphiccode/guice | Java | 215 lines
                    
16
                    
17package com.google.inject.servlet;
                    
18
                    
18
                    
19import com.google.common.collect.ImmutableMap;
                    
20import com.google.inject.AbstractModule;
                    
20import com.google.inject.AbstractModule;
                    
21import com.google.inject.Guice;
                    
22import com.google.inject.Injector;
                    
69  public void testTransferNonHttpRequest() throws Exception {
                    
70    final Injector injector = Guice.createInjector(new AbstractModule() {
                    
71      @Override protected void configure() {
                    
99  public void testTransferNonHttpRequest_closeable() throws Exception {
                    
100    final Injector injector = Guice.createInjector(new AbstractModule() {
                    
101      @Override protected void configure() {
                    
                
InstantiateVAppTemplateOptionsTest.java https://github.com/regularfry/jclouds.git | Java | 90 lines
                    
33import com.google.common.collect.Iterables;
                    
34import com.google.inject.Guice;
                    
35import com.google.inject.Injector;
                    
44
                    
45   Injector injector = Guice.createInjector(new SaxParserModule());
                    
46
                    
                
TestThriftClientAndServerModules.java https://gitlab.com/mayakarya/swift | Java | 312 lines
                    
39import com.google.inject.BindingAnnotation;
                    
40import com.google.inject.Guice;
                    
41import com.google.inject.Injector;
                    
91        final List<Object> eventHandlerContexts = newArrayList();
                    
92        Injector injector = Guice.createInjector(Stage.PRODUCTION,
                    
93                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                    
158    {
                    
159        Injector injector = Guice.createInjector(Stage.PRODUCTION,
                    
160                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                    
205    {
                    
206        Injector injector = Guice.createInjector(Stage.PRODUCTION,
                    
207                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                    
271
                    
272        Injector injector = Guice.createInjector(
                    
273                Stage.PRODUCTION,
                    
                
MyApp.java https://github.com/leoneu/s4-piper.git | Java | 152 lines
                    
25
                    
26import com.google.inject.Guice;
                    
27import com.google.inject.Injector;
                    
134
                    
135        Injector injector = Guice.createInjector(new Module());
                    
136        MyApp myApp = injector.getInstance(MyApp.class);
                    
                
VarargsFilterDispatchIntegrationTest.java https://gitlab.com/metamorphiccode/guice | Java | 182 lines
                    
1package com.google.inject.servlet;
                    
2
                    
7
                    
8import com.google.inject.Guice;
                    
9import com.google.inject.Injector;
                    
9import com.google.inject.Injector;
                    
10import com.google.inject.Key;
                    
11import com.google.inject.Singleton;
                    
47  public final void testDispatchRequestToManagedPipeline() throws ServletException, IOException {
                    
48    final Injector injector = Guice.createInjector(new ServletModule() {
                    
49
                    
87  public final void testDispatchThatNoFiltersFire() throws ServletException, IOException {
                    
88    final Injector injector = Guice.createInjector(new ServletModule() {
                    
89
                    
128
                    
129    final Injector injector = Guice.createInjector(new ServletModule() {
                    
130
                    
                
PluginGuiceEnvironment.java https://gitlab.com/chenfengxu/gerrit | Java | 648 lines
                    
19import static com.google.gerrit.extensions.registration.PrivateInternals_DynamicTypes.dynamicMapsOf;
                    
20import static com.google.gerrit.extensions.registration.PrivateInternals_DynamicTypes.dynamicSetsOf;
                    
21
                    
36import com.google.gerrit.extensions.webui.WebUiPlugin;
                    
37import com.google.gerrit.index.IndexCollection;
                    
38import com.google.gerrit.metrics.MetricMaker;
                    
43import com.google.inject.Binding;
                    
44import com.google.inject.Guice;
                    
45import com.google.inject.Inject;
                    
67/**
                    
68 * Tracks Guice bindings that should be exposed to loaded plugins.
                    
69 *
                    
115    this.copyConfigModule = ccm;
                    
116    this.copyConfigKeys = Guice.createInjector(ccm).getAllBindings().keySet();
                    
117    this.serverMetrics = serverMetrics;
                    
                
BaseInit.java https://gitlab.com/chenfengxu/gerrit | Java | 525 lines
                    
19import static com.google.inject.Scopes.SINGLETON;
                    
20import static com.google.inject.Stage.PRODUCTION;
                    
21
                    
40import com.google.gerrit.server.config.SitePaths;
                    
41import com.google.gerrit.server.git.GitRepositoryManager;
                    
42import com.google.gerrit.server.index.IndexModule;
                    
56import com.google.inject.CreationException;
                    
57import com.google.inject.Guice;
                    
58import com.google.inject.Inject;
                    
59import com.google.inject.Injector;
                    
60import com.google.inject.Module;
                    
61import com.google.inject.Provider;
                    
299    try {
                    
300      return Guice.createInjector(PRODUCTION, m).getInstance(SiteInit.class);
                    
301    } catch (CreationException ce) {
                    
                
VirtualboxAdministrationLiveTest.java https://github.com/edwardt/jclouds.git | Java | 542 lines
                    
61
                    
62import com.google.common.base.Predicate;
                    
63import com.google.common.io.Files;
                    
64import com.google.common.io.InputSupplier;
                    
65import com.google.inject.Guice;
                    
66import com.google.inject.Injector;
                    
244
                    
245      injector = Guice.createInjector(new SshjSshClientModule(), new SLF4JLoggingModule(),
                    
246            new BouncyCastleCryptoModule());
                    
                
ListAccountsResponseTest.java https://github.com/regularfry/jclouds.git | Java | 112 lines
                    
34import com.google.common.collect.ImmutableSet;
                    
35import com.google.inject.Guice;
                    
36import com.google.inject.Injector;
                    
46   protected Injector injector() {
                    
47      return Guice.createInjector(new CloudStackParserModule(), new GsonModule() {
                    
48
                    
                
Errors.java https://bitbucket.org/dkartaschew/elasticsearch.git | Java | 634 lines
                    
18
                    
19import com.google.common.collect.ImmutableList;
                    
20import com.google.common.collect.ImmutableSet;
                    
20import com.google.common.collect.ImmutableSet;
                    
21import com.google.common.collect.Lists;
                    
22import org.elasticsearch.common.inject.*;
                    
101     * same message for both bind time errors:
                    
102     * <pre><code>Guice.createInjector(new AbstractModule() {
                    
103     *   public void configure() {
                    
107     * ...and at provide-time errors:
                    
108     * <pre><code>Guice.createInjector().getInstance(Runnable.class);</code></pre>
                    
109     * Otherwise we need to know who's calling when resolving a just-in-time
                    
182
                    
183    public Errors cannotBindToGuiceType(String simpleName) {
                    
184        return addMessage("Binding to core guice framework type is not allowed: %s.", simpleName);
                    
                
VAppTemplateHandlerTest.java https://github.com/regularfry/jclouds.git | Java | 151 lines
                    
41
                    
42import com.google.common.collect.ImmutableList;
                    
43import com.google.common.collect.ImmutableSet;
                    
44import com.google.common.collect.Iterables;
                    
45import com.google.inject.Guice;
                    
46import com.google.inject.Injector;
                    
57      InputStream is = getClass().getResourceAsStream("/vAppTemplate.xml");
                    
58      Injector injector = Guice.createInjector(new SaxParserModule());
                    
59      Factory factory = injector.getInstance(ParseSax.Factory.class);
                    
122      InputStream is = getClass().getResourceAsStream("/vAppTemplate-copying.xml");
                    
123      Injector injector = Guice.createInjector(new SaxParserModule());
                    
124      Factory factory = injector.getInstance(ParseSax.Factory.class);
                    
                
Init.java https://gitlab.com/chenfengxu/gerrit | Java | 257 lines
                    
19import com.google.gerrit.common.IoUtil;
                    
20import com.google.gerrit.common.PageLinks;
                    
21import com.google.gerrit.common.PluginData;
                    
21import com.google.gerrit.common.PluginData;
                    
22import com.google.gerrit.pgm.init.BaseInit;
                    
23import com.google.gerrit.pgm.init.Browser;
                    
25import com.google.gerrit.pgm.init.api.ConsoleUI;
                    
26import com.google.gerrit.pgm.util.ErrorLogFile;
                    
27import com.google.gerrit.server.config.GerritServerConfigModule;
                    
31import com.google.inject.AbstractModule;
                    
32import com.google.inject.Guice;
                    
33import com.google.inject.Inject;
                    
140    modules.add(new GerritServerConfigModule());
                    
141    Guice.createInjector(modules).injectMembers(this);
                    
142    start(run);
                    
                
BindNodeConfigurationToXmlPayloadTest.java https://github.com/regularfry/jclouds.git | Java | 100 lines
                    
20
                    
21import static com.google.common.base.Preconditions.checkNotNull;
                    
22import static org.easymock.EasyMock.expect;
                    
40
                    
41import com.google.common.collect.ImmutableMap;
                    
42import com.google.inject.AbstractModule;
                    
42import com.google.inject.AbstractModule;
                    
43import com.google.inject.Guice;
                    
44import com.google.inject.Injector;
                    
44import com.google.inject.Injector;
                    
45import com.google.inject.name.Names;
                    
46
                    
53public class BindNodeConfigurationToXmlPayloadTest {
                    
54   Injector injector = Guice.createInjector(new AbstractModule() {
                    
55
                    
                
GuiceServletConfig.java https://github.com/regularfry/jclouds.git | Java | 117 lines
                    
38
                    
39import com.google.common.collect.ImmutableSet;
                    
40import com.google.common.io.Closeables;
                    
40import com.google.common.io.Closeables;
                    
41import com.google.inject.Guice;
                    
42import com.google.inject.Injector;
                    
44import com.google.inject.TypeLiteral;
                    
45import com.google.inject.servlet.GuiceServletContextListener;
                    
46import com.google.inject.servlet.ServletModule;
                    
52 */
                    
53public class GuiceServletConfig extends GuiceServletContextListener {
                    
54
                    
91   protected Injector getInjector() {
                    
92      return Guice.createInjector(new ServletModule() {
                    
93         @Override
                    
                
ParseContainerCDNMetadataListFromJsonResponseTest.java https://github.com/regularfry/jclouds.git | Java | 66 lines
                    
35import com.google.common.collect.ImmutableSortedSet;
                    
36import com.google.inject.Guice;
                    
37import com.google.inject.Injector;
                    
37import com.google.inject.Injector;
                    
38import com.google.inject.Key;
                    
39import com.google.inject.TypeLiteral;
                    
47public class ParseContainerCDNMetadataListFromJsonResponseTest {
                    
48   Injector i = Guice.createInjector(new GsonModule());
                    
49
                    
                
AWSRunInstancesResponseHandlerTest.java https://github.com/regularfry/jclouds.git | Java | 124 lines
                    
42
                    
43import com.google.common.collect.ImmutableList;
                    
44import com.google.common.collect.ImmutableSet;
                    
45import com.google.inject.AbstractModule;
                    
46import com.google.inject.Guice;
                    
47
                    
62   protected void setUpInjector() {
                    
63      injector = Guice.createInjector(new SaxParserModule(), new AbstractModule() {
                    
64
                    
                
VMHandlerTest.java https://github.com/regularfry/jclouds.git | Java | 150 lines
                    
40
                    
41import com.google.inject.Guice;
                    
42import com.google.inject.Injector;
                    
52      InputStream is = getClass().getResourceAsStream("/vm.xml");
                    
53      Injector injector = Guice.createInjector(new SaxParserModule());
                    
54      Factory factory = injector.getInstance(ParseSax.Factory.class);
                    
                
LocalizationTest.java https://github.com/juven/sitebricks.git | Java | 289 lines
                    
48
                    
49    String msg = Guice.createInjector(new AbstractModule() {
                    
50      @Override
                    
144
                    
145    Guice.createInjector(new AbstractModule() {
                    
146      @Override
                    
163
                    
164    String msg = Guice.createInjector(new AbstractModule() {
                    
165      @Override
                    
198
                    
199    Injector injector = Guice.createInjector(new AbstractModule() {
                    
200      @Override
                    
243  public final void parameterizedWithNoExternalBundle() {
                    
244    String msg = Guice.createInjector(new AbstractModule() {
                    
245      @Override
                    
                
SoyTransformer.java https://bitbucket.org/Adaptavist/atlassian-plugins-osgi-testrunner-parent.git | Java | 109 lines
                    
12
                    
13import com.google.inject.*;
                    
14import com.google.inject.multibindings.Multibinder;
                    
14import com.google.inject.multibindings.Multibinder;
                    
15import com.google.template.soy.SoyFileSet;
                    
16import com.google.template.soy.SoyModule;
                    
16import com.google.template.soy.SoyModule;
                    
17import com.google.template.soy.jssrc.SoyJsSrcOptions;
                    
18import com.google.template.soy.shared.restricted.SoyFunction;
                    
18import com.google.template.soy.shared.restricted.SoyFunction;
                    
19import com.google.template.soy.xliffmsgplugin.XliffMsgPluginModule;
                    
20
                    
67
                    
68            final Injector injector = Guice.createInjector(guiceModules);
                    
69
                    
                
Rules4JBIBootstrap.java https://bitbucket.org/pymma/openesb-components.git | Java | 225 lines
                    
31
                    
32import com.google.inject.Guice;
                    
33import com.google.inject.Inject;
                    
33import com.google.inject.Inject;
                    
34import com.google.inject.Injector;
                    
35import com.google.inject.Stage;
                    
35import com.google.inject.Stage;
                    
36import com.google.inject.name.Named;
                    
37
                    
40
                    
41import org.openesb.components.rules4jbi.engine.guice.modules.LoggerModule;
                    
42import org.openesb.components.rules4jbi.engine.util.DOMUtils;
                    
78        Injector injector =
                    
79                Guice.createInjector(Stage.PRODUCTION, new LoggerModule(installationContext.getContext()));
                    
80        
                    
                
ListOfKeyValuesDelimitedByBlankLinesToServerInfoSetTest.java https://github.com/edwardt/jclouds.git | Java | 80 lines
                    
35
                    
36import com.google.common.base.Function;
                    
37import com.google.common.collect.ImmutableSet;
                    
38import com.google.inject.AbstractModule;
                    
39import com.google.inject.Guice;
                    
40import com.google.inject.TypeLiteral;
                    
48
                    
49   private static final ListOfKeyValuesDelimitedByBlankLinesToServerInfoSet FN = Guice.createInjector(
                    
50         new AbstractModule() {
                    
                
DTKitBuilder.java https://github.com/jenkinsci/dtkit-plugin.git | Java | 445 lines
                    
3import com.google.inject.AbstractModule;
                    
4import com.google.inject.Guice;
                    
5import com.google.inject.Singleton;
                    
165
                    
166		final DTKitBuilderLog log = Guice.createInjector(new AbstractModule() {
                    
167			@Override
                    
191
                    
192			DTKitReportProcessingService processingService = Guice.createInjector(new AbstractModule() {
                    
193				@Override
                    
325		// Archiving tool reports into JUnit files
                    
326		DTKitBuilderTransformer dtkitBuilderTransformer = Guice.createInjector(new AbstractModule() {
                    
327			@Override
                    
                
NamedDatabaseTest.java https://github.com/playframework/playframework.git | Java | 126 lines
                    
10import com.google.common.collect.ImmutableMap;
                    
11import com.google.inject.Guice;
                    
12import com.google.inject.Injector;
                    
20import play.inject.guice.GuiceApplicationBuilder;
                    
21import play.inject.guice.GuiceApplicationLoader;
                    
22
                    
37            "db.other.url", "jdbc:h2:mem:other");
                    
38    Injector injector = createInjector(config);
                    
39    assertThat(
                    
66            "db.other.url", "jdbc:h2:mem:other");
                    
67    Injector injector = createInjector(config);
                    
68    assertThat(
                    
107        new GuiceApplicationLoader().builder(new Context(Environment.simple(), config));
                    
108    return Guice.createInjector(builder.applicationModule());
                    
109  }
                    
                
TerremarkECloudParseOsFromVAppTemplateNameTest.java https://github.com/regularfry/jclouds.git | Java | 172 lines
                    
37
                    
38import com.google.common.collect.ImmutableSet;
                    
39import com.google.common.collect.Iterables;
                    
40import com.google.common.collect.Sets;
                    
41import com.google.inject.Guice;
                    
42import com.google.inject.Injector;
                    
42import com.google.inject.Injector;
                    
43import com.google.inject.TypeLiteral;
                    
44
                    
52      InputStream is = getClass().getResourceAsStream(resource);
                    
53      Injector injector = Guice.createInjector(new SaxParserModule());
                    
54      Factory factory = injector.getInstance(ParseSax.Factory.class);
                    
59
                    
60      TerremarkECloudParseOsFromVAppTemplateName function = new TerremarkECloudParseOsFromVAppTemplateName(Guice
                    
61            .createInjector(new GsonModule())
                    
                
Struts2Factory.java https://gitlab.com/metamorphiccode/guice | Java | 231 lines
                    
20import com.google.inject.Binder;
                    
21import com.google.inject.Injector;
                    
22import com.google.inject.internal.Annotations;
                    
39/**
                    
40 * Cleanup up version from Bob's GuiceObjectFactory. Now works properly with
                    
41 * GS2 and fixes several bugs.
                    
50  private static final String ERROR_NO_INJECTOR =
                    
51      "Cannot find a Guice injector.  Are you sure you registered a GuiceServletContextListener "
                    
52    + "that uses the Struts2GuicePluginModule in your application's web.xml?";
                    
53
                    
54  private static @com.google.inject.Inject Injector injector;
                    
55
                    
63
                    
64  @Inject(value = "guice.module", required = false)
                    
65  void setModule(String moduleClassName) {
                    
                
WebApps.java https://github.com/lalithsuresh/Scaling-HDFS-NameNode.git | Java | 221 lines
                    
22import com.google.inject.AbstractModule;
                    
23import com.google.inject.Guice;
                    
24import com.google.inject.Injector;
                    
25import com.google.inject.Module;
                    
26import com.google.inject.servlet.GuiceFilter;
                    
27
                    
151            new HttpServer(name, bindAddress, port, findPort, conf);
                    
152        server.addGlobalFilter("guice", GuiceFilter.class.getName(), null);
                    
153        webapp.setConf(conf);
                    
159      }
                    
160      Injector injector = Guice.createInjector(webapp, new AbstractModule() {
                    
161        @Override
                    
169      // save a guice filter instance for webapp stop (mostly for unit tests)
                    
170      webapp.setGuiceFilter(injector.getInstance(GuiceFilter.class));
                    
171      if (devMode) {
                    
                
Injectors.java https://gitlab.com/matticala/apache-camel | Java | 457 lines
                    
32import com.google.inject.Binding;
                    
33import com.google.inject.Guice;
                    
34import com.google.inject.Injector;
                    
34import com.google.inject.Injector;
                    
35import com.google.inject.Key;
                    
36import com.google.inject.Module;
                    
43import com.google.inject.matcher.Matcher;
                    
44import com.google.inject.name.Names;
                    
45import com.google.inject.util.Modules;
                    
46
                    
47import org.apache.camel.guice.jndi.GuiceInitialContextFactory;
                    
48import org.apache.camel.guice.jndi.internal.Classes;
                    
98        }
                    
99        Injector injector = Guice.createInjector(Modules.override(modules)
                    
100                .with(overridingModules));
                    
                
methods_index_changes.html https://github.com/christophercurrie/Moogle-Muice.git | HTML | 145 lines
                    
60<i>createInjector</i><br>
                    
61&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(com.google.inject.Module[])" class="hiddenlink" target="rightframe">type&nbsp;
                    
62(<code>Module[]</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
63</A></nobr><br>
                    
64&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(com.google.inject.Stage, com.google.inject.Module[])" class="hiddenlink" target="rightframe">type&nbsp;
                    
65(<code>Stage, Module[]</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
66</A></nobr><br>
                    
67&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(com.google.inject.Stage, java.lang.Iterable<? extends com.google.inject.Module>)" class="hiddenlink" target="rightframe">type&nbsp;
                    
68(<code>Stage, Iterable&lt;Module&gt;</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
69</A></nobr><br>
                    
70&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(java.lang.Iterable<? extends com.google.inject.Module>)" class="hiddenlink" target="rightframe">type&nbsp;
                    
71(<code>Iterable&lt;Module&gt;</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
96()</A></nobr><br>
                    
97<nobr><A HREF="com.google.inject.Binder.html#com.google.inject.Binder.getProvider_changed(com.google.inject.Key<T>)" class="hiddenlink" target="rightframe">getProvider
                    
98(<code>Key&lt;T&gt;</code>)</A></nobr><br>
                    
                
S3ParserTest.java https://github.com/mattstep/jclouds.git | Java | 180 lines
                    
48import com.google.common.collect.Iterables;
                    
49import com.google.inject.Guice;
                    
50import com.google.inject.Injector;
                    
64   protected void setUpInjector() {
                    
65      injector = Guice.createInjector(new SaxParserModule());
                    
66      factory = injector.getInstance(ParseSax.Factory.class);
                    
                
RestfulJsonPeopleTest.java https://github.com/thesmith/bbc-shindig-example.git | Java | 262 lines
                    
40
                    
41import bbc.social.shindig.example.GuiceModule;
                    
42
                    
42
                    
43import com.google.common.collect.Lists;
                    
44import com.google.common.collect.Maps;
                    
44import com.google.common.collect.Maps;
                    
45import com.google.inject.Guice;
                    
46import com.google.inject.Injector;
                    
46import com.google.inject.Injector;
                    
47import com.google.inject.Key;
                    
48import com.google.inject.TypeLiteral;
                    
65  protected void setUp() throws Exception {
                    
66    Injector injector = Guice.createInjector(new PropertiesModule(),
                    
67        new GuiceModule());
                    
                
CatalogHandlerTest.java https://github.com/raschyoung/jclouds.git | Java | 143 lines
                    
33
                    
34import com.google.inject.Guice;
                    
35import com.google.inject.Injector;
                    
50      InputStream is = getClass().getResourceAsStream("/catalog.xml");
                    
51      injector = Guice.createInjector(new SaxParserModule());
                    
52      factory = injector.getInstance(ParseSax.Factory.class);
                    
                
PatternRepositoryTest.java https://github.com/Zenika/DORM.git | Java | 90 lines
                    
3import com.google.inject.AbstractModule;
                    
4import com.google.inject.Guice;
                    
5import com.google.inject.Injector;
                    
59        DormResource expectedResource = new DefaultDormResource("zenika_test", "jar", testJarRepo);
                    
60        Injector injector = Guice.createInjector(new AbstractModule() {
                    
61            @Override
                    
                
InjectorTest.java https://gitlab.com/metamorphiccode/guice | Java | 413 lines
                    
59
                    
60    Injector injector = Guice.createInjector(new AbstractModule() {
                    
61      protected void configure() {
                    
205  public void testInjectStatics() throws CreationException {
                    
206    Guice.createInjector(new AbstractModule() {
                    
207      protected void configure() {
                    
219    try {
                    
220      Guice.createInjector(new AbstractModule() {
                    
221        protected void configure() {
                    
250  public void testPrivateInjection() throws CreationException {
                    
251    Injector injector = Guice.createInjector(new AbstractModule() {
                    
252      protected void configure() {
                    
319    try {
                    
320      Guice.createInjector().getInstance(Money.class);
                    
321      fail();
                    
                
ComputeBase.java https://github.com/regularfry/jclouds.git | Java | 178 lines
                    
20
                    
21import static com.google.common.base.Predicates.and;
                    
22import static com.google.common.base.Predicates.not;
                    
22import static com.google.common.base.Predicates.not;
                    
23import static com.google.common.collect.Sets.filter;
                    
24import static org.jclouds.compute.predicates.NodePredicates.TERMINATED;
                    
40
                    
41import com.google.common.collect.Iterables;
                    
42import org.jclouds.compute.ComputeService;
                    
63import com.google.common.collect.ImmutableSet;
                    
64import com.google.inject.Guice;
                    
65import com.google.inject.Module;
                    
93   private RetryablePredicate<IPSocket> buildSocket() {
                    
94      SocketOpen socketOpen = Guice.createInjector(getSshModule()).getInstance(SocketOpen.class);
                    
95      return new RetryablePredicate<IPSocket>(socketOpen, 60, 1, TimeUnit.SECONDS);
                    
                
GuiceJSFConfigurer.java https://bitbucket.org/miguelvega/openapi.git | Java | 513 lines
                    
7import com.google.inject.*;
                    
8import com.google.inject.servlet.GuiceServletContextListener;
                    
9import org.openlogics.guice.jsf.scope.JSFScopeBuilder;
                    
39     */
                    
40    public static final String GUICE_JSF_MB_ROOT_PACKAGE_CONTEXT_PARAMETER = "guice.jsf.MANAGED_BEAN_ROOT_PACKAGE";
                    
41
                    
44     */
                    
45    public static final String GUICE_JSF_MODULES_CONTEXT_PARAMETER = "guice.jsf.MODULES";
                    
46
                    
133                    if (logger.isDebugEnabled()) {
                    
134                        logger.debug("Prepare Guice Injector->Bind JSF bean [name:'" + each.getBeanName() + "',scope:'" + each.getScope().getName() + "',class:'" + each.getBeanClass().getName() + "'] in Guice custom Scope '" + customScope.getClass().getName());
                    
135                    }
                    
143        // create the injector
                    
144        Injector injector = Guice.createInjector(modules);
                    
145
                    
                
ServerPlugin.java https://gitlab.com/chenfengxu/gerrit | Java | 313 lines
                    
19import com.google.gerrit.common.Nullable;
                    
20import com.google.gerrit.extensions.registration.RegistrationHandle;
                    
21import com.google.gerrit.extensions.registration.ReloadableRegistrationHandle;
                    
21import com.google.gerrit.extensions.registration.ReloadableRegistrationHandle;
                    
22import com.google.gerrit.lifecycle.LifecycleManager;
                    
23import com.google.gerrit.server.PluginUser;
                    
24import com.google.gerrit.server.util.RequestContext;
                    
25import com.google.inject.Guice;
                    
26import com.google.inject.Injector;
                    
26import com.google.inject.Injector;
                    
27import com.google.inject.Module;
                    
28import java.io.IOException;
                    
259    modules.add(new ServerPluginInfoModule(this, env.getServerMetrics()));
                    
260    return Guice.createInjector(modules);
                    
261  }
                    
                
StatsIntegrationTest.java https://github.com/juven/sitebricks.git | Java | 234 lines
                    
1package com.google.sitebricks.stat;
                    
2
                    
2
                    
3import com.google.common.collect.ImmutableMap;
                    
4import com.google.inject.AbstractModule;
                    
4import com.google.inject.AbstractModule;
                    
5import com.google.inject.Guice;
                    
6import com.google.inject.Injector;
                    
6import com.google.inject.Injector;
                    
7import com.google.sitebricks.stat.testservices.ChildDummyService;
                    
8import com.google.sitebricks.stat.testservices.DummyService;
                    
8import com.google.sitebricks.stat.testservices.DummyService;
                    
9import com.google.sitebricks.stat.testservices.StatExposerTestingService;
                    
10import com.google.sitebricks.stat.testservices.StaticDummyService;
                    
27  public final void before() {
                    
28    injector = Guice.createInjector(new AbstractModule() {
                    
29      @Override
                    
                
CloudServersImageToImageTest.java https://github.com/regularfry/jclouds.git | Java | 66 lines
                    
36
                    
37import com.google.inject.Guice;
                    
38
                    
60      CloudServersImageToImage parser = new CloudServersImageToImage(new CloudServersImageToOperatingSystem(new BaseComputeServiceContextModule() {
                    
61      }.provideOsVersionMap(new ComputeServiceConstants.ReferenceData(), Guice.createInjector(new GsonModule())
                    
62            .getInstance(Json.class))));
                    
                
GuiceCamelContext.java https://gitlab.com/matticala/apache-camel | Java | 176 lines
                    
16 */
                    
17package org.apache.camel.guice;
                    
18
                    
26
                    
27import com.google.inject.Binding;
                    
28import com.google.inject.Inject;
                    
32import org.apache.camel.TypeConverter;
                    
33import org.apache.camel.guice.impl.GuiceInjector;
                    
34import org.apache.camel.guice.inject.Injectors;
                    
48 * It is recommended you use this implementation with the
                    
49 * <a href="http://code.google.com/p/guiceyfruit/wiki/GuiceyJndi">Guicey JNDI Provider</a>
                    
50 *
                    
56    @Inject
                    
57    public GuiceCamelContext(com.google.inject.Injector injector) {
                    
58        this.injector = injector;
                    
                
ThrowingProviderTest.java https://gitlab.com/metamorphiccode/guice | Java | 878 lines
                    
66  private final TestScope testScope = new TestScope();
                    
67  private Injector bindInjector = Guice.createInjector(new AbstractModule() {
                    
68    protected void configure() {
                    
368    try {
                    
369      Guice.createInjector(new AbstractModule() {
                    
370        protected void configure() {
                    
390    try {
                    
391      bindInjector = Guice.createInjector(new AbstractModule() {
                    
392        protected void configure() {
                    
406    try {
                    
407      Guice.createInjector(new AbstractModule() {
                    
408        protected void configure() {
                    
426  public void testDependencies_Bind() {
                    
427    bindInjector = Guice.createInjector(new AbstractModule() {
                    
428      protected void configure() {
                    
                
CheckedProviderTest.java https://gitlab.com/metamorphiccode/guice | Java | 1486 lines
                    
30import com.google.inject.CreationException;
                    
31import com.google.inject.Guice;
                    
32import com.google.inject.Inject;
                    
320    final MockRemoteProvider<Foo> mockRemoteProviderB = new MockRemoteProvider<Foo>();
                    
321    providesInjector = Guice.createInjector(new AbstractModule() {
                    
322      @Override
                    
354  public void testAnnotations_Cxtor() throws Exception {
                    
355    cxtorInjector = Guice.createInjector(new AbstractModule() {
                    
356      @Override
                    
415
                    
416    bindInjector = Guice.createInjector(new AbstractModule() {
                    
417      @Override
                    
432    try {
                    
433      Guice.createInjector(new AbstractModule() {
                    
434        @Override
                    
                
BoundFieldModuleTest.java https://gitlab.com/metamorphiccode/guice | Java | 753 lines
                    
295    try {
                    
296      Guice.createInjector(module);
                    
297      fail();
                    
332    BoundFieldModule module = BoundFieldModule.of(instance);
                    
333    Injector injector = Guice.createInjector(module);
                    
334
                    
458    try {
                    
459      Guice.createInjector(module);
                    
460      fail();
                    
470    BoundFieldModule module = BoundFieldModule.of(instance);
                    
471    Injector injector = Guice.createInjector(module);
                    
472
                    
482    BoundFieldModule module = BoundFieldModule.of(instance);
                    
483    Injector injector = Guice.createInjector(module);
                    
484
                    
                
ServletTest.java https://gitlab.com/metamorphiccode/guice | Java | 471 lines
                    
32import com.google.inject.CreationException;
                    
33import com.google.inject.Guice;
                    
34import com.google.inject.Inject;
                    
277
                    
278    GuiceFilter filter = new GuiceFilter();
                    
279    filter.doFilter(newFakeHttpServletRequest(), newFakeHttpServletResponse(), new FilterChain() {
                    
339
                    
340    GuiceFilter filter = new GuiceFilter();
                    
341    final boolean[] invoked = new boolean[1];
                    
360
                    
361    GuiceFilter filter = new GuiceFilter();
                    
362    final boolean[] invoked = new boolean[1];
                    
385
                    
386    GuiceFilter filter = new GuiceFilter();
                    
387    final boolean[] invoked = new boolean[1];
                    
                
SpiUtils.java https://gitlab.com/metamorphiccode/guice | Java | 1117 lines
                    
21import static com.google.inject.multibindings.MapBinder.mapOfJavaxProviderOf;
                    
22import static com.google.inject.multibindings.MapBinder.mapOfProviderOf;
                    
23import static com.google.inject.multibindings.MapBinder.mapOfSetOfProviderOf;
                    
48import com.google.common.collect.ImmutableSet;
                    
49import com.google.common.collect.Lists;
                    
50import com.google.common.collect.Maps;
                    
54import com.google.inject.Binding;
                    
55import com.google.inject.Guice;
                    
56import com.google.inject.Injector;
                    
70import com.google.inject.spi.ProviderKeyBinding;
                    
71import com.google.inject.spi.ProviderLookup;
                    
72
                    
131      int expectedMapBindings, MapResult... results) {
                    
132    Injector injector = Guice.createInjector(modules);
                    
133    Visitor<T> visitor = new Visitor<T>();
                    
                
OptionalBinderTest.java https://gitlab.com/metamorphiccode/guice | Java | 1241 lines
                    
36import com.google.inject.CreationException;
                    
37import com.google.inject.Guice;
                    
38import com.google.inject.Injector;
                    
224    };
                    
225    Injector injector = Guice.createInjector(module);
                    
226    assertEquals("a", injector.getInstance(String.class));
                    
263    };
                    
264    Injector injector = Guice.createInjector(module);
                    
265    assertEquals("a", injector.getInstance(String.class));
                    
305    };
                    
306    Injector injector = Guice.createInjector(module);
                    
307    assertEquals("b", injector.getInstance(String.class));
                    
361
                    
362    Injector injector = Guice.createInjector(module1, module2, module3);
                    
363    assertEquals("b", injector.getInstance(String.class));
                    
                
MultibinderTest.java https://gitlab.com/metamorphiccode/guice | Java | 1221 lines
                    
41import com.google.inject.CreationException;
                    
42import com.google.inject.Guice;
                    
43import com.google.inject.Injector;
                    
119
                    
120    Injector injector = Guice.createInjector(abc, de);
                    
121    Key<Set<String>> setKey = Key.get(setOfString);
                    
141    };
                    
142    Injector injector = Guice.createInjector(module);
                    
143
                    
163    };
                    
164    Injector injector = Guice.createInjector(module);
                    
165
                    
188    };
                    
189    Injector injector = Guice.createInjector(module);
                    
190
                    
                
MapBinderTest.java https://gitlab.com/metamorphiccode/guice | Java | 1032 lines
                    
39import com.google.inject.CreationException;
                    
40import com.google.inject.Guice;
                    
41import com.google.inject.Inject;
                    
234    };
                    
235    Injector injector = Guice.createInjector(module);
                    
236
                    
262    };
                    
263    Injector injector = Guice.createInjector(module);
                    
264
                    
297    };
                    
298    Injector injector = Guice.createInjector(module);
                    
299
                    
326    };
                    
327    Injector injector = Guice.createInjector(module);
                    
328
                    
                
FactoryProviderTest.java https://gitlab.com/metamorphiccode/guice | Java | 840 lines
                    
90  public void testAssistedFactoryWithAnnotations() {
                    
91    Injector injector = Guice.createInjector(new AbstractModule() {
                    
92      @Override
                    
322  public void testTypeTokenProviderInjection() {
                    
323    Injector injector = Guice.createInjector(new AbstractModule() {
                    
324      @Override
                    
359  public void testAssistInjectionInNonPublicConstructor() {
                    
360    Injector injector = Guice.createInjector(new AbstractModule() {
                    
361      @Override
                    
377  public void testExceptionDuringConstruction() {
                    
378    Injector injector = Guice.createInjector(new AbstractModule() {
                    
379      @Override
                    
424  public void testConstructorExceptionsAreThrownByFactory() {
                    
425    Injector injector = Guice.createInjector(new AbstractModule() {
                    
426      @Override
                    
                
FactoryProvider2Test.java https://gitlab.com/metamorphiccode/guice | Java | 1220 lines
                    
50  public void testAssistedFactory() {
                    
51    Injector injector = Guice.createInjector(new AbstractModule() {
                    
52      @Override
                    
356  public void testAssistInjectionInNonPublicConstructor() {
                    
357    Injector injector = Guice.createInjector(new AbstractModule() {
                    
358      @Override
                    
375  public void testExceptionDuringConstruction() {
                    
376    Injector injector = Guice.createInjector(new AbstractModule() {
                    
377      @Override
                    
413  public void testConstructorExceptionsAreThrownByFactory() {
                    
414    Injector injector = Guice.createInjector(new AbstractModule() {
                    
415      @Override
                    
440  public void testWildcardGenerics() {
                    
441    Injector injector = Guice.createInjector(new AbstractModule() {
                    
442      @Override
                    
                
FactoryModuleBuilderTest.java https://gitlab.com/metamorphiccode/guice | Java | 540 lines
                    
56    try {
                    
57      Guice.createInjector(new AbstractModule() {
                    
58        @Override
                    
274    try {
                    
275      Injector injector = Guice.createInjector(new AbstractModule() {
                    
276        @Override
                    
295  public void testMultipleReturnTypes() {
                    
296    Injector injector = Guice.createInjector(new AbstractModule() {
                    
297      @Override
                    
313  public void testParameterizedClassesWithNoImplements() {
                    
314    Injector injector = Guice.createInjector(new AbstractModule() {
                    
315      @Override
                    
327    try {
                    
328      Guice.createInjector(new AbstractModule() {
                    
329        @Override
                    
                
OverrideModuleTest.java https://gitlab.com/metamorphiccode/guice | Java | 731 lines
                    
20import static com.google.inject.Asserts.assertContains;
                    
21import static com.google.inject.Guice.createInjector;
                    
22import static com.google.inject.name.Names.named;
                    
33import com.google.inject.Exposed;
                    
34import com.google.inject.Guice;
                    
35import com.google.inject.Injector;
                    
365    value.set("B");
                    
366    Injector injector = Guice.createInjector(overridden);
                    
367    assertEquals("B", injector.getInstance(Key.get(String.class, named("original"))));
                    
413    // override forwards
                    
414    Injector injector = Guice.createInjector(Modules.override(exposes5and6).with(exposes15));
                    
415    assertEquals(15, injector.getInstance(Integer.class).intValue());
                    
418    // and in reverse order
                    
419    Injector reverse = Guice.createInjector(Modules.override(exposes15).with(exposes5and6));
                    
420    assertEquals(5, reverse.getInstance(Integer.class).intValue());
                    
                
SpiBindingsTest.java https://gitlab.com/metamorphiccode/guice | Java | 463 lines
                    
26import com.google.inject.Binding;
                    
27import com.google.inject.Guice;
                    
28import com.google.inject.Inject;
                    
28import com.google.inject.Inject;
                    
29import com.google.inject.Injector;
                    
30import com.google.inject.Key;
                    
244  public void testConvertedConstantBinding() {
                    
245    Injector injector = Guice.createInjector(new AbstractModule() {
                    
246      protected void configure() {
                    
265  public void testProviderBinding() {
                    
266    Injector injector = Guice.createInjector(new AbstractModule() {
                    
267      protected void configure() {
                    
356    
                    
357    final Injector injector = Guice.createInjector(new AbstractModule() {
                    
358      protected void configure() {
                    
                
ProviderMethodsTest.java https://gitlab.com/metamorphiccode/guice | Java | 952 lines
                    
72  public void testProviderMethods() {
                    
73    Injector injector = Guice.createInjector(this);
                    
74
                    
361
                    
362    Injector injector = Guice.createInjector(module);
                    
363
                    
383    try {
                    
384      Guice.createInjector(new AbstractModule() {
                    
385        @Override protected void configure() {}
                    
398    AtomicReference<Logger> loggerRef = new AtomicReference<Logger>();
                    
399    Injector injector = Guice.createInjector(new FooModule(loggerRef));
                    
400
                    
435    };
                    
436    Injector injector = Guice.createInjector(m1, m2);
                    
437
                    
                
WeakKeySetTest.java https://gitlab.com/metamorphiccode/guice | Java | 528 lines
                    
31import com.google.inject.Binding;
                    
32import com.google.inject.Guice;
                    
33import com.google.inject.Injector;
                    
33import com.google.inject.Injector;
                    
34import com.google.inject.Key;
                    
35import com.google.inject.Scope;
                    
336  public void testWeakKeySet_integration() {
                    
337    Injector parentInjector = Guice.createInjector(new AbstractModule() {
                    
338          @Override protected void configure() {
                    
358  public void testWeakKeySet_integration_multipleChildren() {
                    
359    Injector parentInjector = Guice.createInjector(new AbstractModule() {
                    
360          @Override protected void configure() {
                    
398  public void testWeakKeySet_integration_multipleChildren_overlappingKeys() {
                    
399    Injector parentInjector = Guice.createInjector(new AbstractModule() {
                    
400          @Override protected void configure() {
                    
                
TypeListenerTest.java https://gitlab.com/metamorphiccode/guice | Java | 710 lines
                    
96
                    
97    Guice.createInjector(new AbstractModule() {
                    
98      @Override protected void configure() {
                    
288    try {
                    
289      Guice.createInjector(new AbstractModule() {
                    
290        @Override protected void configure() {
                    
315
                    
316    Injector injector = Guice.createInjector(new AbstractModule() {
                    
317      @Override protected void configure() {
                    
375
                    
376    Guice.createInjector(new AbstractModule() {
                    
377      @Override protected void configure() {
                    
413  public void testLookupsPostCreate() {
                    
414    Injector injector = Guice.createInjector(new AbstractModule() {
                    
415      @Override protected void configure() {
                    
                
TypeConversionTest.java https://gitlab.com/metamorphiccode/guice | Java | 495 lines
                    
92  public void testConstantInjection() throws CreationException {
                    
93    Injector injector = Guice.createInjector(new AbstractModule() {
                    
94      @Override protected void configure() {
                    
123  public void testConstantInjectionWithExplicitBindingsRequired() throws CreationException {
                    
124    Injector injector = Guice.createInjector(new AbstractModule() {
                    
125      @Override protected void configure() {
                    
194  public void testInvalidCharacter() throws CreationException {
                    
195    Injector injector = Guice.createInjector(new AbstractModule() {
                    
196      @Override protected void configure() {
                    
236  public void testToInstanceIsTreatedLikeConstant() throws CreationException {
                    
237    Injector injector = Guice.createInjector(new AbstractModule() {
                    
238      @Override protected void configure() {
                    
387
                    
388    Injector injector = Guice.createInjector(new AbstractModule() {
                    
389      @Override protected void configure() {
                    
                
ScopesTest.java https://gitlab.com/metamorphiccode/guice | Java | 1192 lines
                    
133        Guice.createInjector().getInstance(AnnotatedSingleton.class),
                    
134        Guice.createInjector().getInstance(AnnotatedSingleton.class));
                    
135  }
                    
255  public void testSingletonsInDevelopmentStage() {
                    
256    Guice.createInjector(Stage.DEVELOPMENT, singletonsModule);
                    
257
                    
326    try {
                    
327      Guice.createInjector(new OuterDeprecatedModule());
                    
328      fail();
                    
399  public void testNullScopedAsASingleton() {
                    
400    Injector injector = Guice.createInjector(new AbstractModule() {
                    
401      @Override
                    
424  public void testSingletonAnnotationOnParameterizedType() {
                    
425    Injector injector = Guice.createInjector();
                    
426    assertSame(injector.getInstance(new Key<Injected<String>>() {}),
                    
                
ProvisionListenerTest.java https://gitlab.com/metamorphiccode/guice | Java | 796 lines
                    
51  public void testExceptionInListenerBeforeProvisioning() {
                    
52    Injector injector = Guice.createInjector(new AbstractModule() {
                    
53      @Override
                    
277    final Counter count2 = new Counter();
                    
278    Injector injector = Guice.createInjector(new AbstractModule() {
                    
279      @Override
                    
302    final Capturer capturer = new Capturer();
                    
303    Injector injector = Guice.createInjector(new AbstractModule() {
                    
304      @Override
                    
362    final Counter counter = new Counter();
                    
363    Injector injector = Guice.createInjector(new AbstractModule() {
                    
364      @Override
                    
383  public void testCallingBindingDotGetProviderDotGet() {
                    
384    Injector injector = Guice.createInjector(new AbstractModule() {
                    
385      @Override
                    
                
ProvisionExceptionTest.java https://gitlab.com/metamorphiccode/guice | Java | 470 lines
                    
150    try {
                    
151      Guice.createInjector().getInstance(A.class);
                    
152      fail();
                    
183  public void testInjectInnerClass() throws Exception {
                    
184    Injector injector = Guice.createInjector();
                    
185    try {
                    
197
                    
198    Injector injector = Guice.createInjector();
                    
199    try {
                    
339  public void testDuplicatesDifferentInstances() {
                    
340    Injector injector = Guice.createInjector(new AbstractModule() {
                    
341      @Override protected void configure() {}
                    
359  public void testMultipleDuplicatesDifferentInstaces() {
                    
360    Injector injector = Guice.createInjector(new AbstractModule() {
                    
361      @Override protected void configure() {}
                    
                
PrivateModuleTest.java https://gitlab.com/metamorphiccode/guice | Java | 564 lines
                    
43  public void testBasicUsage() {
                    
44    Injector injector = Guice.createInjector(new AbstractModule() {
                    
45      @Override protected void configure() {
                    
77  public void testWithoutPrivateModules() {
                    
78    Injector injector = Guice.createInjector(new AbstractModule() {
                    
79      @Override protected void configure() {
                    
257  public void testNestedPrivateInjectors() {
                    
258    Injector injector = Guice.createInjector(new PrivateModule() {
                    
259      @Override public void configure() {
                    
274  public void testInstallingRegularModulesFromPrivateModules() {
                    
275    Injector injector = Guice.createInjector(new PrivateModule() {
                    
276      @Override public void configure() {
                    
392  public void testDependenciesBetweenPrivateAndPublicWithPrivateEagerSingleton() {
                    
393    Injector injector = Guice.createInjector(
                    
394        new AbstractModule() {
                    
                
JitBindingsTest.java https://gitlab.com/metamorphiccode/guice | Java | 731 lines
                    
176  public void testLinkedProviderBindingWorks() {
                    
177    Injector injector = Guice.createInjector(new AbstractModule() {
                    
178      @Override
                    
192    try {
                    
193      Guice.createInjector(new AbstractModule() {
                    
194        @Override
                    
279  public void testProvidedBy() {
                    
280    Injector injector = Guice.createInjector(new AbstractModule() {
                    
281      @Override
                    
403    try {
                    
404      Guice.createInjector(new AbstractModule() {
                    
405        protected void configure() {
                    
422    
                    
423    Injector injector = Guice.createInjector(new AbstractModule() {
                    
424      protected void configure() {
                    
                
DuplicateBindingsTest.java https://gitlab.com/metamorphiccode/guice | Java | 576 lines
                    
100    
                    
101    Guice.createInjector(
                    
102        new ScopedModule(Scopes.NO_SCOPE, foo, pFoo, pclFoo, clFoo, cFoo),
                    
107  public void testSameScopeAnnotationIgnored() {
                    
108    Guice.createInjector(
                    
109        new AnnotatedScopeModule(Singleton.class, foo, pFoo, pclFoo, clFoo, cFoo),
                    
178    try {
                    
179      Guice.createInjector(new ThrowingModule(), new ThrowingModule());
                    
180      fail("expected exception");
                    
189  public void testChildInjectorDuplicateParentFail() {
                    
190    Injector injector = Guice.createInjector(
                    
191        new SimpleModule(foo, pFoo, pclFoo, clFoo, cFoo)
                    
294    b.equality = "test";
                    
295    Guice.createInjector(new AbstractModule() {
                    
296      @Override
                    
                
CircularDependencyTest.java https://gitlab.com/metamorphiccode/guice | Java | 652 lines
                    
47      throws CreationException {
                    
48    Injector injector = Guice.createInjector(new AbstractModule() {
                    
49      @Override
                    
217    try {
                    
218      Guice.createInjector(new AbstractModule() {
                    
219        @Override protected void configure() {}
                    
232    try {
                    
233      Guice.createInjector(new AbstractModule() {
                    
234        @Override protected void configure() {
                    
496  public void testPrivateModulesDontTriggerCircularErrorsInProviders() {
                    
497    Injector injector = Guice.createInjector(new AbstractModule() {
                    
498      @Override
                    
544  public void testCustomScopeCircularProxies() {
                    
545    Injector injector = Guice.createInjector(new AbstractModule() {
                    
546      @Override
                    
                
BindingTest.java https://gitlab.com/metamorphiccode/guice | Java | 503 lines
                    
126  public void testScopeIsAppliedToKeyNotTarget() {
                    
127    Injector injector = Guice.createInjector(new AbstractModule() {
                    
128      protected void configure() {
                    
195  private void assertBindingSucceeds(final Class<?> clazz) {
                    
196    assertNotNull(Guice.createInjector().getInstance(clazz));
                    
197  }
                    
266    try {
                    
267      Guice.createInjector(new AbstractModule() {
                    
268        protected void configure() {
                    
292
                    
293    Injector injector = Guice.createInjector(new AbstractModule() {
                    
294      protected void configure() {
                    
421  public void testGetAllServletBindings() throws Exception {
                    
422    Injector injector = Guice.createInjector(new AbstractModule() {
                    
423      protected void configure() {
                    
                
BinderTestSuite.java https://gitlab.com/metamorphiccode/guice | Java | 769 lines
                    
16
                    
17package com.google.inject;
                    
18
                    
18
                    
19import static com.google.inject.Asserts.assertContains;
                    
20import static com.google.inject.name.Names.named;
                    
24
                    
25import com.google.common.collect.ImmutableList;
                    
26import com.google.common.collect.Lists;
                    
26import com.google.common.collect.Lists;
                    
27import com.google.inject.binder.AnnotatedBindingBuilder;
                    
28import com.google.inject.binder.ScopedBindingBuilder;
                    
399      nextId.set(101);
                    
400      return Guice.createInjector(modules);
                    
401    }
                    
                
BinderTest.java https://gitlab.com/metamorphiccode/guice | Java | 634 lines
                    
149    try {
                    
150      Guice.createInjector(new AbstractModule() {
                    
151        @Override public void configure() {
                    
282    // passes because duplicates are ignored
                    
283    injector = Guice.createInjector(new AbstractModule() {
                    
284      @Override
                    
325    try {
                    
326      Guice.createInjector(new ParentModule());
                    
327      fail();
                    
397  public void testUntargettedBinding() {
                    
398    Injector injector = Guice.createInjector(new AbstractModule() {
                    
399      @Override
                    
418  public void testPartialInjectorGetInstance() {
                    
419    Injector injector = Guice.createInjector();
                    
420    try {
                    
                
Errors.java https://gitlab.com/metamorphiccode/guice | Java | 870 lines
                    
18
                    
19import com.google.common.base.Equivalence;
                    
20import com.google.common.base.Objects;
                    
28import com.google.inject.CreationException;
                    
29import com.google.inject.Guice;
                    
30import com.google.inject.Key;
                    
33import com.google.inject.Provides;
                    
34import com.google.inject.ProvisionException;
                    
35import com.google.inject.Scope;
                    
139   * same message for both bind time errors:
                    
140   * <pre><code>Guice.createInjector(new AbstractModule() {
                    
141   *   public void configure() {
                    
145   * ...and at provide-time errors:
                    
146   * <pre><code>Guice.createInjector().getInstance(Runnable.class);</code></pre>
                    
147   * Otherwise we need to know who's calling when resolving a just-in-time
                    
                
GuiceInjectorBuilder.scala https://gitlab.com/KiaraGrouwstra/playframework | Scala | 343 lines
                    
137      }
                    
138      val guiceInjector = Guice.createInjector(stage, applicationModule())
                    
139      guiceInjector.getInstance(classOf[PlayInjector])
                    
226    case playModule: PlayModule => fromPlayModule(playModule)
                    
227    case guiceModule: GuiceModule => fromGuiceModule(guiceModule)
                    
228    case unknown => throw new PlayException(
                    
248
                    
249  implicit def fromGuiceModule(guiceModule: GuiceModule): GuiceableModule = fromGuiceModules(Seq(guiceModule))
                    
250
                    
250
                    
251  implicit def fromGuiceModules(guiceModules: Seq[GuiceModule]): GuiceableModule = new GuiceableModule {
                    
252    def guiced(env: Environment, conf: Configuration): Seq[GuiceModule] = guiceModules
                    
252    def guiced(env: Environment, conf: Configuration): Seq[GuiceModule] = guiceModules
                    
253    def disable(classes: Seq[Class[_]]): GuiceableModule = fromGuiceModules(filterOut(classes, guiceModules))
                    
254    override def toString = s"GuiceableModule(${guiceModules.mkString(", ")})"
                    
                
BindDriveDataToPlainTextStringTest.java https://github.com/raschyoung/jclouds.git | Java | 86 lines
                    
37
                    
38import com.google.common.base.Function;
                    
39import com.google.common.collect.ImmutableSet;
                    
40import com.google.inject.AbstractModule;
                    
41import com.google.inject.Guice;
                    
42import com.google.inject.TypeLiteral;
                    
50
                    
51   private static final BindDriveDataToPlainTextString FN = Guice.createInjector(new AbstractModule() {
                    
52
                    
                
package-info.java https://github.com/imyousuf/jersey.git | Java | 188 lines
                    
44 * Guice support is enabled by referencing the Guice filter
                    
45 * {@link com.google.inject.servlet.GuiceFilter} and an application
                    
46 * specific {@link javax.servlet.ServletContextListener} that extends from
                    
46 * specific {@link javax.servlet.ServletContextListener} that extends from
                    
47 * {@link com.google.inject.servlet.GuiceServletContextListener} in the web.xml.
                    
48 * For example, the web.xml may be as follows:
                    
100 * <code>GuiceResource</code> will be managed according to the scope declared
                    
101 * using Guice defined scopes. For example the <code>GuiceResource</code>
                    
102 * could be as follows:
                    
144 * 
                    
145 *     public class GuiceServletConfig extends GuiceServletContextListener {
                    
146 * 
                    
148 *         protected Injector getInjector() {
                    
149 *             return Guice.createInjector(new JerseyServletModule() {
                    
150 * 
                    
                
methods_index_all.html https://github.com/christophercurrie/Moogle-Muice.git | HTML | 341 lines
                    
67<i>createInjector</i><br>
                    
68&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(com.google.inject.Module[])" class="hiddenlink" target="rightframe">type&nbsp;
                    
69(<code>Module[]</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
70</A></nobr><br>
                    
71&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(com.google.inject.Stage, com.google.inject.Module[])" class="hiddenlink" target="rightframe">type&nbsp;
                    
72(<code>Stage, Module[]</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
73</A></nobr><br>
                    
74&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(com.google.inject.Stage, java.lang.Iterable<? extends com.google.inject.Module>)" class="hiddenlink" target="rightframe">type&nbsp;
                    
75(<code>Stage, Iterable&lt;Module&gt;</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
76</A></nobr><br>
                    
77&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(java.lang.Iterable<? extends com.google.inject.Module>)" class="hiddenlink" target="rightframe">type&nbsp;
                    
78(<code>Iterable&lt;Module&gt;</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
192</A></nobr><br>
                    
193&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Key.html#com.google.inject.Key.ofType_added(com.google.inject.TypeLiteral<T>)" class="hiddenlink" target="rightframe">type&nbsp;<b>
                    
194(<code>TypeLiteral&lt;T&gt;</code>)</b>&nbsp;in&nbsp;com.google.inject.Key
                    
                
alldiffs_index_changes.html https://github.com/christophercurrie/Moogle-Muice.git | HTML | 468 lines
                    
118<i>createInjector</i><br>
                    
119&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(com.google.inject.Module[])" class="hiddenlink" target="rightframe">type&nbsp;
                    
120(<code>Module[]</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
122<!-- Method createInjector -->
                    
123&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(com.google.inject.Stage, com.google.inject.Module[])" class="hiddenlink" target="rightframe">type&nbsp;
                    
124(<code>Stage, Module[]</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
126<!-- Method createInjector -->
                    
127&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(com.google.inject.Stage, java.lang.Iterable<? extends com.google.inject.Module>)" class="hiddenlink" target="rightframe">type&nbsp;
                    
128(<code>Stage, Iterable&lt;Module&gt;</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
130<!-- Method createInjector -->
                    
131&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(java.lang.Iterable<? extends com.google.inject.Module>)" class="hiddenlink" target="rightframe">type&nbsp;
                    
132(<code>Iterable&lt;Module&gt;</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
233<!-- Class GuiceObjectFactory -->
                    
234<A HREF="com.google.inject.struts2.GuiceObjectFactory.html" class="hiddenlink" target="rightframe">GuiceObjectFactory</A><br>
                    
235<!-- Class InjectionPoint -->
                    
                
alldiffs_index_all.html https://github.com/christophercurrie/Moogle-Muice.git | HTML | 824 lines
                    
161<!-- Method continueRequest -->
                    
162<nobr><A HREF="com.google.inject.servlet.ServletScopes.html#com.google.inject.servlet.ServletScopes.continueRequest_added(java.util.concurrent.Callable<T>, java.util.Map<com.google.inject.Key<?>, java.lang.Object>)" class="hiddenlink" target="rightframe"><b>continueRequest</b>
                    
163(<code>Callable&lt;T&gt;, Map&lt;Key&lt;?&gt;, Object&gt;</code>)</A></nobr><br>
                    
167<i>createInjector</i><br>
                    
168&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(com.google.inject.Module[])" class="hiddenlink" target="rightframe">type&nbsp;
                    
169(<code>Module[]</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
171<!-- Method createInjector -->
                    
172&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(com.google.inject.Stage, com.google.inject.Module[])" class="hiddenlink" target="rightframe">type&nbsp;
                    
173(<code>Stage, Module[]</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
175<!-- Method createInjector -->
                    
176&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(com.google.inject.Stage, java.lang.Iterable<? extends com.google.inject.Module>)" class="hiddenlink" target="rightframe">type&nbsp;
                    
177(<code>Stage, Iterable&lt;Module&gt;</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
179<!-- Method createInjector -->
                    
180&nbsp;&nbsp;<nobr><A HREF="com.google.inject.Guice.html#com.google.inject.Guice.createInjector_changed(java.lang.Iterable<? extends com.google.inject.Module>)" class="hiddenlink" target="rightframe">type&nbsp;
                    
181(<code>Iterable&lt;Module&gt;</code>)&nbsp;in&nbsp;com.google.inject.Guice
                    
                
Injector.html https://github.com/christophercurrie/Moogle-Muice.git | HTML | 333 lines
                    
144<CODE>static&nbsp;<A HREF="../../../../com/google/inject/Injector.html" title="interface in com.google.inject">Injector</A></CODE></FONT></TD>
                    
145<TD><CODE><B>Guice.</B><B><A HREF="../../../../com/google/inject/Guice.html#createInjector(java.lang.Iterable)">createInjector</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;? extends <A HREF="../../../../com/google/inject/Module.html" title="interface in com.google.inject">Module</A>&gt;&nbsp;modules)</CODE>
                    
146
                    
152<CODE>static&nbsp;<A HREF="../../../../com/google/inject/Injector.html" title="interface in com.google.inject">Injector</A></CODE></FONT></TD>
                    
153<TD><CODE><B>Guice.</B><B><A HREF="../../../../com/google/inject/Guice.html#createInjector(com.google.inject.Module...)">createInjector</A></B>(<A HREF="../../../../com/google/inject/Module.html" title="interface in com.google.inject">Module</A>...&nbsp;modules)</CODE>
                    
154
                    
160<CODE>static&nbsp;<A HREF="../../../../com/google/inject/Injector.html" title="interface in com.google.inject">Injector</A></CODE></FONT></TD>
                    
161<TD><CODE><B>Guice.</B><B><A HREF="../../../../com/google/inject/Guice.html#createInjector(com.google.inject.Stage, java.lang.Iterable)">createInjector</A></B>(<A HREF="../../../../com/google/inject/Stage.html" title="enum in com.google.inject">Stage</A>&nbsp;stage,
                    
162               <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;? extends <A HREF="../../../../com/google/inject/Module.html" title="interface in com.google.inject">Module</A>&gt;&nbsp;modules)</CODE>
                    
170<CODE>static&nbsp;<A HREF="../../../../com/google/inject/Injector.html" title="interface in com.google.inject">Injector</A></CODE></FONT></TD>
                    
171<TD><CODE><B>Guice.</B><B><A HREF="../../../../com/google/inject/Guice.html#createInjector(com.google.inject.Stage, com.google.inject.Module...)">createInjector</A></B>(<A HREF="../../../../com/google/inject/Stage.html" title="enum in com.google.inject">Stage</A>&nbsp;stage,
                    
172               <A HREF="../../../../com/google/inject/Module.html" title="interface in com.google.inject">Module</A>...&nbsp;modules)</CODE>
                    
200<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
                    
201<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../com/google/inject/servlet/package-summary.html">com.google.inject.servlet</A> that return <A HREF="../../../../com/google/inject/Injector.html" title="interface in com.google.inject">Injector</A></FONT></TH>
                    
202</TR>
                    
                
JschSshClientLiveTest.java https://github.com/regularfry/jclouds.git | Java | 145 lines
                    
38
                    
39import com.google.inject.Guice;
                    
40import com.google.inject.Injector;
                    
108      } else {
                    
109         Injector i = Guice.createInjector(new JschSshClientModule());
                    
110         SshClient.Factory factory = i.getInstance(SshClient.Factory.class);
                    
                
OrgNetworkHandlerTest.java https://github.com/regularfry/jclouds.git | Java | 106 lines
                    
37
                    
38import com.google.common.collect.ImmutableList;
                    
39import com.google.common.collect.ImmutableSet;
                    
39import com.google.common.collect.ImmutableSet;
                    
40import com.google.inject.Guice;
                    
41import com.google.inject.Injector;
                    
51      InputStream is = getClass().getResourceAsStream("/orgnetwork-isolated.xml");
                    
52      Injector injector = Guice.createInjector(new SaxParserModule());
                    
53      Factory factory = injector.getInstance(ParseSax.Factory.class);
                    
82      InputStream is = getClass().getResourceAsStream("/orgnetwork-bridged.xml");
                    
83      Injector injector = Guice.createInjector(new SaxParserModule());
                    
84      Factory factory = injector.getInstance(ParseSax.Factory.class);
                    
                
ImplicitBindingTest.java https://gitlab.com/metamorphiccode/guice | Java | 403 lines
                    
76  public void testBindingOverridesImplementedBy() {
                    
77    Injector injector = Guice.createInjector(new AbstractModule() {
                    
78      @Override
                    
92    try {
                    
93      Guice.createInjector().getInstance(Key.get(I.class, Names.named("i")));
                    
94      fail();
                    
121  public void testCircularJitBindingsLeaveNoResidue() {
                    
122    Injector injector = Guice.createInjector(new AbstractModule() {
                    
123      @Override
                    
380  public void testImplementedByEnum() {
                    
381    Injector injector = Guice.createInjector();
                    
382    try {
                    
396  public void testImplicitJdkBindings() {
                    
397    Injector injector = Guice.createInjector();
                    
398    // String has a public nullary constructor, so Guice will call it.
                    
                
ApplicationProcessorSpec.scala https://gitlab.com/zhaosheng/snagajob | Scala | 111 lines
                    
1import com.google.inject.{AbstractModule, Guice}
                    
2import com.google.inject.name.Names
                    
3import main.scala._
                    
4import net.codingwell.scalaguice.ScalaModule
                    
5import org.scalatest._
                    
8
                    
9  val injector = Guice.createInjector(new ApplicationProcessorTestModule())
                    
10  import net.codingwell.scalaguice.InjectorExtensions._
                    
                
ProjectTypeTest.java https://gitlab.com/gaal/che-core | Java | 371 lines
                    
13import com.google.inject.AbstractModule;
                    
14import com.google.inject.Guice;
                    
15import com.google.inject.Injector;
                    
15import com.google.inject.Injector;
                    
16import com.google.inject.multibindings.Multibinder;
                    
17import org.eclipse.che.api.core.NotFoundException;
                    
42        // Bind components
                    
43        injector = Guice.createInjector(new AbstractModule() {
                    
44            @Override
                    
                
ParentInjectorTest.java https://github.com/peterlynch/spice.git | Java | 310 lines
                    
78  public void testGetParent() {
                    
79    Injector top = Guice.createInjector(bindsA);
                    
80    Injector middle = top.createChildInjector(bindsB);
                    
87  public void testChildBindingsNotVisibleToParent() {
                    
88    Injector parent = Guice.createInjector();
                    
89    parent.createChildInjector(bindsB);
                    
144  public void testTypeConvertersConflicting() {
                    
145    Injector parent = Guice.createInjector(bindListConverterModule);
                    
146    Injector child = parent.createChildInjector(bindListConverterModule, bindStringNamedB);
                    
156  public void testInjectorInjectionSpanningInjectors() {
                    
157    Injector parent = Guice.createInjector();
                    
158    Injector child = parent.createChildInjector(new AbstractModule() {
                    
219  public void testErrorInParentButOkayInChild() {
                    
220    Injector parent = Guice.createInjector();
                    
221    Injector childInjector = parent.createChildInjector(new AbstractModule() {
                    
                
NestSlashKeysTest.java https://github.com/jclouds/legacy-jclouds-chef.git | Java | 121 lines
                    
33
                    
34import com.google.common.base.Supplier;
                    
35import com.google.common.base.Suppliers;
                    
35import com.google.common.base.Suppliers;
                    
36import com.google.common.collect.ImmutableMultimap;
                    
37import com.google.inject.AbstractModule;
                    
37import com.google.inject.AbstractModule;
                    
38import com.google.inject.Guice;
                    
39import com.google.inject.Injector;
                    
53   protected void setUpInjector() throws IOException {
                    
54      Injector injector = Guice.createInjector(new AbstractModule() {
                    
55         @Override
                    
                
 

Source

Language