source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/build/javadocs/org/apache/tools/ant/launch/Locator.html@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 14.6 KB
Line 
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:17 NZST 2007 -->
6<TITLE>
7Locator (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.ant.launch.Locator class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17 parent.document.title="Locator (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>&nbsp;</TD>
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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&nbsp;<A HREF="../../../../../org/apache/tools/ant/launch/Launcher.html" title="class in org.apache.tools.ant.launch"><B>PREV CLASS</B></A>&nbsp;
53&nbsp;NEXT CLASS</FONT></TD>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
56&nbsp;<A HREF="Locator.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
57&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
73<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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">
84org.apache.tools.ant.launch</FONT>
85<BR>
86Class Locator</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.launch.Locator</B>
90</PRE>
91<HR>
92<DL>
93<DT>public final class <B>Locator</B><DT>extends java.lang.Object</DL>
94
95<P>
96The Locator is a utility class which is used to find certain items
97 in the environment
98<P>
99
100<P>
101<DL>
102<DT><B>Since:</B></DT>
103 <DD>Ant 1.6</DD>
104</DL>
105<HR>
106
107<P>
108<!-- ======== NESTED CLASS SUMMARY ======== -->
109
110
111<!-- =========== FIELD SUMMARY =========== -->
112
113
114<!-- ======== CONSTRUCTOR SUMMARY ======== -->
115
116
117<!-- ========== METHOD SUMMARY =========== -->
118
119<A NAME="method_summary"><!-- --></A>
120<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
121<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
122<TD COLSPAN=2><FONT SIZE="+2">
123<B>Method Summary</B></FONT></TD>
124</TR>
125<TR BGCOLOR="white" CLASS="TableRowColor">
126<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
127<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
128<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/launch/Locator.html#fromURI(java.lang.String)">fromURI</A></B>(java.lang.String&nbsp;uri)</CODE>
129
130<BR>
131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a file path from a <code>file:</code> URI.</TD>
132</TR>
133<TR BGCOLOR="white" CLASS="TableRowColor">
134<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
135<CODE>static&nbsp;java.io.File</CODE></FONT></TD>
136<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/launch/Locator.html#getClassSource(java.lang.Class)">getClassSource</A></B>(java.lang.Class&nbsp;c)</CODE>
137
138<BR>
139&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find the directory or jar file the class has been loaded from.</TD>
140</TR>
141<TR BGCOLOR="white" CLASS="TableRowColor">
142<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
143<CODE>static&nbsp;java.net.URL[]</CODE></FONT></TD>
144<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/launch/Locator.html#getLocationURLs(java.io.File)">getLocationURLs</A></B>(java.io.File&nbsp;location)</CODE>
145
146<BR>
147&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get an array or URLs representing all of the jar files in the
148 given location.</TD>
149</TR>
150<TR BGCOLOR="white" CLASS="TableRowColor">
151<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
152<CODE>static&nbsp;java.net.URL[]</CODE></FONT></TD>
153<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/launch/Locator.html#getLocationURLs(java.io.File, java.lang.String[])">getLocationURLs</A></B>(java.io.File&nbsp;location,
154 java.lang.String[]&nbsp;extensions)</CODE>
155
156<BR>
157&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get an array or URLs representing all of the files of a given set of
158 extensions in the given location.</TD>
159</TR>
160<TR BGCOLOR="white" CLASS="TableRowColor">
161<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
162<CODE>static&nbsp;java.io.File</CODE></FONT></TD>
163<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/launch/Locator.html#getResourceSource(java.lang.ClassLoader, java.lang.String)">getResourceSource</A></B>(java.lang.ClassLoader&nbsp;c,
164 java.lang.String&nbsp;resource)</CODE>
165
166<BR>
167&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find the directory or jar a give resource has been loaded from.</TD>
168</TR>
169<TR BGCOLOR="white" CLASS="TableRowColor">
170<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171<CODE>static&nbsp;java.io.File</CODE></FONT></TD>
172<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/launch/Locator.html#getToolsJar()">getToolsJar</A></B>()</CODE>
173
174<BR>
175&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the File necessary to load the Sun compiler tools.</TD>
176</TR>
177</TABLE>
178&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
179<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
180<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
181<TD><B>Methods inherited from class java.lang.Object</B></TD>
182</TR>
183<TR BGCOLOR="white" CLASS="TableRowColor">
184<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
185</TR>
186</TABLE>
187&nbsp;
188<P>
189
190<!-- ============ FIELD DETAIL =========== -->
191
192
193<!-- ========= CONSTRUCTOR DETAIL ======== -->
194
195
196<!-- ============ METHOD DETAIL ========== -->
197
198<A NAME="method_detail"><!-- --></A>
199<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
200<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
201<TD COLSPAN=1><FONT SIZE="+2">
202<B>Method Detail</B></FONT></TD>
203</TR>
204</TABLE>
205
206<A NAME="getClassSource(java.lang.Class)"><!-- --></A><H3>
207getClassSource</H3>
208<PRE>
209public static java.io.File <B>getClassSource</B>(java.lang.Class&nbsp;c)</PRE>
210<DL>
211<DD>Find the directory or jar file the class has been loaded from.
212<P>
213<DD><DL>
214<DT><B>Parameters:</B><DD><CODE>c</CODE> - the class whose location is required.
215<DT><B>Returns:</B><DD>the file or jar with the class or null if we cannot
216 determine the location.<DT><B>Since:</B></DT>
217 <DD>Ant 1.6</DD>
218</DL>
219</DD>
220</DL>
221<HR>
222
223<A NAME="getResourceSource(java.lang.ClassLoader, java.lang.String)"><!-- --></A><H3>
224getResourceSource</H3>
225<PRE>
226public static java.io.File <B>getResourceSource</B>(java.lang.ClassLoader&nbsp;c,
227 java.lang.String&nbsp;resource)</PRE>
228<DL>
229<DD>Find the directory or jar a give resource has been loaded from.
230<P>
231<DD><DL>
232<DT><B>Parameters:</B><DD><CODE>c</CODE> - the classloader to be consulted for the source<DD><CODE>resource</CODE> - the resource whose location is required.
233<DT><B>Returns:</B><DD>the file with the resource source or null if
234 we cannot determine the location.<DT><B>Since:</B></DT>
235 <DD>Ant 1.6</DD>
236</DL>
237</DD>
238</DL>
239<HR>
240
241<A NAME="fromURI(java.lang.String)"><!-- --></A><H3>
242fromURI</H3>
243<PRE>
244public static java.lang.String <B>fromURI</B>(java.lang.String&nbsp;uri)</PRE>
245<DL>
246<DD>Constructs a file path from a <code>file:</code> URI.
247
248 <p>Will be an absolute path if the given URI is absolute.</p>
249
250 <p>Swallows '%' that are not followed by two characters,
251 doesn't deal with non-ASCII characters.</p>
252<P>
253<DD><DL>
254<DT><B>Parameters:</B><DD><CODE>uri</CODE> - the URI designating a file in the local filesystem.
255<DT><B>Returns:</B><DD>the local file system path for the file.<DT><B>Since:</B></DT>
256 <DD>Ant 1.6</DD>
257</DL>
258</DD>
259</DL>
260<HR>
261
262<A NAME="getToolsJar()"><!-- --></A><H3>
263getToolsJar</H3>
264<PRE>
265public static java.io.File <B>getToolsJar</B>()</PRE>
266<DL>
267<DD>Get the File necessary to load the Sun compiler tools. If the classes
268 are available to this class, then no additional URL is required and
269 null is returned. This may be because the classes are explicitly in the
270 class path or provided by the JVM directly
271<P>
272<DD><DL>
273
274<DT><B>Returns:</B><DD>the tools jar as a File if required, null otherwise</DL>
275</DD>
276</DL>
277<HR>
278
279<A NAME="getLocationURLs(java.io.File)"><!-- --></A><H3>
280getLocationURLs</H3>
281<PRE>
282public static java.net.URL[] <B>getLocationURLs</B>(java.io.File&nbsp;location)
283 throws java.net.MalformedURLException</PRE>
284<DL>
285<DD>Get an array or URLs representing all of the jar files in the
286 given location. If the location is a file, it is returned as the only
287 element of the array. If the location is a directory, it is scanned for
288 jar files
289<P>
290<DD><DL>
291<DT><B>Parameters:</B><DD><CODE>location</CODE> - the location to scan for Jars
292<DT><B>Returns:</B><DD>an array of URLs for all jars in the given location.
293<DT><B>Throws:</B>
294<DD><CODE>java.net.MalformedURLException</CODE> - if the URLs for the jars cannot be
295 formed</DL>
296</DD>
297</DL>
298<HR>
299
300<A NAME="getLocationURLs(java.io.File, java.lang.String[])"><!-- --></A><H3>
301getLocationURLs</H3>
302<PRE>
303public static java.net.URL[] <B>getLocationURLs</B>(java.io.File&nbsp;location,
304 java.lang.String[]&nbsp;extensions)
305 throws java.net.MalformedURLException</PRE>
306<DL>
307<DD>Get an array or URLs representing all of the files of a given set of
308 extensions in the given location. If the location is a file, it is
309 returned as the only element of the array. If the location is a
310 directory, it is scanned for matching files
311<P>
312<DD><DL>
313<DT><B>Parameters:</B><DD><CODE>location</CODE> - the location to scan for files<DD><CODE>extensions</CODE> - an array of extension that are to match in the
314 directory search
315<DT><B>Returns:</B><DD>an array of URLs of matching files
316<DT><B>Throws:</B>
317<DD><CODE>java.net.MalformedURLException</CODE> - if the URLs for the files cannot be
318 formed</DL>
319</DD>
320</DL>
321<!-- ========= END OF CLASS DATA ========= -->
322<HR>
323
324
325<!-- ======= START OF BOTTOM NAVBAR ====== -->
326<A NAME="navbar_bottom"><!-- --></A>
327<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
328<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
329<TR>
330<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
331<A NAME="navbar_bottom_firstrow"><!-- --></A>
332<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
333 <TR ALIGN="center" VALIGN="top">
334 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
335 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
336 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
337 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
338 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
339 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
340 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
341 </TR>
342</TABLE>
343</TD>
344<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
345</EM>
346</TD>
347</TR>
348
349<TR>
350<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
351&nbsp;<A HREF="../../../../../org/apache/tools/ant/launch/Launcher.html" title="class in org.apache.tools.ant.launch"><B>PREV CLASS</B></A>&nbsp;
352&nbsp;NEXT CLASS</FONT></TD>
353<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
354 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
355&nbsp;<A HREF="Locator.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
356&nbsp;<SCRIPT type="text/javascript">
357 <!--
358 if(window==top) {
359 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
360 }
361 //-->
362</SCRIPT>
363<NOSCRIPT>
364 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
365</NOSCRIPT>
366
367</FONT></TD>
368</TR>
369<TR>
370<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
371 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
372<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
373DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
374</TR>
375</TABLE>
376<A NAME="skip-navbar_bottom"></A>
377<!-- ======== END OF BOTTOM NAVBAR ======= -->
378
379<HR>
380Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
381</BODY>
382</HTML>
Note: See TracBrowser for help on using the repository browser.