1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package com.github.maven_nar.cpptasks.ide;
21
22 import java.io.File;
23 import java.util.Collections;
24 import java.util.List;
25
26 import org.apache.tools.ant.util.StringUtils;
27
28
29
30
31
32 public final class DependencyDef {
33 private String id;
34 private File file;
35 private String name;
36 private String depends;
37
38 public DependencyDef() {
39 }
40
41 public String getDepends() {
42 return this.depends;
43 }
44
45 public List<String> getDependsList() {
46 if (this.depends != null) {
47 return StringUtils.split(this.depends, ',');
48 }
49 return Collections.emptyList();
50 }
51
52 public File getFile() {
53 return this.file;
54 }
55
56 public String getID() {
57 if (this.id != null) {
58 return this.id;
59 }
60 return getName();
61 }
62
63 public String getName() {
64 if (this.name != null) {
65 return this.name;
66 } else if (this.file != null) {
67 return this.file.getName();
68 }
69 return "null";
70 }
71
72 public void setDepends(final String val) {
73 this.depends = val;
74 }
75
76 public void setFile(final File val) {
77 this.file = val;
78 }
79
80 public void setID(final String val) {
81 this.id = val;
82 }
83
84 public void setName(final String val) {
85 this.name = val;
86 }
87 }