public abstract class AbstractGuiceAgentFactory extends Object
GuiceAgentModule for the bindings.
It simply wraps the Guice's Injector, which it creates based on the passed module.
The module can be reset using setAgentModule(GuiceAgentModule).
| Constructor and Description |
|---|
AbstractGuiceAgentFactory()
Parameter-less constructor that can be utilized in situations when you have to set the
GuiceAgentModule
later. |
AbstractGuiceAgentFactory(GuiceAgentModule module)
Creates a Guice-based factory that will use
Injector created using the 'module'. |
| Modifier and Type | Method and Description |
|---|---|
protected GuiceAgentModule |
getAgentModule()
Returns the module that the factory is working with.
|
protected com.google.inject.Injector |
getInjector()
Injector that should be used to instantiates new objects according to the module.
|
protected void |
setAgentModule(GuiceAgentModule module)
Sets new agent module into the factory, it invalidates the
injector
so the new one is created when getInjector() is called. |
public AbstractGuiceAgentFactory()
GuiceAgentModule
later. (DO NOT FORGET TO DO IT VIA setAgentModule(GuiceAgentModule) :-)public AbstractGuiceAgentFactory(GuiceAgentModule module)
Injector created using the 'module'.module - module that configures bindings between classes, may be null (specify module later using setAgentModule(GuiceAgentModule))protected GuiceAgentModule getAgentModule()
protected void setAgentModule(GuiceAgentModule module)
injector
so the new one is created when getInjector() is called.module - new moduleprotected com.google.inject.Injector getInjector()
Lazy-initialized using getAgentModule().
getAgentModule()Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.