View Javadoc

1    package nl.tudelft.goal.ut2004.translators;
2   
3   import nl.tudelft.goal.ut2004.messages.FlagState;
4   import eis.eis2java.exception.TranslationException;
5   import eis.eis2java.translation.Java2Parameter;
6   import eis.iilang.Identifier;
7   import eis.iilang.Parameter;
8   
9   /**
10   * Example: held<br>
11   * Example: home<br>
12   * Example: dropped<br>
13   * 
14   * @author mpkorstanje
15   *
16   */
17  public class FlagStateTranslator implements Java2Parameter<FlagState> {
18  
19  	@Override
20  	public Parameter[] translate(FlagState o) throws TranslationException {
21  		return new Parameter[] {new Identifier(o.name().toLowerCase())};
22  	}
23  
24  	@Override
25  	public Class<? extends FlagState> translatesFrom() {
26  		return FlagState.class;
27  	}
28  
29  
30  	
31  
32  }