dependency injection - Google GIN AbstractGinModule & GWT.Create() -


i have class extends abstractginmodule

like:

 public class clientmodule extends abstractginmodule {    public clientmodule() { }   @override      protected void configure() {   ...   ...      bind(...class).annotatedwith(...).to(...class).in(singleton.class);   ...   }  } 

the idea have bind 1 class class based on value stored in property file.

like:

param contains value coming property file

if(param.equals("instanceb"))    bind(a.class).to(b.class) else    bind(a.class).to(c.class) 

i have class access property file , return string value. class called: instanceparameters.java

i instance of class within clientmodule. don't find way it. tried with:

- instanceparameters param = new instanceparameters (); - gwt.create(instanceparameters.class); (error because method should used on client side) 

is there way access instanceparameters class within clientmodule?

thank help

you don't need read file before launching application - before creating abstractginmodule (via gwt.create). so, load dictionary in onmoduleload method , pass parameters, either whole instanceparameters class or extracted string, via provider or other means.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -