If the provider is not bound in any scope, this should be the default
behaviour. I don't quite get the meaning of the test though.
On 27.03.2012 14:35, ohad shai wrote:
I want to have a provider member in class, that when 'get' called will
give me a new object each time. how can I do that?
public class GuiceInjectionTest
{
@Inject
Provider<MyClass> provider;
public Provider<MyClass> get()
{
//I want a new instance every time here that is injected by
guice
return provider.get()
}
}
Note I want this new instance to be injected by Guice, so I cant just
create a `new MyClass()` in the provider implementation.
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice?hl=en.