1 | void setClasspath(Path classpath) {↵ | | 1 | void setClasspath(Path classpath) {↵
|
2 | if (compileClasspath == null) {↵ | | 2 | if (compileClasspath == null) {↵
|
3 | compileClasspath = classpath;↵ | | 3 | compileClasspath = classpath;↵
|
4 | } else {↵ | | 4 | } else {↵
|
5 | compileClasspath.append(classpath);↵ | | 5 | compileClasspath.append(classpath);↵
|
6 | }↵ | | 6 | }↵
|
7 | }↵ | | 7 | }↵
|
|
8 | /**↵ | | 8 | /**↵
|
9 | * Creates a nested classpath element.↵ | | 9 | * Gets the classpath to be used for this compilation.↵
|
10 | * @return classpath↵ | | 10 | * @return the class path↵
|
11 | */↵ | | 11 | */↵
|
12 | public Path createClasspath() {↵ | | 12 | public Path getClasspath() {↵
|
13 | if (compileClasspath == null) {↵ | | |
|
14 | compileClasspath = new Path(getProject());↵ | | |
|
15 | }↵ | | |
|
16 | return compileClasspath.createPath();↵ | | 13 | return compileClasspath;↵
|
17 | }↵ | | 14 | }↵
|
|
18 | /**↵ | | 15 | /**↵
|
19 | * Adds to the classpath a reference to↵ | | 16 | * Adds ↵
|
20 | * a <path> defined elsewhere.↵ | | |
|
21 | * @param pathRef the reference to add to the classpath↵ | | 17 | a path to the classpath.↵
|
22 | */↵ | | 18 | *↵
|
23 | public void setClasspathRef(Reference pathRef) {↵ | | |
|
24 | createClasspath().setRefid(pathRef);↵ | | 19 | @return a class path↵
|
25 | }↵ | | |
|
|
26 | /**↵ | | |
|
27 | * Gets the classpath.↵ | | |
|
28 | * @return the classpath↵ | | 20 | to be configured↵
|
29 | */↵ | | 21 | */↵
|
30 | public Path getClasspath() {↵ | | 22 | public Path createClasspath() {↵
|
31 | return compileClasspath;↵ | | 23 | if (compileClasspath↵
|
32 | }↵ | | |
|
| | | 24 | == null) {↵
|
33 | /**↵ | | 25 | ↵
|
34 | * Flag to enable verification so that the classes↵ | | 26 | ↵
|
35 | * found by the directory match are↵ | | |
|
36 | * checked to see if they implement java.rmi.Remote.↵ | | |
|
37 | * optional; This defaults to false if not set.↵ | | |
|
38 | * @param verify turn on verification for classes↵ | | |
|
39 | */↵ | | |
|
|
40 | public void setVerify(boolean verify) {↵ | | |
|
41 | this.verify = verify;↵ | | |
|
42 | }↵ | | |
|
|
43 | /**↵ | | |
|
44 | * Get verify flag.↵ | | |
|
45 | * @return verify↵ | | |
|
46 | */↵ | | |
|
47 | public boolean getVerify() {↵ | | |
|
48 | return verify;↵ | | |
|
49 | }↵ | | |
|
|
50 | /**↵ | | |
|
51 | * Indicates that IIOP compatible stubs should↵ | | |
|
52 | * be generated; optional, defaults to false↵ | | |
|
53 | * if not set.↵ | | |
|
54 | * @param iiop generate IIOP compatible stubs↵ | | |
|
55 | */↵ | | |
|
56 | public void setIiop(boolean iiop) {↵ | | |
|
57 | this.iiop = iiop;↵ | | |
|
58 | }↵ | | |
|
|
59 | /**↵ | | |
|
60 | * Gets iiop flags.↵ | | |
|
61 | * @return iiop↵ | | |
|
62 | */↵ | | |
|
63 | public boolean getIiop(↵ | | 27 | compileClasspath = new Path(getProject());↵
|
| | | 28 | }↵
|
| | | 29 | return compileClasspath.createPath();↵
|
| | | 30 | }↵
|
|
| | | 31 | /**↵
|
| | | 32 | * Adds a reference to a classpath defined elsewhere.↵
|
| | | 33 | * @param r a reference to a classpath↵
|
| | | 34 | */↵
|
64 | ) {↵ | | 35 | public void setClasspathRef(Reference r) {↵
|
65 | return iiop;↵ | | 36 | cre↵
|
66 | }↵ | | |
|
|
67 | /**↵ | | |
|
68 | * Set additional arguments for iiop↵ | | |
|
69 | * @param iiopOpts additional arguments for iiop↵ | | |
|
70 | */↵ | | |
|
71 | public void setIiopopts(String iiopOpts) {↵ | | |
|
72 | this.iiopOpts = iiopOpts;↵ | | 37 | ateClasspath().setRefid(r);↵
|
73 | }↵ | | 38 | }↵
|
|
74 | /**↵ | | 39 | /**↵
|
75 | * Gets additional arguments for iiop.↵ | | 40 | * Sets ↵
|
76 | * @return iiopOpts↵ | | |
|
77 | */↵ | | |
|
78 | public String getIiopopts() {↵ | | |
|
79 | return iiopOpts;↵ | | |
|
80 | }↵ | | |
|
|
81 | /**↵ | | |
|
82 | * Indicates that IDL output should be↵ | | |
|
83 | * generated. This defaults to false↵ | | 41 | the bootclasspath that will be used to compile the classes↵
|
84 | * if not set.↵ | | 42 | * against.↵
|
85 | * @param idl generate IDL output↵ | | 43 | * @param ↵
|
86 | */↵ | | |
|
87 | public void setIdl(boolean idl) {↵ | | |
|
88 | this.idl = idl;↵ | | |
|
89 | }↵ | | |
|
|
90 | /**↵ | | |
|
91 | * Gets IDL flags.↵ | | |
|
92 | * @return the idl flag↵ | | |
|
93 | */↵ | | |
|
94 | public boolean getIdl() {↵ | | |
|
95 | return idl;↵ | | |
|
96 | }↵ | | |
|
|
97 | /**↵ | | |
|
98 | * pass additional arguments for IDL compile↵ | | |
|
99 | * @param idlOpts additional IDL arguments↵ | | |
|
100 | */↵ | | |
|
101 | public void setIdlopts(String idlOpts) {↵ | | |
|
102 | this.idlOpts = idlOpts;↵ | | |
|
103 | }↵ | | |
|
|
104 | /**↵ | | |
|
105 | * Gets additional arguments for idl compile.↵ | | |
|
106 | * @return the idl options↵ | | |
|
| | | 44 | bootclasspath a path to use as a boot class path (may be more↵
|
107 | */↵ | | 45 | * ↵
|
108 | public String getIdlopts() {↵ | | 46 | ↵
|
109 | return idlOpts;↵ | | |
|
110 | }↵ | | |
|
|
111 | /**↵ | | |
|
112 | * Gets file list to compile.↵ | | |
|
113 | * @return the list of files to compile.↵ | | |
|
114 | */↵ | | |
|
115 | public Vector getFileList() {↵ | | |
|
116 | return compileList;↵ | | |
|
117 | }↵ | | |
|
|
118 | /**↵ | | |
|
119 | * Sets whether or not to include ant's own classpath in this task's↵ | | |
|
120 | * classpath.↵ | | |
|
121 | * Optional; default is <code>true</code>.↵ | | |
|
122 | * @param include if true include ant's classpath↵ | | |
|
123 | */↵ | | |
|
124 | public void setIncludeantruntime(boolean include) {↵ | | |
|
125 | includeAntRuntime = include;↵ | | |
|
126 | }↵ | | |
|
|
127 | /**↵ | | |
|
128 | * Gets whether or not the ant classpath is to be included in the↵ | | |
|
129 | * task's ↵ | | 47 | than one)↵
|
| | | 48 | */↵
|
| | | 49 | public void setBootclasspath(Path bootclasspath) {↵
|
| | | 50 | if (this.bootclasspath == null) {↵
|
130 | classpath.↵ | | 51 | this.bootclasspath = bootclasspath;↵
|
131 | * @return true if ant's classpath is to be included↵ | | 52 | ↵
|
| | | 53 | } else {↵
|
132 | */↵ | | 54 | ↵
|
133 | public boolean getIncludeantruntime() {↵ | | 55 | ↵
|
134 | return includeAntRuntime;↵ | | |
|
135 | }↵ | | |
|
|
136 | /**↵ | | |
|
137 | * task's classpath.↵ | | |
|
138 | * Enables or disables including the default run-time↵ | | |
|
139 | * libraries from the executing VM; optional,↵ | | |
|
140 | * defaults to false↵ | | |
|
141 | * @param include if true include default run-time libraries↵ | | |
|
142 | */↵ | | |
|
143 | public void setIncludejavaruntime(boolean include) {↵ | | |
|
144 | includeJavaRuntime = include;↵ | | 56 | this.bootclasspath.append(bootclasspath);↵
|
| | | 57 | }↵
|
145 | }↵ | | 58 | }↵
|
|
146 | /**↵ | | 59 | /**↵
|
147 | * Gets whether or not the java runtime should be included in this↵ | | 60 | * Gets ↵
|
148 | * task's classpath.↵ | | |
|
149 | * @return true if default run-time libraries are included↵ | | |
|
150 | */↵ | | |
|
151 | public boolean getIncludejavaruntime() {↵ | | |
|
152 | return includeJavaRuntime;↵ | | |
|
153 | }↵ | | |
|
|
154 | /**↵ | | |
|
155 | * Sets the extension directories that will be used during the↵ | | |
|
156 | * compilation; optional.↵ | | |
|
157 | * @param extDirs the extension directories to be used↵ | | 61 | the bootclasspath that will be used to compile the classes↵
|
| | | 62 | * against.↵
|
| | | 63 | * @return the boot path↵
|
158 | */↵ | | 64 | */↵
|
159 | public void setExtdirs(Path extDirs) {↵ | | 65 | public ↵
|
160 | if (this.extDirs == null) {↵ | | 66 | Path getBootclasspath() {↵
|
161 | this.extDirs = extDirs;↵ | | 67 | ↵
|
162 | } else {↵ | | |
|
163 | this.extDirs.append(extDirs);↵ | | |
|
164 | }↵ | | |
|
165 | }↵ | | |
|
|
166 | /**↵ | | |
|
167 | * Maybe creates a nested extdirs element↵ | | 68 | return bootclasspath;↵
|
| | | 69 | }↵
|
|
| | | 70 | /**↵
|
168 | .↵ | | 71 | * Adds a path to the bootclasspath.↵
|
169 | * @return path object to be configured with the extension directories↵ | | 72 | * @return a path to be configured↵
|
170 | */↵ | | 73 | */↵
|
171 | public Path createExtdirs() {↵ | | 74 | public Path createBootclasspath() {↵
|
172 | if (extDirs == null) {↵ | | 75 | if (bootclasspath == null) {↵
|
173 | extDirs = new Path(getProject());↵ | | 76 | bootclasspath = new Path(getProject());↵
|
174 | }↵ | | 77 | }↵
|
175 | return extDirs.createPath();↵ | | 78 | return bootclasspath.createPath();↵
|
176 | } | | 79 | }
|