1 package cz.cuni.amis.pogamut.udk.communication.parser;
2
3
4 import com.google.inject.Inject;
5 import com.google.inject.internal.Nullable;
6
7 import cz.cuni.amis.pogamut.base.communication.connection.IWorldReaderProvider;
8 import cz.cuni.amis.pogamut.base.communication.exception.CommunicationException;
9 import cz.cuni.amis.pogamut.base.communication.parser.impl.yylex.IYylexObserver;
10 import cz.cuni.amis.pogamut.base.communication.parser.impl.yylex.YylexParser;
11 import cz.cuni.amis.pogamut.base.component.bus.IComponentBus;
12 import cz.cuni.amis.pogamut.base.utils.guice.AgentScoped;
13 import cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger;
14 import cz.cuni.amis.pogamut.udk.communication.messages.UnrealIdTranslator;
15 import cz.cuni.amis.pogamut.udk.communication.translator.itemdescriptor.ItemTranslator;
16 import cz.cuni.amis.utils.NullCheck;
17
18 @AgentScoped
19 public class UDKParser extends YylexParser {
20
21 @Inject
22 public UDKParser(UnrealIdTranslator unrealIdTranslator, ItemTranslator itemTranslator,
23 IWorldReaderProvider readerProvider, IUDKYylex yylex, @Nullable IYylexObserver yylexObserver,
24 IComponentBus bus, IAgentLogger logger) throws CommunicationException {
25 super(readerProvider, yylex, yylexObserver, bus, logger);
26 NullCheck.check(unrealIdTranslator, "unrealIdTranslator");
27 yylex.setTranslator(unrealIdTranslator);
28 NullCheck.check(itemTranslator, "itemTranslator");
29 yylex.setItemTranslator(itemTranslator);
30 }
31
32
33
34
35
36
37
38
39
40 }