1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
---|
2 | <!--NewPage-->
|
---|
3 | <HTML>
|
---|
4 | <HEAD>
|
---|
5 | <!-- Generated by javadoc (build 1.4.2_13) on Mon Oct 01 14:33:34 NZST 2007 -->
|
---|
6 | <TITLE>
|
---|
7 | ClasspathUtils (Apache Ant API)
|
---|
8 | </TITLE>
|
---|
9 |
|
---|
10 | <META NAME="keywords" CONTENT="org.apache.tools.ant.util.ClasspathUtils class">
|
---|
11 |
|
---|
12 | <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
|
---|
13 |
|
---|
14 | <SCRIPT type="text/javascript">
|
---|
15 | function windowTitle()
|
---|
16 | {
|
---|
17 | parent.document.title="ClasspathUtils (Apache Ant API)";
|
---|
18 | }
|
---|
19 | </SCRIPT>
|
---|
20 |
|
---|
21 | </HEAD>
|
---|
22 |
|
---|
23 | <BODY BGCOLOR="white" onload="windowTitle();">
|
---|
24 |
|
---|
25 |
|
---|
26 | <!-- ========= START OF TOP NAVBAR ======= -->
|
---|
27 | <A NAME="navbar_top"><!-- --></A>
|
---|
28 | <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
---|
29 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
---|
30 | <TR>
|
---|
31 | <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
---|
32 | <A NAME="navbar_top_firstrow"><!-- --></A>
|
---|
33 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
---|
34 | <TR ALIGN="center" VALIGN="top">
|
---|
35 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
---|
36 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
---|
37 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
---|
38 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
---|
39 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
---|
40 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
---|
41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
---|
42 | </TR>
|
---|
43 | </TABLE>
|
---|
44 | </TD>
|
---|
45 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
---|
46 | </EM>
|
---|
47 | </TD>
|
---|
48 | </TR>
|
---|
49 |
|
---|
50 | <TR>
|
---|
51 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
52 | <A HREF="../../../../../org/apache/tools/ant/util/ChainedMapper.html" title="class in org.apache.tools.ant.util"><B>PREV CLASS</B></A>
|
---|
53 | <A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html" title="class in org.apache.tools.ant.util"><B>NEXT CLASS</B></A></FONT></TD>
|
---|
54 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
55 | <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
|
---|
56 | <A HREF="ClasspathUtils.html" target="_top"><B>NO FRAMES</B></A>
|
---|
57 | <SCRIPT type="text/javascript">
|
---|
58 | <!--
|
---|
59 | if(window==top) {
|
---|
60 | document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
---|
61 | }
|
---|
62 | //-->
|
---|
63 | </SCRIPT>
|
---|
64 | <NOSCRIPT>
|
---|
65 | <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
---|
66 | </NOSCRIPT>
|
---|
67 |
|
---|
68 | </FONT></TD>
|
---|
69 | </TR>
|
---|
70 | <TR>
|
---|
71 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
72 | SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
---|
73 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
74 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
---|
75 | </TR>
|
---|
76 | </TABLE>
|
---|
77 | <A NAME="skip-navbar_top"></A>
|
---|
78 | <!-- ========= END OF TOP NAVBAR ========= -->
|
---|
79 |
|
---|
80 | <HR>
|
---|
81 | <!-- ======== START OF CLASS DATA ======== -->
|
---|
82 | <H2>
|
---|
83 | <FONT SIZE="-1">
|
---|
84 | org.apache.tools.ant.util</FONT>
|
---|
85 | <BR>
|
---|
86 | Class ClasspathUtils</H2>
|
---|
87 | <PRE>
|
---|
88 | java.lang.Object
|
---|
89 | <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.util.ClasspathUtils</B>
|
---|
90 | </PRE>
|
---|
91 | <HR>
|
---|
92 | <DL>
|
---|
93 | <DT>public class <B>ClasspathUtils</B><DT>extends java.lang.Object</DL>
|
---|
94 |
|
---|
95 | <P>
|
---|
96 | Offers some helper methods on the Path structure in ant.
|
---|
97 |
|
---|
98 | <p>Basic idea behind this utility class is to use it from inside the
|
---|
99 | different ant objects (and user defined objects) that need classLoading
|
---|
100 | for their operation.
|
---|
101 | Normally those would have a setClasspathRef() {for the @classpathref}
|
---|
102 | and/or a createClasspath() {for the nested <classpath>}
|
---|
103 | Typically one would have in your Ant Task or DataType</p>
|
---|
104 |
|
---|
105 | <pre><code>
|
---|
106 | ClasspathUtils.Delegate cpDelegate;
|
---|
107 |
|
---|
108 | public void init() {
|
---|
109 | this.cpDelegate = ClasspathUtils.getDelegate(this);
|
---|
110 | super.init();
|
---|
111 | }
|
---|
112 |
|
---|
113 | public void setClasspathRef(Reference r) {
|
---|
114 | this.cpDelegate.setClasspathRef(r);
|
---|
115 | }
|
---|
116 |
|
---|
117 | public Path createClasspath() {
|
---|
118 | return this.cpDelegate.createClasspath();
|
---|
119 | }
|
---|
120 |
|
---|
121 | public void setClassname(String fqcn) {
|
---|
122 | this.cpDelegate.setClassname(fqcn);
|
---|
123 | }
|
---|
124 | </code></pre>
|
---|
125 |
|
---|
126 | <p>At execution time, when you actually need the classloading
|
---|
127 | you can just:</p>
|
---|
128 |
|
---|
129 | <pre><code>
|
---|
130 | Object o = this.cpDelegate.newInstance();
|
---|
131 | </code></pre>
|
---|
132 | <P>
|
---|
133 |
|
---|
134 | <P>
|
---|
135 | <DL>
|
---|
136 | <DT><B>Since:</B></DT>
|
---|
137 | <DD>Ant 1.6</DD>
|
---|
138 | </DL>
|
---|
139 | <HR>
|
---|
140 |
|
---|
141 | <P>
|
---|
142 | <!-- ======== NESTED CLASS SUMMARY ======== -->
|
---|
143 |
|
---|
144 | <A NAME="nested_class_summary"><!-- --></A>
|
---|
145 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
146 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
147 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
148 | <B>Nested Class Summary</B></FONT></TD>
|
---|
149 | </TR>
|
---|
150 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
151 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
152 | <CODE>static class</CODE></FONT></TD>
|
---|
153 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html" title="class in org.apache.tools.ant.util">ClasspathUtils.Delegate</A></B></CODE>
|
---|
154 |
|
---|
155 | <BR>
|
---|
156 | Delegate that helps out any specific ProjectComponent that needs
|
---|
157 | dynamic classloading.</TD>
|
---|
158 | </TR>
|
---|
159 | </TABLE>
|
---|
160 |
|
---|
161 | <!-- =========== FIELD SUMMARY =========== -->
|
---|
162 |
|
---|
163 | <A NAME="field_summary"><!-- --></A>
|
---|
164 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
165 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
166 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
167 | <B>Field Summary</B></FONT></TD>
|
---|
168 | </TR>
|
---|
169 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
170 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
171 | <CODE>static java.lang.String</CODE></FONT></TD>
|
---|
172 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#REUSE_LOADER_REF">REUSE_LOADER_REF</A></B></CODE>
|
---|
173 |
|
---|
174 | <BR>
|
---|
175 | Name of the magic property that controls classloader reuse in Ant 1.4.</TD>
|
---|
176 | </TR>
|
---|
177 | </TABLE>
|
---|
178 |
|
---|
179 | <!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
---|
180 |
|
---|
181 | <A NAME="constructor_summary"><!-- --></A>
|
---|
182 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
183 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
184 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
185 | <B>Constructor Summary</B></FONT></TD>
|
---|
186 | </TR>
|
---|
187 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
188 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#ClasspathUtils()">ClasspathUtils</A></B>()</CODE>
|
---|
189 |
|
---|
190 | <BR>
|
---|
191 | </TD>
|
---|
192 | </TR>
|
---|
193 | </TABLE>
|
---|
194 |
|
---|
195 | <!-- ========== METHOD SUMMARY =========== -->
|
---|
196 |
|
---|
197 | <A NAME="method_summary"><!-- --></A>
|
---|
198 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
199 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
200 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
201 | <B>Method Summary</B></FONT></TD>
|
---|
202 | </TR>
|
---|
203 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
204 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
205 | <CODE>static java.lang.ClassLoader</CODE></FONT></TD>
|
---|
206 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String)">getClassLoaderForPath</A></B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> p,
|
---|
207 | <A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> path,
|
---|
208 | java.lang.String loaderId)</CODE>
|
---|
209 |
|
---|
210 | <BR>
|
---|
211 | Convenience overloaded version of <A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean)"><CODE>getClassLoaderForPath(Project, Path, String, boolean)</CODE></A>.</TD>
|
---|
212 | </TR>
|
---|
213 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
214 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
215 | <CODE>static java.lang.ClassLoader</CODE></FONT></TD>
|
---|
216 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean)">getClassLoaderForPath</A></B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> p,
|
---|
217 | <A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> path,
|
---|
218 | java.lang.String loaderId,
|
---|
219 | boolean reverseLoader)</CODE>
|
---|
220 |
|
---|
221 | <BR>
|
---|
222 | Convenience overloaded version of <A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean, boolean)"><CODE>getClassLoaderForPath(Project, Path, String, boolean, boolean)</CODE></A>.</TD>
|
---|
223 | </TR>
|
---|
224 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
225 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
226 | <CODE>static java.lang.ClassLoader</CODE></FONT></TD>
|
---|
227 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean, boolean)">getClassLoaderForPath</A></B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> p,
|
---|
228 | <A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> path,
|
---|
229 | java.lang.String loaderId,
|
---|
230 | boolean reverseLoader,
|
---|
231 | boolean reuseLoader)</CODE>
|
---|
232 |
|
---|
233 | <BR>
|
---|
234 | Gets a classloader that loads classes from the classpath
|
---|
235 | defined in the path argument.</TD>
|
---|
236 | </TR>
|
---|
237 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
238 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
239 | <CODE>static java.lang.ClassLoader</CODE></FONT></TD>
|
---|
240 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Reference)">getClassLoaderForPath</A></B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> p,
|
---|
241 | <A HREF="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</A> ref)</CODE>
|
---|
242 |
|
---|
243 | <BR>
|
---|
244 | Convenience overloaded version of <A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Reference, boolean)"><CODE>getClassLoaderForPath(Project, Reference, boolean)</CODE></A>.</TD>
|
---|
245 | </TR>
|
---|
246 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
247 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
248 | <CODE>static java.lang.ClassLoader</CODE></FONT></TD>
|
---|
249 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Reference, boolean)">getClassLoaderForPath</A></B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> p,
|
---|
250 | <A HREF="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</A> ref,
|
---|
251 | boolean reverseLoader)</CODE>
|
---|
252 |
|
---|
253 | <BR>
|
---|
254 | Convenience overloaded version of <A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean)"><CODE>getClassLoaderForPath(Project, Path,
|
---|
255 | String, boolean)</CODE></A>.</TD>
|
---|
256 | </TR>
|
---|
257 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
258 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
259 | <CODE>static <A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html" title="class in org.apache.tools.ant.util">ClasspathUtils.Delegate</A></CODE></FONT></TD>
|
---|
260 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getDelegate(org.apache.tools.ant.ProjectComponent)">getDelegate</A></B>(<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A> component)</CODE>
|
---|
261 |
|
---|
262 | <BR>
|
---|
263 | Obtains a delegate that helps out with classic classpath configuration.</TD>
|
---|
264 | </TR>
|
---|
265 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
266 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
267 | <CODE>static java.lang.ClassLoader</CODE></FONT></TD>
|
---|
268 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getUniqueClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, boolean)">getUniqueClassLoaderForPath</A></B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> p,
|
---|
269 | <A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> path,
|
---|
270 | boolean reverseLoader)</CODE>
|
---|
271 |
|
---|
272 | <BR>
|
---|
273 | Gets a fresh, different, not used before classloader that uses the
|
---|
274 | passed path as it's classpath.</TD>
|
---|
275 | </TR>
|
---|
276 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
277 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
278 | <CODE>static java.lang.Object</CODE></FONT></TD>
|
---|
279 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#newInstance(java.lang.String, java.lang.ClassLoader)">newInstance</A></B>(java.lang.String className,
|
---|
280 | java.lang.ClassLoader userDefinedLoader)</CODE>
|
---|
281 |
|
---|
282 | <BR>
|
---|
283 | Creates a fresh object instance of the specified classname.</TD>
|
---|
284 | </TR>
|
---|
285 | </TABLE>
|
---|
286 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
---|
287 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
288 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
289 | <TD><B>Methods inherited from class java.lang.Object</B></TD>
|
---|
290 | </TR>
|
---|
291 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
292 | <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
---|
293 | </TR>
|
---|
294 | </TABLE>
|
---|
295 |
|
---|
296 | <P>
|
---|
297 |
|
---|
298 | <!-- ============ FIELD DETAIL =========== -->
|
---|
299 |
|
---|
300 | <A NAME="field_detail"><!-- --></A>
|
---|
301 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
302 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
303 | <TD COLSPAN=1><FONT SIZE="+2">
|
---|
304 | <B>Field Detail</B></FONT></TD>
|
---|
305 | </TR>
|
---|
306 | </TABLE>
|
---|
307 |
|
---|
308 | <A NAME="REUSE_LOADER_REF"><!-- --></A><H3>
|
---|
309 | REUSE_LOADER_REF</H3>
|
---|
310 | <PRE>
|
---|
311 | public static final java.lang.String <B>REUSE_LOADER_REF</B></PRE>
|
---|
312 | <DL>
|
---|
313 | <DD>Name of the magic property that controls classloader reuse in Ant 1.4.
|
---|
314 | <P>
|
---|
315 | <DL>
|
---|
316 | <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.tools.ant.util.ClasspathUtils.REUSE_LOADER_REF">Constant Field Values</A></DL>
|
---|
317 | </DL>
|
---|
318 |
|
---|
319 | <!-- ========= CONSTRUCTOR DETAIL ======== -->
|
---|
320 |
|
---|
321 | <A NAME="constructor_detail"><!-- --></A>
|
---|
322 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
323 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
324 | <TD COLSPAN=1><FONT SIZE="+2">
|
---|
325 | <B>Constructor Detail</B></FONT></TD>
|
---|
326 | </TR>
|
---|
327 | </TABLE>
|
---|
328 |
|
---|
329 | <A NAME="ClasspathUtils()"><!-- --></A><H3>
|
---|
330 | ClasspathUtils</H3>
|
---|
331 | <PRE>
|
---|
332 | public <B>ClasspathUtils</B>()</PRE>
|
---|
333 | <DL>
|
---|
334 | </DL>
|
---|
335 |
|
---|
336 | <!-- ============ METHOD DETAIL ========== -->
|
---|
337 |
|
---|
338 | <A NAME="method_detail"><!-- --></A>
|
---|
339 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
340 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
341 | <TD COLSPAN=1><FONT SIZE="+2">
|
---|
342 | <B>Method Detail</B></FONT></TD>
|
---|
343 | </TR>
|
---|
344 | </TABLE>
|
---|
345 |
|
---|
346 | <A NAME="getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Reference)"><!-- --></A><H3>
|
---|
347 | getClassLoaderForPath</H3>
|
---|
348 | <PRE>
|
---|
349 | public static java.lang.ClassLoader <B>getClassLoaderForPath</B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> p,
|
---|
350 | <A HREF="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</A> ref)</PRE>
|
---|
351 | <DL>
|
---|
352 | <DD>Convenience overloaded version of <A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Reference, boolean)"><CODE>getClassLoaderForPath(Project, Reference, boolean)</CODE></A>.
|
---|
353 |
|
---|
354 | <p>Assumes the logical 'false' for the reverseLoader.</p>
|
---|
355 | <P>
|
---|
356 | <DD><DL>
|
---|
357 | <DT><B>Parameters:</B><DD><CODE>p</CODE> - the project<DD><CODE>ref</CODE> - the reference
|
---|
358 | <DT><B>Returns:</B><DD>The class loader</DL>
|
---|
359 | </DD>
|
---|
360 | </DL>
|
---|
361 | <HR>
|
---|
362 |
|
---|
363 | <A NAME="getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Reference, boolean)"><!-- --></A><H3>
|
---|
364 | getClassLoaderForPath</H3>
|
---|
365 | <PRE>
|
---|
366 | public static java.lang.ClassLoader <B>getClassLoaderForPath</B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> p,
|
---|
367 | <A HREF="../../../../../org/apache/tools/ant/types/Reference.html" title="class in org.apache.tools.ant.types">Reference</A> ref,
|
---|
368 | boolean reverseLoader)</PRE>
|
---|
369 | <DL>
|
---|
370 | <DD>Convenience overloaded version of <A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean)"><CODE>getClassLoaderForPath(Project, Path,
|
---|
371 | String, boolean)</CODE></A>.
|
---|
372 |
|
---|
373 | <p>Delegates to the other one after extracting the referenced
|
---|
374 | Path from the Project This checks also that the passed
|
---|
375 | Reference is pointing to a Path all right.</p>
|
---|
376 | <P>
|
---|
377 | <DD><DL>
|
---|
378 | <DT><B>Parameters:</B><DD><CODE>p</CODE> - current ant project<DD><CODE>ref</CODE> - Reference to Path structure<DD><CODE>reverseLoader</CODE> - if set to true this new loader will take
|
---|
379 | precedence over it's parent (which is contra the regular
|
---|
380 | classloader behaviour)
|
---|
381 | <DT><B>Returns:</B><DD>The class loader</DL>
|
---|
382 | </DD>
|
---|
383 | </DL>
|
---|
384 | <HR>
|
---|
385 |
|
---|
386 | <A NAME="getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String)"><!-- --></A><H3>
|
---|
387 | getClassLoaderForPath</H3>
|
---|
388 | <PRE>
|
---|
389 | public static java.lang.ClassLoader <B>getClassLoaderForPath</B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> p,
|
---|
390 | <A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> path,
|
---|
391 | java.lang.String loaderId)</PRE>
|
---|
392 | <DL>
|
---|
393 | <DD>Convenience overloaded version of <A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean)"><CODE>getClassLoaderForPath(Project, Path, String, boolean)</CODE></A>.
|
---|
394 |
|
---|
395 | <p>Assumes the logical 'false' for the reverseLoader.</p>
|
---|
396 | <P>
|
---|
397 | <DD><DL>
|
---|
398 | <DT><B>Parameters:</B><DD><CODE>p</CODE> - current ant project<DD><CODE>path</CODE> - the path<DD><CODE>loaderId</CODE> - the loader id string
|
---|
399 | <DT><B>Returns:</B><DD>The class loader</DL>
|
---|
400 | </DD>
|
---|
401 | </DL>
|
---|
402 | <HR>
|
---|
403 |
|
---|
404 | <A NAME="getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean)"><!-- --></A><H3>
|
---|
405 | getClassLoaderForPath</H3>
|
---|
406 | <PRE>
|
---|
407 | public static java.lang.ClassLoader <B>getClassLoaderForPath</B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> p,
|
---|
408 | <A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> path,
|
---|
409 | java.lang.String loaderId,
|
---|
410 | boolean reverseLoader)</PRE>
|
---|
411 | <DL>
|
---|
412 | <DD>Convenience overloaded version of <A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.html#getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean, boolean)"><CODE>getClassLoaderForPath(Project, Path, String, boolean, boolean)</CODE></A>.
|
---|
413 |
|
---|
414 | <p>Sets value for 'reuseLoader' to true if the magic property
|
---|
415 | has been set.</p>
|
---|
416 | <P>
|
---|
417 | <DD><DL>
|
---|
418 | <DT><B>Parameters:</B><DD><CODE>p</CODE> - the project<DD><CODE>path</CODE> - the path<DD><CODE>loaderId</CODE> - the loader id string<DD><CODE>reverseLoader</CODE> - if set to true this new loader will take
|
---|
419 | precedence over it's parent (which is contra the regular
|
---|
420 | classloader behaviour)
|
---|
421 | <DT><B>Returns:</B><DD>The class loader</DL>
|
---|
422 | </DD>
|
---|
423 | </DL>
|
---|
424 | <HR>
|
---|
425 |
|
---|
426 | <A NAME="getClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, java.lang.String, boolean, boolean)"><!-- --></A><H3>
|
---|
427 | getClassLoaderForPath</H3>
|
---|
428 | <PRE>
|
---|
429 | public static java.lang.ClassLoader <B>getClassLoaderForPath</B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> p,
|
---|
430 | <A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> path,
|
---|
431 | java.lang.String loaderId,
|
---|
432 | boolean reverseLoader,
|
---|
433 | boolean reuseLoader)</PRE>
|
---|
434 | <DL>
|
---|
435 | <DD>Gets a classloader that loads classes from the classpath
|
---|
436 | defined in the path argument.
|
---|
437 |
|
---|
438 | <p>Based on the setting of the magic property
|
---|
439 | 'ant.reuse.loader' this will try to reuse the perviously
|
---|
440 | created loader with that id, and of course store it there upon
|
---|
441 | creation.</p>
|
---|
442 | <P>
|
---|
443 | <DD><DL>
|
---|
444 | <DT><B>Parameters:</B><DD><CODE>p</CODE> - Ant Project where the handled components are living in.<DD><CODE>path</CODE> - Path object to be used as classpath for this classloader<DD><CODE>loaderId</CODE> - identification for this Loader,<DD><CODE>reverseLoader</CODE> - if set to true this new loader will take
|
---|
445 | precedence over it's parent (which is contra the regular
|
---|
446 | classloader behaviour)<DD><CODE>reuseLoader</CODE> - if true reuse the loader if it is found
|
---|
447 | <DT><B>Returns:</B><DD>ClassLoader that uses the Path as its classpath.</DL>
|
---|
448 | </DD>
|
---|
449 | </DL>
|
---|
450 | <HR>
|
---|
451 |
|
---|
452 | <A NAME="getUniqueClassLoaderForPath(org.apache.tools.ant.Project, org.apache.tools.ant.types.Path, boolean)"><!-- --></A><H3>
|
---|
453 | getUniqueClassLoaderForPath</H3>
|
---|
454 | <PRE>
|
---|
455 | public static java.lang.ClassLoader <B>getUniqueClassLoaderForPath</B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> p,
|
---|
456 | <A HREF="../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> path,
|
---|
457 | boolean reverseLoader)</PRE>
|
---|
458 | <DL>
|
---|
459 | <DD>Gets a fresh, different, not used before classloader that uses the
|
---|
460 | passed path as it's classpath.
|
---|
461 |
|
---|
462 | <p>This method completely ignores the ant.reuse.loader magic
|
---|
463 | property and should be used with caution.</p>
|
---|
464 | <P>
|
---|
465 | <DD><DL>
|
---|
466 | <DT><B>Parameters:</B><DD><CODE>p</CODE> - Ant Project where the handled components are living in.<DD><CODE>path</CODE> - the classpath for this loader<DD><CODE>reverseLoader</CODE> - if set to true this new loader will take
|
---|
467 | precedence over it's parent (which is contra the regular
|
---|
468 | classloader behaviour)
|
---|
469 | <DT><B>Returns:</B><DD>The fresh, different, not used before class loader.</DL>
|
---|
470 | </DD>
|
---|
471 | </DL>
|
---|
472 | <HR>
|
---|
473 |
|
---|
474 | <A NAME="newInstance(java.lang.String, java.lang.ClassLoader)"><!-- --></A><H3>
|
---|
475 | newInstance</H3>
|
---|
476 | <PRE>
|
---|
477 | public static java.lang.Object <B>newInstance</B>(java.lang.String className,
|
---|
478 | java.lang.ClassLoader userDefinedLoader)</PRE>
|
---|
479 | <DL>
|
---|
480 | <DD>Creates a fresh object instance of the specified classname.
|
---|
481 |
|
---|
482 | <p> This uses the userDefinedLoader to load the specified class,
|
---|
483 | and then makes an instance using the default no-argument constructor
|
---|
484 | </p>
|
---|
485 | <P>
|
---|
486 | <DD><DL>
|
---|
487 | <DT><B>Parameters:</B><DD><CODE>className</CODE> - the full qualified class name to load.<DD><CODE>userDefinedLoader</CODE> - the classloader to use.
|
---|
488 | <DT><B>Returns:</B><DD>The fresh object instance
|
---|
489 | <DT><B>Throws:</B>
|
---|
490 | <DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - when loading or instantiation failed.</DL>
|
---|
491 | </DD>
|
---|
492 | </DL>
|
---|
493 | <HR>
|
---|
494 |
|
---|
495 | <A NAME="getDelegate(org.apache.tools.ant.ProjectComponent)"><!-- --></A><H3>
|
---|
496 | getDelegate</H3>
|
---|
497 | <PRE>
|
---|
498 | public static <A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html" title="class in org.apache.tools.ant.util">ClasspathUtils.Delegate</A> <B>getDelegate</B>(<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A> component)</PRE>
|
---|
499 | <DL>
|
---|
500 | <DD>Obtains a delegate that helps out with classic classpath configuration.
|
---|
501 | <P>
|
---|
502 | <DD><DL>
|
---|
503 | <DT><B>Parameters:</B><DD><CODE>component</CODE> - your projectComponent that needs the assistence
|
---|
504 | <DT><B>Returns:</B><DD>the helper, delegate.<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html" title="class in org.apache.tools.ant.util"><CODE>ClasspathUtils.Delegate</CODE></A></DL>
|
---|
505 | </DD>
|
---|
506 | </DL>
|
---|
507 | <!-- ========= END OF CLASS DATA ========= -->
|
---|
508 | <HR>
|
---|
509 |
|
---|
510 |
|
---|
511 | <!-- ======= START OF BOTTOM NAVBAR ====== -->
|
---|
512 | <A NAME="navbar_bottom"><!-- --></A>
|
---|
513 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
---|
514 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
---|
515 | <TR>
|
---|
516 | <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
---|
517 | <A NAME="navbar_bottom_firstrow"><!-- --></A>
|
---|
518 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
---|
519 | <TR ALIGN="center" VALIGN="top">
|
---|
520 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
---|
521 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
---|
522 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
---|
523 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
---|
524 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
---|
525 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
---|
526 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
---|
527 | </TR>
|
---|
528 | </TABLE>
|
---|
529 | </TD>
|
---|
530 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
---|
531 | </EM>
|
---|
532 | </TD>
|
---|
533 | </TR>
|
---|
534 |
|
---|
535 | <TR>
|
---|
536 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
537 | <A HREF="../../../../../org/apache/tools/ant/util/ChainedMapper.html" title="class in org.apache.tools.ant.util"><B>PREV CLASS</B></A>
|
---|
538 | <A HREF="../../../../../org/apache/tools/ant/util/ClasspathUtils.Delegate.html" title="class in org.apache.tools.ant.util"><B>NEXT CLASS</B></A></FONT></TD>
|
---|
539 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
540 | <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
|
---|
541 | <A HREF="ClasspathUtils.html" target="_top"><B>NO FRAMES</B></A>
|
---|
542 | <SCRIPT type="text/javascript">
|
---|
543 | <!--
|
---|
544 | if(window==top) {
|
---|
545 | document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
---|
546 | }
|
---|
547 | //-->
|
---|
548 | </SCRIPT>
|
---|
549 | <NOSCRIPT>
|
---|
550 | <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
---|
551 | </NOSCRIPT>
|
---|
552 |
|
---|
553 | </FONT></TD>
|
---|
554 | </TR>
|
---|
555 | <TR>
|
---|
556 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
557 | SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
---|
558 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
559 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
---|
560 | </TR>
|
---|
561 | </TABLE>
|
---|
562 | <A NAME="skip-navbar_bottom"></A>
|
---|
563 | <!-- ======== END OF BOTTOM NAVBAR ======= -->
|
---|
564 |
|
---|
565 | <HR>
|
---|
566 | Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
|
---|
567 | </BODY>
|
---|
568 | </HTML>
|
---|