1 | void setClasspath(Path cp) {↵ | | 1 | void setClasspath(Path path) {↵
|
2 | if (classpath == null) {↵ | | 2 | if (classpath == null) {↵
|
3 | classpath = cp;↵ | | 3 | classpath = path;↵
|
4 | } else {↵ | | 4 | } else {↵
|
5 | classpath.append(cp);↵ | | 5 | classpath.append(path);↵
|
6 | }↵ | | 6 | }↵
|
7 | }↵ | | 7 | }↵
|
|
8 | /**↵ | | 8 | /**↵
|
9 | * Adds a path to the classpath.↵ | | 9 | * Create a Path to ↵
|
10 | * @return a path to be configured↵ | | 10 | be configured with the classpath to use↵
|
| | | 11 | *↵
|
11 | .↵ | | 12 | * @return a new Path instance to be configured with the classpath.↵
|
12 | */↵ | | 13 | */↵
|
13 | public Path createClasspath() {↵ | | 14 | public Path createClasspath() {↵
|
14 | if (classpath == null) {↵ | | 15 | if (classpath == null) {↵
|
15 | classpath = new Path(getProject());↵ | | 16 | classpath = new Path(getProject());↵
|
16 | }↵ | | 17 | }↵
|
17 | return classpath.createPath();↵ | | 18 | return classpath.createPath();↵
|
18 | }↵ | | 19 | }↵
|
|
19 | /**↵ | | 20 | /**↵
|
20 | * Adds a reference to a classpath defined elsewhere↵ | | 21 | * Adds a reference to a CLASSPATH defined elsewhere.↵
|
| | | 22 | *↵
|
21 | * @param r a reference to a classpath.↵ | | 23 | * @param r the reference to an instance defining the classpath.↵
|
22 | */↵ | | 24 | */↵
|
23 | public void setClasspathRef(Reference r) {↵ | | 25 | public void setClasspathRef(Reference r) {↵
|
24 | createClasspath().setRefid(r);↵ | | 26 | createClasspath().setRefid(r);↵
|
25 | }↵ | | 27 | }↵
|
|
26 | /**↵ | | 28 | /**↵
|
27 | * Get the classpath.↵ | | 29 | * ↵
|
28 | * @return the classpath.↵ | | |
|
29 | */↵ | | |
|
30 | public Path getClasspath() {↵ | | |
|
31 | return classpath;↵ | | |
|
32 | }↵ | | |
|
|
33 | /**↵ | | |
|
34 | * Set the classpath to be used to find this compiler adapter↵ | | 30 | Set the boot classpath to use.↵
|
| | | 31 | *↵
|
35 | * @param cp the compiler classpath.↵ | | 32 | * @param path the boot classpath.↵
|
36 | */↵ | | 33 | */↵
|
37 | public void setCompilerclasspath(Path cp) {↵ | | 34 | public void setBootclasspath(Path path) {↵
|
38 | if (compilerClasspath == null) {↵ | | 35 | if (bootclasspath == null) {↵
|
39 | compilerClasspath = cp;↵ | | 36 | bootclasspath = path;↵
|
40 | } else {↵ | | 37 | } else {↵
|
41 | compilerClasspath.append(cp);↵ | | 38 | bootclasspath.append(path);↵
|
42 | }↵ | | 39 | }↵
|
43 | }↵ | | 40 | }↵
|
|
44 | /**↵ | | 41 | /**↵
|
45 | * get the classpath used to find the compiler adapter↵ | | 42 | * ↵
|
46 | * @return the compiler classpath.↵ | | 43 | Create a Path to be configured with the boot classpath↵
|
47 | */↵ | | 44 | *↵
|
48 | public Path getCompilerclasspath() {↵ | | 45 | ↵
|
49 | return compilerClasspath;↵ | | |
|
50 | }↵ | | |
|
|
51 | /**↵ | | |
|
52 | * Support nested compiler classpath, used to locate compiler adapter↵ | | |
|
53 | * @return a path to be configured.↵ | | 46 | * @return a new Path instance to be configured with the boot classpath.↵
|
54 | */↵ | | 47 | */↵
|
55 | public Path createCompilerclasspath() {↵ | | 48 | public Path createBootclasspath() {↵
|
56 | if (compilerClasspath == null) {↵ | | 49 | if (bootclasspath == null) {↵
|
57 | compilerClasspath = new Path(getProject());↵ | | 50 | bootclasspath = new Path(getProject());↵
|
58 | }↵ | | 51 | }↵
|
59 | return compilerClasspath.createPath();↵ | | 52 | return bootclasspath.createPath();↵
|
60 | | | 53 |
|