Wednesday, December 29, 2010

How to convert from Class type to Instance type with GIN ? Are GWT Places Singleton ?

I have custom places in my app:
HomePlace extends ApplicationPlace {}
MailPlace extends ApplicationPlacfe {}

I keep a reference of all my places in a list, in some other class

class AppPlaces {

List<Class<? extends Place>> places = new ArrayList<Class<? extends
Place>>();

public AppPlaces(){

places.add(HomePlace.class);
places.add(SettingsPlace.class);
places.add(MailPlace.class);
}
}

how can I convert from "HomePlace.class" to HomePlace instance,
preferrably using Gin and avoiding "new keyword"?

are GWT Places Singleton ?

cheers

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment