1
2
3
4
5
6
7 package org.asyrinx.joey.gen.task;
8
9 import org.apache.commons.lang.builder.ToStringBuilder;
10
11 /***
12 * @author takeshi
13 */
14 public class JoeyGenerateTarget {
15
16 public JoeyGenerateTarget(String targetName, String outputDirectory, String controlTemplate) {
17 super();
18 this.targetName = targetName;
19 this.outputDirectory = outputDirectory;
20 this.controlTemplate = controlTemplate;
21 }
22
23 private final String targetName;
24
25 private final String outputDirectory;
26
27 private final String controlTemplate;
28
29 public String getControlTemplate() {
30 return controlTemplate;
31 }
32
33 public String getOutputDirectory() {
34 return outputDirectory;
35 }
36
37 public String getTargetName() {
38 return targetName;
39 }
40
41 private static final String OUTPUT_FILE_EXT = ".generation";
42
43 public Object getOutputFile() {
44 return this.targetName + OUTPUT_FILE_EXT;
45 }
46
47 public String toString() {
48 return new ToStringBuilder(this)
49 .append("targetName", getTargetName())
50 .append("outputDirectory", getOutputDirectory())
51 .append("controlTemplate", getControlTemplate())
52 .toString();
53 }
54 }