View Javadoc

1   package cz.cuni.amis.pogamut.udk.factory.guice.remoteagent;
2   
3   import cz.cuni.amis.pogamut.base.agent.IAgent;
4   import cz.cuni.amis.pogamut.base.agent.params.IRemoteAgentParameters;
5   import cz.cuni.amis.pogamut.base.factory.guice.GuiceAgentFactory;
6   import cz.cuni.amis.pogamut.udk.agent.params.UDKAgentParameters;
7   import cz.cuni.amis.pogamut.udk.bot.IUDKBot;
8   
9   /**
10   * Guice-base {@link IUDKBot} factory. It needs {@link UDKBotModule} to work correctly and the module is required
11   * to bound {@link IAgent} to the {@link IUDKBot}, otherwise the method {@link UDKBotFactory#newAgent(IRemoteAgentParameters)}
12   * will throw {@link ClassCastException}.
13   * <p><p>
14   * For more info about the factory, see {@link GuiceAgentFactory}.
15   *
16   * @author Jimmy
17   *
18   * @param <BOT>
19   * @param <PARAMS>
20   */
21  public class UDKBotFactory<BOT extends IUDKBot, PARAMS extends UDKAgentParameters> extends GuiceAgentFactory<BOT, PARAMS> {
22  
23  	public UDKBotFactory(UDKBotModule<PARAMS> agentModule) {
24  		super(agentModule);
25  	}
26  	
27  	@Override
28  	protected UDKBotModule<PARAMS> getAgentModule() {
29  		return (UDKBotModule<PARAMS>) super.getAgentModule();
30  	}
31  	
32  }