PageRenderTime 22ms queryTime 56ms sortTime 2ms getByIdsTime 39ms findMatchingLines 43ms

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

Not the results you expected?
FreemarkerTemplateCompilerTest.java https://github.com/mgenov/sitebricks.git | Java | 429 lines
                    
4import com.google.inject.AbstractModule;
                    
5import com.google.inject.Guice;
                    
6import com.google.inject.Injector;
                    
60
                    
61    injector = Guice.createInjector(new AbstractModule() {
                    
62      protected void configure() {
                    
236//  public final void readAndRenderRequireWidget() {
                    
237//    final Injector injector = Guice.createInjector(new AbstractModule() {
                    
238//      protected void configure() {
                    
338//  public final void readEmbedWidgetAndStoreAsPage() {
                    
339//    final Injector injector = Guice.createInjector(new AbstractModule() {
                    
340//      protected void configure() {
                    
378//  public final void readEmbedWidgetOnly() {
                    
379//    final Injector injector = Guice.createInjector(new AbstractModule() {
                    
380//      protected void configure() {
                    
                
ParseAsyncJobFromHttpResponseTest.java https://github.com/alasdairhodge/jclouds.git | Java | 222 lines
                    
42import com.google.common.collect.ImmutableMap;
                    
43import com.google.inject.Guice;
                    
44import com.google.inject.Injector;
                    
51
                    
52   Injector i = Guice.createInjector(new GsonModule() {
                    
53
                    
                
VAppHandlerTest.java https://github.com/raschyoung/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
                    
                
Module.html https://github.com/christophercurrie/Moogle-Muice.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>
                    
                
Module.html https://github.com/dain/Moogle-Muice.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>
                    
                
BaseTemplateBuilderLiveTest.java https://github.com/richardcloudsoft/legacy-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));
                    
                
BaseTemplateBuilderLiveTest.java https://github.com/andreisavu/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));
                    
                
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() {
                    
                
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
                    
                
BaseTemplateBuilderLiveTest.java https://github.com/alasdairhodge/jclouds.git | Java | 304 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;
                    
56import com.google.common.collect.Sets;
                    
57import com.google.inject.Guice;
                    
58import com.google.inject.Module;
                    
129      Map<OsFamily, Map<String, String>> map = new BaseComputeServiceContextModule() {
                    
130      }.provideOsVersionMap(new ComputeServiceConstants.ReferenceData(), Guice.createInjector(new GsonModule())
                    
131            .getInstance(Json.class));
                    
                
GreenQloudComputeReviseParsedImageTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 256 lines
                    
44
                    
45import com.google.common.base.Predicates;
                    
46import com.google.common.base.Suppliers;
                    
46import com.google.common.base.Suppliers;
                    
47import com.google.common.collect.ImmutableMap;
                    
48import com.google.common.collect.ImmutableSet;
                    
48import com.google.common.collect.ImmutableSet;
                    
49import com.google.common.collect.Iterables;
                    
50import com.google.common.collect.Sets;
                    
50import com.google.common.collect.Sets;
                    
51import com.google.inject.Guice;
                    
52
                    
243      Map<OsFamily, Map<String, String>> map = new BaseComputeServiceContextModule() {
                    
244      }.provideOsVersionMap(new ComputeServiceConstants.ReferenceData(), Guice.createInjector(new GsonModule())
                    
245               .getInstance(Json.class));
                    
                
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/raschyoung/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
                    
                
Module.html https://github.com/pascallouisperez/guice-jit-providers.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>
                    
                
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
                    
                
ElasticStackClientLiveTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 354 lines
                    
54
                    
55import com.google.common.base.Predicate;
                    
56import com.google.common.base.Predicates;
                    
56import com.google.common.base.Predicates;
                    
57import com.google.common.collect.ImmutableMap;
                    
58import com.google.common.collect.ImmutableSet;
                    
58import com.google.common.collect.ImmutableSet;
                    
59import com.google.common.net.HostAndPort;
                    
60import com.google.gson.Gson;
                    
60import com.google.gson.Gson;
                    
61import com.google.inject.Guice;
                    
62
                    
283   protected void doConnectViaSsh(Server server, LoginCredentials creds) throws IOException {
                    
284      SshClient ssh = Guice.createInjector(new SshjSshClientModule()).getInstance(SshClient.Factory.class).create(
                    
285               HostAndPort.fromParts(server.getVnc().getIp(), 22), creds);
                    
                
FoobarServiceTest.java https://github.com/yizumi/foobar-server.git | Java | 357 lines
                    
10
                    
11import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig;
                    
12import com.google.appengine.tools.development.testing.LocalServiceTestHelper;
                    
12import com.google.appengine.tools.development.testing.LocalServiceTestHelper;
                    
13import com.google.inject.Guice;
                    
14import com.google.inject.Injector;
                    
30		helper.setUp();
                    
31		injector = Guice.createInjector(new TestModule());
                    
32	}
                    
                
TestLifeCycleManager.java https://gitlab.com/CORP-RESELLER/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,
                    
                
BindVAppConfigurationToXmlPayloadTest.java https://github.com/regularfry/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
                    
                
ParseAsyncJobFromHttpResponseTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 222 lines
                    
41import com.google.common.collect.ImmutableMap;
                    
42import com.google.inject.Guice;
                    
43import com.google.inject.Injector;
                    
50
                    
51   Injector i = Guice.createInjector(new GsonModule() {
                    
52
                    
                
ParseAsyncJobFromHttpResponseTest.java https://github.com/andreisavu/jclouds.git | Java | 222 lines
                    
41import com.google.common.collect.ImmutableMap;
                    
42import com.google.inject.Guice;
                    
43import com.google.inject.Injector;
                    
50
                    
51   Injector i = Guice.createInjector(new GsonModule() {
                    
52
                    
                
AWSRunningInstanceToNodeMetadataTest.java https://github.com/alasdairhodge/jclouds.git | Java | 201 lines
                    
46
                    
47import com.google.common.base.Supplier;
                    
48import com.google.common.base.Suppliers;
                    
48import com.google.common.base.Suppliers;
                    
49import com.google.common.cache.LoadingCache;
                    
50import com.google.common.cache.CacheBuilder;
                    
50import com.google.common.cache.CacheBuilder;
                    
51import com.google.common.cache.CacheLoader;
                    
52import com.google.common.collect.ImmutableMap;
                    
54import com.google.common.collect.Iterables;
                    
55import com.google.inject.Guice;
                    
56
                    
70   protected void setUpInjector() {
                    
71      dateService = Guice.createInjector().getInstance(DateService.class);
                    
72      assert dateService != null;
                    
                
S3ParserTest.java https://github.com/alasdairhodge/jclouds.git | Java | 189 lines
                    
51import com.google.common.collect.Iterables;
                    
52import com.google.inject.Guice;
                    
53import com.google.inject.Injector;
                    
68   protected void setUpInjector() {
                    
69      injector = Guice.createInjector(new SaxParserModule() {
                    
70         public void configure() {
                    
                
BindVAppConfigurationToXmlPayloadTest.java https://github.com/vkris/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
                    
                
BindVAppConfigurationToXmlPayloadTest.java https://github.com/ddurnev/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
                    
                
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() {
                    
                
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
                    
                
VAppHandlerTest.java https://github.com/richardcloudsoft/legacy-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
                    
                
VAppHandlerTest.java https://github.com/andreisavu/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
                    
                
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,
                    
                
TestLifeCycleManager.java https://gitlab.com/vectorci/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,
                    
                
FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeatTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 182 lines
                    
30
                    
31import com.google.common.base.Supplier;
                    
32import com.google.common.base.Suppliers;
                    
33import com.google.inject.AbstractModule;
                    
34import com.google.inject.Guice;
                    
35import com.google.inject.TypeLiteral;
                    
111   public void testPropertyChangesDelimiter() {
                    
112      GroupNamingConvention fn = Guice.createInjector(new AbstractModule() {
                    
113
                    
126   public void testPropertyChangesPrefix() {
                    
127      GroupNamingConvention fn = Guice.createInjector(new AbstractModule() {
                    
128
                    
142   public void testCanChangeSuffixSupplier() {
                    
143      GroupNamingConvention fn = Guice.createInjector(new AbstractModule() {
                    
144
                    
                
FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeatTest.java https://github.com/andreisavu/jclouds.git | Java | 182 lines
                    
30
                    
31import com.google.common.base.Supplier;
                    
32import com.google.common.base.Suppliers;
                    
33import com.google.inject.AbstractModule;
                    
34import com.google.inject.Guice;
                    
35import com.google.inject.TypeLiteral;
                    
111   public void testPropertyChangesDelimiter() {
                    
112      GroupNamingConvention fn = Guice.createInjector(new AbstractModule() {
                    
113
                    
126   public void testPropertyChangesPrefix() {
                    
127      GroupNamingConvention fn = Guice.createInjector(new AbstractModule() {
                    
128
                    
142   public void testCanChangeSuffixSupplier() {
                    
143      GroupNamingConvention fn = Guice.createInjector(new AbstractModule() {
                    
144
                    
                
RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilCompleteTest.java https://github.com/machak/jclouds.git | Java | 245 lines
                    
44
                    
45import com.google.common.base.Functions;
                    
46import com.google.common.collect.ImmutableMap;
                    
46import com.google.common.collect.ImmutableMap;
                    
47import com.google.common.collect.ImmutableSet;
                    
48import com.google.inject.AbstractModule;
                    
48import com.google.inject.AbstractModule;
                    
49import com.google.inject.Guice;
                    
50import com.google.inject.assistedinject.FactoryModuleBuilder;
                    
58
                    
59   BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory statusFactory = Guice.createInjector(
                    
60            new ExecutorServiceModule(MoreExecutors.sameThreadExecutor(), MoreExecutors.sameThreadExecutor()),
                    
74   // fail faster than normal
                    
75   Timeouts timeouts = Guice.createInjector(new AbstractModule() {
                    
76
                    
                
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);
                    
                
VAppHandlerTest.java https://github.com/regularfry/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();
                    
                
VirtualGuestToNodeMetadataTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 218 lines
                    
44
                    
45import com.google.common.base.Function;
                    
46import com.google.common.base.Supplier;
                    
46import com.google.common.base.Supplier;
                    
47import com.google.common.base.Suppliers;
                    
48import com.google.common.collect.ImmutableSet;
                    
48import com.google.common.collect.ImmutableSet;
                    
49import com.google.inject.Guice;
                    
50
                    
55public class VirtualGuestToNodeMetadataTest {
                    
56   GroupNamingConvention.Factory namingConvention = Guice.createInjector().getInstance(GroupNamingConvention.Factory.class);
                    
57
                    
                
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,
                    
                
WebAppTests.java https://github.com/vicaya/hadoop-patches.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));
                    
                
VAppHandlerTest.java https://github.com/vkris/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
                    
                
VAppHandlerTest.java https://github.com/ddurnev/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
                    
                
RestfuWebServiceWithSubpaths2AcceptanceTest.java https://github.com/mgenov/sitebricks.git | Java | 167 lines
                    
4import com.google.inject.AbstractModule;
                    
5import com.google.inject.Guice;
                    
6import com.google.inject.Injector;
                    
25  public void shouldServiceTopLevelDynamicPath() {
                    
26    WebResponse response = createInjector()
                    
27        .getInstance(Web.class)
                    
36  public void shouldServiceFirstLevelStaticPath() {
                    
37    WebResponse response = createInjector()
                    
38        .getInstance(Web.class)
                    
47  public void shouldServiceSameFirstLevelStaticPathWithPutMethod() {
                    
48    WebResponse response = createInjector()
                    
49        .getInstance(Web.class)
                    
137	private Injector createInjector() {
                    
138		return Guice.createInjector(new AbstractModule() {
                    
139	      protected void configure() {
                    
                
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
                    
                
CredentialStoreModuleTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 206 lines
                    
42import com.google.common.io.InputSupplier;
                    
43import com.google.inject.Guice;
                    
44import com.google.inject.Injector;
                    
67   public void deleteObject(String identity, String credential) throws InterruptedException, IOException {
                    
68      Injector injector = createInjector();
                    
69      Map<String, InputStream> map = getMap(injector);
                    
111
                    
112      put(map, getStore(createInjector()), "test", new Credentials("user", "pass"));
                    
113      checkConsistent(map, getStore(createInjector()), "test", new Credentials("user", "pass"));
                    
149   protected Injector createInjectorWithProvidedMap(Map<String, InputStream> map) {
                    
150      return Guice.createInjector(new CredentialStoreModule(map), new GsonModule());
                    
151   }
                    
153   protected Injector createInjector() {
                    
154      return Guice.createInjector(new CredentialStoreModule(), new GsonModule());
                    
155   }
                    
                
CredentialStoreModuleTest.java https://github.com/andreisavu/jclouds.git | Java | 206 lines
                    
42import com.google.common.io.InputSupplier;
                    
43import com.google.inject.Guice;
                    
44import com.google.inject.Injector;
                    
67   public void deleteObject(String identity, String credential) throws InterruptedException, IOException {
                    
68      Injector injector = createInjector();
                    
69      Map<String, InputStream> map = getMap(injector);
                    
111
                    
112      put(map, getStore(createInjector()), "test", new Credentials("user", "pass"));
                    
113      checkConsistent(map, getStore(createInjector()), "test", new Credentials("user", "pass"));
                    
149   protected Injector createInjectorWithProvidedMap(Map<String, InputStream> map) {
                    
150      return Guice.createInjector(new CredentialStoreModule(map), new GsonModule());
                    
151   }
                    
153   protected Injector createInjector() {
                    
154      return Guice.createInjector(new CredentialStoreModule(), new GsonModule());
                    
155   }
                    
                
WebAppTests.java https://github.com/patrickangeles/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));
                    
                
BindVAppConfigurationToXmlPayloadTest.java https://github.com/edwardt/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
                    
                
WebAppTests.java https://github.com/Beckham007/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));
                    
                
EmbeddedOozieServer.java https://github.com/apache/oozie.git | Java | 290 lines
                    
20
                    
21import com.google.inject.Guice;
                    
22import com.google.inject.Inject;
                    
22import com.google.inject.Inject;
                    
23import com.google.inject.Injector;
                    
24import com.google.inject.ProvisionException;
                    
25import org.apache.hadoop.conf.Configuration;
                    
26import org.apache.oozie.server.guice.OozieGuiceModule;
                    
27import org.apache.oozie.service.ConfigurationService;
                    
268    public static void main(String[] args) throws Exception {
                    
269        final Injector guiceInjector = Guice.createInjector(new OozieGuiceModule());
                    
270
                    
272        try {
                    
273            embeddedOozieServer = guiceInjector.getInstance(EmbeddedOozieServer.class);
                    
274        }
                    
                
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());
                    
                
WebAppTests.java https://github.com/yuvrajm/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));
                    
                
YamlNodeStoreModuleTest.java https://github.com/vkris/jclouds.git | Java | 196 lines
                    
42import com.google.inject.AbstractModule;
                    
43import com.google.inject.Guice;
                    
44import com.google.inject.Injector;
                    
75      checkConsistent(map, getStore(createInjectorWithProvidedMap(map)), "test", "instance1", "instancename");
                    
76      checkConsistent(map, getStore(createInjectorWithProvidedMap(map)), "test", "instance1", "instancename");
                    
77      remove(map, getStore(createInjectorWithProvidedMap(map)), "test");
                    
84
                    
85      Injector injector = createInjectorWithProvidedMap(map);
                    
86      assertEquals(injector.getInstance(Key.get(new TypeLiteral<Map<String, InputStream>>() {
                    
127   protected Injector createInjectorWithProvidedMap(Map<String, InputStream> map) {
                    
128      return Guice.createInjector(new YamlNodeStoreModule(map), new AbstractModule() {
                    
129
                    
139   protected Injector createInjector() {
                    
140      return Guice.createInjector(new YamlNodeStoreModule(), new AbstractModule() {
                    
141
                    
                
YamlNodeStoreModuleTest.java https://github.com/ddurnev/jclouds.git | Java | 196 lines
                    
42import com.google.inject.AbstractModule;
                    
43import com.google.inject.Guice;
                    
44import com.google.inject.Injector;
                    
75      checkConsistent(map, getStore(createInjectorWithProvidedMap(map)), "test", "instance1", "instancename");
                    
76      checkConsistent(map, getStore(createInjectorWithProvidedMap(map)), "test", "instance1", "instancename");
                    
77      remove(map, getStore(createInjectorWithProvidedMap(map)), "test");
                    
84
                    
85      Injector injector = createInjectorWithProvidedMap(map);
                    
86      assertEquals(injector.getInstance(Key.get(new TypeLiteral<Map<String, InputStream>>() {
                    
127   protected Injector createInjectorWithProvidedMap(Map<String, InputStream> map) {
                    
128      return Guice.createInjector(new YamlNodeStoreModule(map), new AbstractModule() {
                    
129
                    
139   protected Injector createInjector() {
                    
140      return Guice.createInjector(new YamlNodeStoreModule(), new AbstractModule() {
                    
141
                    
                
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
                    
                
PokerActivator.java https://github.com/boltonli/Poker-Galore.git | Java | 267 lines
                    
38import com.cubeia.games.poker.tournament.activator.TournamentTableSettings;
                    
39import com.cubeia.poker.PokerGuiceModule;
                    
40import com.cubeia.poker.PokerState;
                    
44import com.cubeia.poker.timing.Timings;
                    
45import com.google.inject.Guice;
                    
46import com.google.inject.Injector;
                    
86        initJmx();
                    
87        log.debug("Calling Guice.createInjector");
                    
88        injector = Guice.createInjector(
                    
88        injector = Guice.createInjector(
                    
89        		new ActivatorGuiceModule(context),
                    
90        		new PokerGuiceModule());
                    
                
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);
                    
                
ParseAsyncJobFromHttpResponseTest.java https://github.com/vkris/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
                    
                
ParseAsyncJobFromHttpResponseTest.java https://github.com/ddurnev/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
                    
                
CommandTestSupport.java https://github.com/olamy/tesla.git | Java | 248 lines
                    
18import com.google.inject.AbstractModule;
                    
19import com.google.inject.Guice;
                    
20import com.google.inject.Injector;
                    
20import com.google.inject.Injector;
                    
21import com.google.inject.Module;
                    
22import com.google.inject.Stage;
                    
37import org.sonatype.gshell.console.ConsolePrompt;
                    
38import org.sonatype.gshell.guice.CoreModule;
                    
39import org.sonatype.gshell.logging.LoggingSystem;
                    
46import org.sonatype.gshell.variables.VariablesImpl;
                    
47import org.sonatype.guice.bean.binders.SpaceModule;
                    
48import org.sonatype.guice.bean.binders.WireModule;
                    
122
                    
123        Injector injector = Guice.createInjector(Stage.DEVELOPMENT, new WireModule(modules));
                    
124        container.add(injector, 0);
                    
                
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);
                    
                
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();
                    
                
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)));
                    
                
LimeTestUtils.java https://github.com/r3n/limewire5-ruby.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     */
                    
                
LocalizationTest.java https://github.com/mgenov/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
                    
                
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
                    
                
BindVAppConfigurationToXmlPayloadTest.java https://github.com/machak/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
                    
                
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);
                    
                
RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilCompleteTest.java https://github.com/markkent/jclouds.git | Java | 245 lines
                    
44
                    
45import com.google.common.base.Functions;
                    
46import com.google.common.collect.ImmutableMap;
                    
46import com.google.common.collect.ImmutableMap;
                    
47import com.google.common.collect.ImmutableSet;
                    
48import com.google.inject.AbstractModule;
                    
48import com.google.inject.AbstractModule;
                    
49import com.google.inject.Guice;
                    
50import com.google.inject.assistedinject.FactoryModuleBuilder;
                    
58
                    
59   BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory statusFactory = Guice.createInjector(
                    
60            new ExecutorServiceModule(MoreExecutors.sameThreadExecutor(), MoreExecutors.sameThreadExecutor()),
                    
74   // fail faster than normal
                    
75   Timeouts timeouts = Guice.createInjector(new AbstractModule() {
                    
76
                    
                
BindVAppConfigurationToXmlPayloadTest.java https://github.com/alasdairhodge/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
                    
                
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
                    
                
ElasticStackClientLiveTest.java https://github.com/vkris/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);
                    
                
ElasticStackClientLiveTest.java https://github.com/ddurnev/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);
                    
                
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);
                    
                
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
                    
                
VAppHandlerTest.java https://github.com/edwardt/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
                    
                
VDCHandlerTest.java https://github.com/vkris/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/ddurnev/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);
                    
                
ActivitiesController.java https://github.com/rik0/blogracy.git | Java | 212 lines
                    
76import com.google.inject.Binder;
                    
77import com.google.inject.Guice;
                    
78import com.google.inject.Module;
                    
78import com.google.inject.Module;
                    
79import com.google.inject.name.Names;
                    
80
                    
96    private static BeanJsonConverter CONVERTER = new BeanJsonConverter(
                    
97            Guice.createInjector(new Module() {
                    
98                @Override
                    
                
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 =
                    
                
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")
                    
                
VAppHandlerTest.java https://github.com/gnodet/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
                    
                
ParseObjectMetadataFromHeadersTest.java https://github.com/vkris/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
                    
                
ParseObjectMetadataFromHeadersTest.java https://github.com/ddurnev/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
                    
                
MainUI.java https://github.com/mistaecko/jstestdriver.git | Java | 178 lines
                    
24import com.google.inject.Binder;
                    
25import com.google.inject.Guice;
                    
26import com.google.inject.Injector;
                    
32import com.google.jstestdriver.CapturedBrowsers;
                    
33import com.google.jstestdriver.Flags;
                    
34import com.google.jstestdriver.JsTestDriver;
                    
42import com.google.jstestdriver.config.YamlParser;
                    
43import com.google.jstestdriver.guice.TestResultPrintingModule.TestResultPrintingInitializer;
                    
44import com.google.jstestdriver.hooks.PluginInitializer;
                    
133      });
                    
134      final Injector initializeInjector = Guice.createInjector(initializeModules);
                    
135
                    
140
                    
141      final Injector injector = Guice.createInjector(actionRunnerModules);
                    
142
                    
                
StatsIntegrationTest.java https://github.com/mgenov/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
                    
                
ElasticStackErrorHandlerTest.java https://github.com/vkris/jclouds.git | Java | 140 lines
                    
38
                    
39import com.google.inject.Guice;
                    
40
                    
102
                    
103      ElasticStackErrorHandler function = Guice.createInjector().getInstance(ElasticStackErrorHandler.class);
                    
104
                    
                
ElasticStackErrorHandlerTest.java https://github.com/ddurnev/jclouds.git | Java | 140 lines
                    
38
                    
39import com.google.inject.Guice;
                    
40
                    
102
                    
103      ElasticStackErrorHandler function = Guice.createInjector().getInstance(ElasticStackErrorHandler.class);
                    
104
                    
                
Rules4JBIBootstrap.java https://bitbucket.org/ssteinmetz/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        
                    
                
BindVAppConfigurationToXmlPayloadTest.java https://github.com/mcali/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
                    
                
BaseLoadBalancerServiceLiveTest.java https://github.com/alasdairhodge/jclouds.git | Java | 181 lines
                    
20
                    
21import static com.google.common.base.Preconditions.checkNotNull;
                    
22import static org.testng.Assert.assertNotNull;
                    
50import com.google.common.collect.ImmutableSet;
                    
51import com.google.inject.Guice;
                    
52import com.google.inject.Module;
                    
134   protected void buildSocketTester() {
                    
135      SocketOpen socketOpen = Guice.createInjector(getSshModule()).getInstance(SocketOpen.class);
                    
136      socketTester = new RetryablePredicate<IPSocket>(socketOpen, 60, 1, TimeUnit.SECONDS);
                    
                
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() {
                    
                
ExecutorServiceModuleTest.java https://github.com/vkris/jclouds.git | Java | 258 lines
                    
38import com.google.common.collect.ImmutableList;
                    
39import com.google.inject.Guice;
                    
40import com.google.inject.Injector;
                    
52   public void testShutdownOnClose() throws IOException {
                    
53      Injector i = Guice.createInjector();
                    
54
                    
78      
                    
79      Injector i = Guice.createInjector(module);
                    
80      assertEquals(module.userExecutorFromConstructor, null);
                    
111      
                    
112      Injector i = Guice.createInjector(module);
                    
113      Closer closer = i.getInstance(Closer.class);
                    
197
                    
198      Injector i = Guice.createInjector(module);
                    
199      Closer closer = i.getInstance(Closer.class);
                    
                
ExecutorServiceModuleTest.java https://github.com/ddurnev/jclouds.git | Java | 258 lines
                    
38import com.google.common.collect.ImmutableList;
                    
39import com.google.inject.Guice;
                    
40import com.google.inject.Injector;
                    
52   public void testShutdownOnClose() throws IOException {
                    
53      Injector i = Guice.createInjector();
                    
54
                    
78      
                    
79      Injector i = Guice.createInjector(module);
                    
80      assertEquals(module.userExecutorFromConstructor, null);
                    
111      
                    
112      Injector i = Guice.createInjector(module);
                    
113      Closer closer = i.getInstance(Closer.class);
                    
197
                    
198      Injector i = Guice.createInjector(module);
                    
199      Closer closer = i.getInstance(Closer.class);
                    
                
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(", ")})"
                    
                
MediaController.java https://github.com/rik0/blogracy.git | Java | 558 lines
                    
76import com.google.inject.Binder;
                    
77import com.google.inject.Guice;
                    
78import com.google.inject.Module;
                    
78import com.google.inject.Module;
                    
79import com.google.inject.name.Names;
                    
80
                    
96    private static BeanJsonConverter CONVERTER = new BeanJsonConverter(
                    
97            Guice.createInjector(new Module() {
                    
98                @Override
                    
                
VAppHandlerTest.java https://github.com/ahgittin/legacy-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
                    
                
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
                    
                
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);
                    
                
ExecutorServiceModuleTest.java https://github.com/andreisavu/jclouds.git | Java | 259 lines
                    
39import com.google.common.collect.ImmutableList;
                    
40import com.google.inject.Guice;
                    
41import com.google.inject.Injector;
                    
53   public void testShutdownOnClose() throws IOException {
                    
54      Injector i = Guice.createInjector();
                    
55
                    
79      
                    
80      Injector i = Guice.createInjector(module);
                    
81      assertEquals(module.userExecutorFromConstructor, null);
                    
112      
                    
113      Injector i = Guice.createInjector(module);
                    
114      Closer closer = i.getInstance(Closer.class);
                    
198
                    
199      Injector i = Guice.createInjector(module);
                    
200      Closer closer = i.getInstance(Closer.class);
                    
                
ParseAsyncJobFromHttpResponseTest.java https://github.com/edwardt/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
                    
                
ParseServerFromJsonResponseTest.java https://github.com/regularfry/jclouds.git | Java | 107 lines
                    
20
                    
21import com.google.common.collect.ImmutableList;
                    
22import com.google.common.collect.ImmutableMap;
                    
23import com.google.common.collect.Iterables;
                    
24import com.google.inject.Guice;
                    
25import com.google.inject.Injector;
                    
25import com.google.inject.Injector;
                    
26import com.google.inject.Key;
                    
27import com.google.inject.TypeLiteral;
                    
90
                    
91      Injector i = Guice.createInjector(new GsonModule() {
                    
92         @Override
                    
                
VAppHandlerTest.java https://github.com/machak/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
                    
                
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);
                    
                
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));
                    
                
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    }
                    
                
ExtensionFinder.java https://github.com/justinedelson/jenkins.git | Java | 454 lines
                    
28import com.google.inject.CreationException;
                    
29import com.google.inject.Guice;
                    
30import com.google.inject.Injector;
                    
35import com.google.inject.Scopes;
                    
36import com.google.inject.name.Names;
                    
37import com.google.common.collect.ImmutableList;
                    
146    @Extension
                    
147    public static final class GuiceFinder extends AbstractGuiceFinder<Extension> {
                    
148        public GuiceFinder() {
                    
179            try {
                    
180                container = Guice.createInjector(modules);
                    
181            } catch (CreationException e) {
                    
184                // by just including the core
                    
185                container = Guice.createInjector(new SezpozModule(annotationType,Jenkins.class.getClassLoader()));
                    
186            }
                    
                
VAppHandlerTest.java https://github.com/alasdairhodge/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
                    
                
GuiceServletConfig.java https://github.com/regularfry/jclouds.git | Java | 169 lines
                    
56import com.google.appengine.api.taskqueue.TaskOptions.Method;
                    
57import com.google.appengine.repackaged.com.google.common.base.Splitter;
                    
58import com.google.common.collect.ImmutableSet;
                    
60import com.google.common.io.Closeables;
                    
61import com.google.inject.Guice;
                    
62import com.google.inject.Injector;
                    
65import com.google.inject.name.Names;
                    
66import com.google.inject.servlet.GuiceServletContextListener;
                    
67import com.google.inject.servlet.ServletModule;
                    
73 */
                    
74public class GuiceServletConfig extends GuiceServletContextListener {
                    
75   public static final String PROPERTY_BLOBSTORE_CONTEXTS = "blobstore.contexts";
                    
147   protected Injector getInjector() {
                    
148      return Guice.createInjector(new ServletModule() {
                    
149         @Override
                    
                
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
                    
                
RedirectionRetryHandlerTest.java https://github.com/vkris/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")
                    
                
RedirectionRetryHandlerTest.java https://github.com/ddurnev/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")
                    
                
SshjSshClientTest.java https://github.com/alasdairhodge/jclouds.git | Java | 215 lines
                    
20
                    
21import static com.google.inject.name.Names.bindProperties;
                    
22import static org.easymock.EasyMock.expect;
                    
52import com.google.inject.AbstractModule;
                    
53import com.google.inject.Guice;
                    
54import com.google.inject.Injector;
                    
54import com.google.inject.Injector;
                    
55import com.google.inject.Module;
                    
56
                    
75   protected SshjSshClient createClient(final Properties props) {
                    
76      Injector i = Guice.createInjector(module(), new AbstractModule() {
                    
77
                    
                
ParseAsyncJobFromHttpResponseTest.java https://github.com/gnodet/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
                    
                
RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilCompleteTest.java https://github.com/alasdairhodge/jclouds.git | Java | 287 lines
                    
49
                    
50import com.google.common.base.Functions;
                    
51import com.google.common.base.Stopwatch;
                    
51import com.google.common.base.Stopwatch;
                    
52import com.google.common.collect.ImmutableMap;
                    
53import com.google.common.collect.ImmutableSet;
                    
54import com.google.inject.AbstractModule;
                    
55import com.google.inject.Guice;
                    
56import com.google.inject.assistedinject.FactoryModuleBuilder;
                    
64
                    
65   BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory statusFactory = Guice.createInjector(
                    
66            new ExecutorServiceModule(MoreExecutors.sameThreadExecutor(), MoreExecutors.sameThreadExecutor()),
                    
80   // fail faster than normal
                    
81   Timeouts timeouts = Guice.createInjector(new AbstractModule() {
                    
82
                    
                
WebAppTests.java https://github.com/dralves/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));
                    
                
WebAppTests.java https://github.com/gregsfortytwo/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));
                    
                
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
                    
                
BaseVCloudDirectorApiLiveTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 752 lines
                    
24import static com.google.common.collect.Iterables.contains;
                    
25import static com.google.common.collect.Iterables.find;
                    
26import static com.google.common.collect.Iterables.getFirst;
                    
26import static com.google.common.collect.Iterables.getFirst;
                    
27import static com.google.common.collect.Iterables.tryFind;
                    
28import static org.jclouds.util.Predicates2.retry;
                    
107import com.google.common.base.Optional;
                    
108import com.google.common.base.Predicate;
                    
109import com.google.common.base.Predicates;
                    
115import com.google.common.reflect.TypeToken;
                    
116import com.google.inject.Guice;
                    
117
                    
172   protected void setupDateService() {
                    
173      dateService = Guice.createInjector().getInstance(DateService.class);
                    
174      assertNotNull(dateService);
                    
                
RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilCompleteTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 344 lines
                    
20
                    
21import static com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor;
                    
22import static com.google.inject.name.Names.named;
                    
46
                    
47import com.google.common.base.Functions;
                    
48import com.google.common.collect.ImmutableMap;
                    
48import com.google.common.collect.ImmutableMap;
                    
49import com.google.common.eventbus.EventBus;
                    
50import com.google.inject.AbstractModule;
                    
50import com.google.inject.AbstractModule;
                    
51import com.google.inject.Guice;
                    
52import com.google.inject.Injector;
                    
59public class RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilCompleteTest {
                    
60   Injector injector = Guice.createInjector(new ExecutorServiceModule(sameThreadExecutor(), sameThreadExecutor()),
                    
61         new AbstractModule() {
                    
                
CloudSigmaClientLiveTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 448 lines
                    
56
                    
57import com.google.common.base.Predicate;
                    
58import com.google.common.base.Predicates;
                    
58import com.google.common.base.Predicates;
                    
59import com.google.common.collect.ImmutableMap;
                    
60import com.google.common.collect.ImmutableSet;
                    
60import com.google.common.collect.ImmutableSet;
                    
61import com.google.common.net.HostAndPort;
                    
62import com.google.gson.Gson;
                    
62import com.google.gson.Gson;
                    
63import com.google.inject.Guice;
                    
64
                    
388   protected void doConnectViaSsh(Server server, LoginCredentials creds) throws IOException {
                    
389      SshClient ssh = Guice.createInjector(new SshjSshClientModule()).getInstance(SshClient.Factory.class)
                    
390            .create(HostAndPort.fromParts(server.getVnc().getIp(), 22), creds);
                    
                
BaseVCloudDirectorApiLiveTest.java https://github.com/andreisavu/jclouds.git | Java | 766 lines
                    
24import static com.google.common.collect.Iterables.contains;
                    
25import static com.google.common.collect.Iterables.find;
                    
26import static com.google.common.collect.Iterables.getFirst;
                    
26import static com.google.common.collect.Iterables.getFirst;
                    
27import static com.google.common.collect.Iterables.tryFind;
                    
28import static org.jclouds.vcloud.director.v1_5.VCloudDirectorLiveTestConstants.ENTITY_NON_NULL;
                    
107import com.google.common.base.Optional;
                    
108import com.google.common.base.Predicate;
                    
109import com.google.common.base.Predicates;
                    
115import com.google.common.reflect.TypeToken;
                    
116import com.google.inject.Guice;
                    
117
                    
172   protected void setupDateService() {
                    
173      dateService = Guice.createInjector().getInstance(DateService.class);
                    
174      assertNotNull(dateService);
                    
                
RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilCompleteTest.java https://github.com/andreisavu/jclouds.git | Java | 354 lines
                    
44
                    
45import com.google.common.base.Functions;
                    
46import com.google.common.collect.ImmutableMap;
                    
46import com.google.common.collect.ImmutableMap;
                    
47import com.google.common.eventbus.EventBus;
                    
48import com.google.inject.AbstractModule;
                    
48import com.google.inject.AbstractModule;
                    
49import com.google.inject.Guice;
                    
50import com.google.inject.assistedinject.FactoryModuleBuilder;
                    
60   
                    
61   BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory statusFactory = Guice.createInjector(
                    
62            new ExecutorServiceModule(MoreExecutors.sameThreadExecutor(), MoreExecutors.sameThreadExecutor()),
                    
76   // fail faster than normal
                    
77   Timeouts timeouts = Guice.createInjector(new AbstractModule() {
                    
78
                    
                
ExtensionFinder.java https://github.com/redsolo/jenkins-1.git | Java | 454 lines
                    
28import com.google.inject.CreationException;
                    
29import com.google.inject.Guice;
                    
30import com.google.inject.Injector;
                    
35import com.google.inject.Scopes;
                    
36import com.google.inject.name.Names;
                    
37import com.google.common.collect.ImmutableList;
                    
146    @Extension
                    
147    public static final class GuiceFinder extends AbstractGuiceFinder<Extension> {
                    
148        public GuiceFinder() {
                    
179            try {
                    
180                container = Guice.createInjector(modules);
                    
181            } catch (CreationException e) {
                    
184                // by just including the core
                    
185                container = Guice.createInjector(new SezpozModule(annotationType,Jenkins.class.getClassLoader()));
                    
186            }
                    
                
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);
                    
                
VirtualBoxComputeServiceAdapterTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 88 lines
                    
46import com.beust.jcommander.internal.Lists;
                    
47import com.google.common.base.Function;
                    
48import com.google.common.base.Suppliers;
                    
48import com.google.common.base.Suppliers;
                    
49import com.google.inject.Guice;
                    
50
                    
54   Map<OsFamily, Map<String, String>> osMap = new BaseComputeServiceContextModule() {
                    
55   }.provideOsVersionMap(new ComputeServiceConstants.ReferenceData(), Guice.createInjector(new GsonModule())
                    
56         .getInstance(Json.class));
                    
                
VDCHandlerTest.java https://github.com/richardcloudsoft/legacy-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/andreisavu/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);
                    
                
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>();
                    
                
InstantiateVAppTemplateOptionsTest.java https://github.com/vkris/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
                    
                
InstantiateVAppTemplateOptionsTest.java https://github.com/ddurnev/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
                    
                
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
                    
                
S3ParserTest.java https://github.com/vkris/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() {
                    
                
S3ParserTest.java https://github.com/ddurnev/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() {
                    
                
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));
                    
                
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
                    
                
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  }
                    
                
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
                    
                
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
                    
                
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);
                    
                
YamlNodeStoreModuleTest.java https://github.com/machak/jclouds.git | Java | 196 lines
                    
42import com.google.inject.AbstractModule;
                    
43import com.google.inject.Guice;
                    
44import com.google.inject.Injector;
                    
75      checkConsistent(map, getStore(createInjectorWithProvidedMap(map)), "test", "instance1", "instancename");
                    
76      checkConsistent(map, getStore(createInjectorWithProvidedMap(map)), "test", "instance1", "instancename");
                    
77      remove(map, getStore(createInjectorWithProvidedMap(map)), "test");
                    
84
                    
85      Injector injector = createInjectorWithProvidedMap(map);
                    
86      assertEquals(injector.getInstance(Key.get(new TypeLiteral<Map<String, InputStream>>() {
                    
127   protected Injector createInjectorWithProvidedMap(Map<String, InputStream> map) {
                    
128      return Guice.createInjector(new YamlNodeStoreModule(map), new AbstractModule() {
                    
129
                    
139   protected Injector createInjector() {
                    
140      return Guice.createInjector(new YamlNodeStoreModule(), new AbstractModule() {
                    
141
                    
                
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());
                    
                
ElasticStackClientLiveTest.java https://github.com/edwardt/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);
                    
                
Rules4JBIComponent.java https://bitbucket.org/ssteinmetz/openesb-components.git | Java | 365 lines
                    
39
                    
40import com.google.inject.Guice;
                    
41import com.google.inject.Inject;
                    
41import com.google.inject.Inject;
                    
42import com.google.inject.Injector;
                    
43import com.google.inject.Stage;
                    
48
                    
49import org.openesb.components.rules4jbi.engine.guice.annotations.Main;
                    
50import org.openesb.components.rules4jbi.engine.guice.annotations.MessageExchangeProcessor;
                    
50import org.openesb.components.rules4jbi.engine.guice.annotations.MessageExchangeProcessor;
                    
51import org.openesb.components.rules4jbi.engine.guice.modules.ConstantModule;
                    
52import org.openesb.components.rules4jbi.engine.guice.modules.ExecutorModule;
                    
142        
                    
143        injector = Guice.createInjector(Stage.PRODUCTION,
                    
144                new JBIModule(componentContext),
                    
                
VDCHandlerTest.java https://github.com/edwardt/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);
                    
                
WebAppTests.java https://github.com/lobotomyme/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));
                    
                
Errors.java https://bitbucket.org/paulscott56/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);
                    
                
ParseServerFromJsonResponseTest.java https://github.com/vkris/jclouds.git | Java | 107 lines
                    
20
                    
21import com.google.common.collect.ImmutableList;
                    
22import com.google.common.collect.ImmutableMap;
                    
23import com.google.common.collect.Iterables;
                    
24import com.google.inject.Guice;
                    
25import com.google.inject.Injector;
                    
25import com.google.inject.Injector;
                    
26import com.google.inject.Key;
                    
27import com.google.inject.TypeLiteral;
                    
90
                    
91      Injector i = Guice.createInjector(new GsonModule() {
                    
92         @Override
                    
                
ParseServerFromJsonResponseTest.java https://github.com/ddurnev/jclouds.git | Java | 107 lines
                    
20
                    
21import com.google.common.collect.ImmutableList;
                    
22import com.google.common.collect.ImmutableMap;
                    
23import com.google.common.collect.Iterables;
                    
24import com.google.inject.Guice;
                    
25import com.google.inject.Injector;
                    
25import com.google.inject.Injector;
                    
26import com.google.inject.Key;
                    
27import com.google.inject.TypeLiteral;
                    
90
                    
91      Injector i = Guice.createInjector(new GsonModule() {
                    
92         @Override
                    
                
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);
                    
                
BaseParserTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 102 lines
                    
39
                    
40import com.google.common.base.Function;
                    
41import com.google.common.base.Throwables;
                    
42import com.google.common.collect.ImmutableList;
                    
43import com.google.inject.Guice;
                    
44import com.google.inject.Injector;
                    
87   protected Injector injector() {
                    
88      return Guice.createInjector(new GsonModule() {
                    
89         protected void configure() {
                    
                
ParseFlavorListTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 87 lines
                    
36import com.google.common.collect.ImmutableSet;
                    
37import com.google.inject.Guice;
                    
38import com.google.inject.Injector;
                    
83   protected Injector injector() {
                    
84      return Guice.createInjector(new NovaParserModule(), new GsonModule());
                    
85   }
                    
                
ParseServerListTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 87 lines
                    
36import com.google.common.collect.ImmutableSet;
                    
37import com.google.inject.Guice;
                    
38import com.google.inject.Injector;
                    
83   protected Injector injector() {
                    
84      return Guice.createInjector(new NovaParserModule(), new GsonModule());
                    
85   }
                    
                
ParseImageListTest.java https://github.com/richardcloudsoft/legacy-jclouds.git | Java | 87 lines
                    
36import com.google.common.collect.ImmutableSet;
                    
37import com.google.inject.Guice;
                    
38import com.google.inject.Injector;
                    
83   protected Injector injector() {
                    
84      return Guice.createInjector(new NovaParserModule(), new GsonModule());
                    
85   }
                    
                
ParseServerListTest.java https://github.com/andreisavu/jclouds.git | Java | 87 lines
                    
36import com.google.common.collect.ImmutableSet;
                    
37import com.google.inject.Guice;
                    
38import com.google.inject.Injector;
                    
83   protected Injector injector() {
                    
84      return Guice.createInjector(new NovaParserModule(), new GsonModule());
                    
85   }
                    
                
ParseFlavorListTest.java https://github.com/andreisavu/jclouds.git | Java | 87 lines
                    
36import com.google.common.collect.ImmutableSet;
                    
37import com.google.inject.Guice;
                    
38import com.google.inject.Injector;
                    
83   protected Injector injector() {
                    
84      return Guice.createInjector(new NovaParserModule(), new GsonModule());
                    
85   }
                    
                
ParseImageListTest.java https://github.com/andreisavu/jclouds.git | Java | 87 lines
                    
36import com.google.common.collect.ImmutableSet;
                    
37import com.google.inject.Guice;
                    
38import com.google.inject.Injector;
                    
83   protected Injector injector() {
                    
84      return Guice.createInjector(new NovaParserModule(), new GsonModule());
                    
85   }
                    
                
BindVAppConfigurationToXmlPayloadTest.java https://github.com/markkent/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
                    
                
ListAccountsResponseTest.java https://github.com/vkris/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
                    
                
ListAccountsResponseTest.java https://github.com/ddurnev/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
                    
                
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,
                    
                
CatalogHandlerTest.java https://github.com/vkris/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);
                    
                
 

Source

Language