source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/build/javadocs/org/apache/tools/ant/types/selectors/SelectorUtils.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: 26.5 KB
RevLine 
[14627]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>
7SelectorUtils (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.ant.types.selectors.SelectorUtils 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="SelectorUtils (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/types/selectors/PresentSelector.FilePresence.html" title="class in org.apache.tools.ant.types.selectors"><B>PREV CLASS</B></A>&nbsp;
53&nbsp;<A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectSelector.html" title="class in org.apache.tools.ant.types.selectors"><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> &nbsp;
56&nbsp;<A HREF="SelectorUtils.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.types.selectors</FONT>
85<BR>
86Class SelectorUtils</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.types.selectors.SelectorUtils</B>
90</PRE>
91<HR>
92<DL>
93<DT>public final class <B>SelectorUtils</B><DT>extends java.lang.Object</DL>
94
95<P>
96<p>This is a utility class used by selectors and DirectoryScanner. The
97 functionality more properly belongs just to selectors, but unfortunately
98 DirectoryScanner exposed these as protected methods. Thus we have to
99 support any subclasses of DirectoryScanner that may access these methods.
100 </p>
101 <p>This is a Singleton.</p>
102<P>
103
104<P>
105<DL>
106<DT><B>Since:</B></DT>
107 <DD>1.5</DD>
108</DL>
109<HR>
110
111<P>
112<!-- ======== NESTED CLASS SUMMARY ======== -->
113
114
115<!-- =========== FIELD SUMMARY =========== -->
116
117
118<!-- ======== CONSTRUCTOR SUMMARY ======== -->
119
120
121<!-- ========== METHOD SUMMARY =========== -->
122
123<A NAME="method_summary"><!-- --></A>
124<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
125<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
126<TD COLSPAN=2><FONT SIZE="+2">
127<B>Method Summary</B></FONT></TD>
128</TR>
129<TR BGCOLOR="white" CLASS="TableRowColor">
130<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
131<CODE>static&nbsp;<A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html" title="class in org.apache.tools.ant.types.selectors">SelectorUtils</A></CODE></FONT></TD>
132<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#getInstance()">getInstance</A></B>()</CODE>
133
134<BR>
135&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the instance of the Singleton.</TD>
136</TR>
137<TR BGCOLOR="white" CLASS="TableRowColor">
138<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
139<CODE>static&nbsp;boolean</CODE></FONT></TD>
140<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#hasWildcards(java.lang.String)">hasWildcards</A></B>(java.lang.String&nbsp;input)</CODE>
141
142<BR>
143&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests if a string contains stars or question marks</TD>
144</TR>
145<TR BGCOLOR="white" CLASS="TableRowColor">
146<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
147<CODE>static&nbsp;boolean</CODE></FONT></TD>
148<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#isOutOfDate(java.io.File, java.io.File, int)">isOutOfDate</A></B>(java.io.File&nbsp;src,
149 java.io.File&nbsp;target,
150 int&nbsp;granularity)</CODE>
151
152<BR>
153&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns dependency information on these two files.</TD>
154</TR>
155<TR BGCOLOR="white" CLASS="TableRowColor">
156<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
157<CODE>static&nbsp;boolean</CODE></FONT></TD>
158<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#isOutOfDate(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource, int)">isOutOfDate</A></B>(<A HREF="../../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A>&nbsp;src,
159 <A HREF="../../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A>&nbsp;target,
160 int&nbsp;granularity)</CODE>
161
162<BR>
163&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns dependency information on these two resources.</TD>
164</TR>
165<TR BGCOLOR="white" CLASS="TableRowColor">
166<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
167<CODE>static&nbsp;boolean</CODE></FONT></TD>
168<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#match(java.lang.String, java.lang.String)">match</A></B>(java.lang.String&nbsp;pattern,
169 java.lang.String&nbsp;str)</CODE>
170
171<BR>
172&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether or not a string matches against a pattern.</TD>
173</TR>
174<TR BGCOLOR="white" CLASS="TableRowColor">
175<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176<CODE>static&nbsp;boolean</CODE></FONT></TD>
177<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#match(java.lang.String, java.lang.String, boolean)">match</A></B>(java.lang.String&nbsp;pattern,
178 java.lang.String&nbsp;str,
179 boolean&nbsp;isCaseSensitive)</CODE>
180
181<BR>
182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether or not a string matches against a pattern.</TD>
183</TR>
184<TR BGCOLOR="white" CLASS="TableRowColor">
185<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
186<CODE>static&nbsp;boolean</CODE></FONT></TD>
187<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#matchPath(java.lang.String, java.lang.String)">matchPath</A></B>(java.lang.String&nbsp;pattern,
188 java.lang.String&nbsp;str)</CODE>
189
190<BR>
191&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether or not a given path matches a given pattern.</TD>
192</TR>
193<TR BGCOLOR="white" CLASS="TableRowColor">
194<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195<CODE>static&nbsp;boolean</CODE></FONT></TD>
196<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#matchPath(java.lang.String, java.lang.String, boolean)">matchPath</A></B>(java.lang.String&nbsp;pattern,
197 java.lang.String&nbsp;str,
198 boolean&nbsp;isCaseSensitive)</CODE>
199
200<BR>
201&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether or not a given path matches a given pattern.</TD>
202</TR>
203<TR BGCOLOR="white" CLASS="TableRowColor">
204<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
205<CODE>static&nbsp;boolean</CODE></FONT></TD>
206<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#matchPatternStart(java.lang.String, java.lang.String)">matchPatternStart</A></B>(java.lang.String&nbsp;pattern,
207 java.lang.String&nbsp;str)</CODE>
208
209<BR>
210&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether or not a given path matches the start of a given
211 pattern up to the first "**".</TD>
212</TR>
213<TR BGCOLOR="white" CLASS="TableRowColor">
214<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
215<CODE>static&nbsp;boolean</CODE></FONT></TD>
216<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#matchPatternStart(java.lang.String, java.lang.String, boolean)">matchPatternStart</A></B>(java.lang.String&nbsp;pattern,
217 java.lang.String&nbsp;str,
218 boolean&nbsp;isCaseSensitive)</CODE>
219
220<BR>
221&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether or not a given path matches the start of a given
222 pattern up to the first "**".</TD>
223</TR>
224<TR BGCOLOR="white" CLASS="TableRowColor">
225<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
226<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
227<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#removeWhitespace(java.lang.String)">removeWhitespace</A></B>(java.lang.String&nbsp;input)</CODE>
228
229<BR>
230&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Flattens" a string by removing all whitespace (space, tab, linefeed,
231 carriage return, and formfeed).</TD>
232</TR>
233<TR BGCOLOR="white" CLASS="TableRowColor">
234<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
235<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
236<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#rtrimWildcardTokens(java.lang.String)">rtrimWildcardTokens</A></B>(java.lang.String&nbsp;input)</CODE>
237
238<BR>
239&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;removes from a pattern all tokens to the right containing wildcards</TD>
240</TR>
241<TR BGCOLOR="white" CLASS="TableRowColor">
242<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
243<CODE>static&nbsp;java.util.Vector</CODE></FONT></TD>
244<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#tokenizePath(java.lang.String)">tokenizePath</A></B>(java.lang.String&nbsp;path)</CODE>
245
246<BR>
247&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Breaks a path up into a Vector of path elements, tokenizing on
248 <code>File.separator</code>.</TD>
249</TR>
250<TR BGCOLOR="white" CLASS="TableRowColor">
251<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
252<CODE>static&nbsp;java.util.Vector</CODE></FONT></TD>
253<TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html#tokenizePath(java.lang.String, java.lang.String)">tokenizePath</A></B>(java.lang.String&nbsp;path,
254 java.lang.String&nbsp;separator)</CODE>
255
256<BR>
257&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Breaks a path up into a Vector of path elements, tokenizing on</TD>
258</TR>
259</TABLE>
260&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
261<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
262<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
263<TD><B>Methods inherited from class java.lang.Object</B></TD>
264</TR>
265<TR BGCOLOR="white" CLASS="TableRowColor">
266<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
267</TR>
268</TABLE>
269&nbsp;
270<P>
271
272<!-- ============ FIELD DETAIL =========== -->
273
274
275<!-- ========= CONSTRUCTOR DETAIL ======== -->
276
277
278<!-- ============ METHOD DETAIL ========== -->
279
280<A NAME="method_detail"><!-- --></A>
281<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
282<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
283<TD COLSPAN=1><FONT SIZE="+2">
284<B>Method Detail</B></FONT></TD>
285</TR>
286</TABLE>
287
288<A NAME="getInstance()"><!-- --></A><H3>
289getInstance</H3>
290<PRE>
291public static <A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectorUtils.html" title="class in org.apache.tools.ant.types.selectors">SelectorUtils</A> <B>getInstance</B>()</PRE>
292<DL>
293<DD>Retrieves the instance of the Singleton.
294<P>
295<DD><DL>
296
297<DT><B>Returns:</B><DD>singleton instance</DL>
298</DD>
299</DL>
300<HR>
301
302<A NAME="matchPatternStart(java.lang.String, java.lang.String)"><!-- --></A><H3>
303matchPatternStart</H3>
304<PRE>
305public static boolean <B>matchPatternStart</B>(java.lang.String&nbsp;pattern,
306 java.lang.String&nbsp;str)</PRE>
307<DL>
308<DD>Tests whether or not a given path matches the start of a given
309 pattern up to the first "**".
310 <p>
311 This is not a general purpose test and should only be used if you
312 can live with false positives. For example, <code>pattern=**\a</code>
313 and <code>str=b</code> will yield <code>true</code>.
314<P>
315<DD><DL>
316<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - The pattern to match against. Must not be
317 <code>null</code>.<DD><CODE>str</CODE> - The path to match, as a String. Must not be
318 <code>null</code>.
319<DT><B>Returns:</B><DD>whether or not a given path matches the start of a given
320 pattern up to the first "**".</DL>
321</DD>
322</DL>
323<HR>
324
325<A NAME="matchPatternStart(java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
326matchPatternStart</H3>
327<PRE>
328public static boolean <B>matchPatternStart</B>(java.lang.String&nbsp;pattern,
329 java.lang.String&nbsp;str,
330 boolean&nbsp;isCaseSensitive)</PRE>
331<DL>
332<DD>Tests whether or not a given path matches the start of a given
333 pattern up to the first "**".
334 <p>
335 This is not a general purpose test and should only be used if you
336 can live with false positives. For example, <code>pattern=**\a</code>
337 and <code>str=b</code> will yield <code>true</code>.
338<P>
339<DD><DL>
340<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - The pattern to match against. Must not be
341 <code>null</code>.<DD><CODE>str</CODE> - The path to match, as a String. Must not be
342 <code>null</code>.<DD><CODE>isCaseSensitive</CODE> - Whether or not matching should be performed
343 case sensitively.
344<DT><B>Returns:</B><DD>whether or not a given path matches the start of a given
345 pattern up to the first "**".</DL>
346</DD>
347</DL>
348<HR>
349
350<A NAME="matchPath(java.lang.String, java.lang.String)"><!-- --></A><H3>
351matchPath</H3>
352<PRE>
353public static boolean <B>matchPath</B>(java.lang.String&nbsp;pattern,
354 java.lang.String&nbsp;str)</PRE>
355<DL>
356<DD>Tests whether or not a given path matches a given pattern.
357<P>
358<DD><DL>
359<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - The pattern to match against. Must not be
360 <code>null</code>.<DD><CODE>str</CODE> - The path to match, as a String. Must not be
361 <code>null</code>.
362<DT><B>Returns:</B><DD><code>true</code> if the pattern matches against the string,
363 or <code>false</code> otherwise.</DL>
364</DD>
365</DL>
366<HR>
367
368<A NAME="matchPath(java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
369matchPath</H3>
370<PRE>
371public static boolean <B>matchPath</B>(java.lang.String&nbsp;pattern,
372 java.lang.String&nbsp;str,
373 boolean&nbsp;isCaseSensitive)</PRE>
374<DL>
375<DD>Tests whether or not a given path matches a given pattern.
376<P>
377<DD><DL>
378<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - The pattern to match against. Must not be
379 <code>null</code>.<DD><CODE>str</CODE> - The path to match, as a String. Must not be
380 <code>null</code>.<DD><CODE>isCaseSensitive</CODE> - Whether or not matching should be performed
381 case sensitively.
382<DT><B>Returns:</B><DD><code>true</code> if the pattern matches against the string,
383 or <code>false</code> otherwise.</DL>
384</DD>
385</DL>
386<HR>
387
388<A NAME="match(java.lang.String, java.lang.String)"><!-- --></A><H3>
389match</H3>
390<PRE>
391public static boolean <B>match</B>(java.lang.String&nbsp;pattern,
392 java.lang.String&nbsp;str)</PRE>
393<DL>
394<DD>Tests whether or not a string matches against a pattern.
395 The pattern may contain two special characters:<br>
396 '*' means zero or more characters<br>
397 '?' means one and only one character
398<P>
399<DD><DL>
400<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - The pattern to match against.
401 Must not be <code>null</code>.<DD><CODE>str</CODE> - The string which must be matched against the pattern.
402 Must not be <code>null</code>.
403<DT><B>Returns:</B><DD><code>true</code> if the string matches against the pattern,
404 or <code>false</code> otherwise.</DL>
405</DD>
406</DL>
407<HR>
408
409<A NAME="match(java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
410match</H3>
411<PRE>
412public static boolean <B>match</B>(java.lang.String&nbsp;pattern,
413 java.lang.String&nbsp;str,
414 boolean&nbsp;isCaseSensitive)</PRE>
415<DL>
416<DD>Tests whether or not a string matches against a pattern.
417 The pattern may contain two special characters:<br>
418 '*' means zero or more characters<br>
419 '?' means one and only one character
420<P>
421<DD><DL>
422<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - The pattern to match against.
423 Must not be <code>null</code>.<DD><CODE>str</CODE> - The string which must be matched against the pattern.
424 Must not be <code>null</code>.<DD><CODE>isCaseSensitive</CODE> - Whether or not matching should be performed
425 case sensitively.
426<DT><B>Returns:</B><DD><code>true</code> if the string matches against the pattern,
427 or <code>false</code> otherwise.</DL>
428</DD>
429</DL>
430<HR>
431
432<A NAME="tokenizePath(java.lang.String)"><!-- --></A><H3>
433tokenizePath</H3>
434<PRE>
435public static java.util.Vector <B>tokenizePath</B>(java.lang.String&nbsp;path)</PRE>
436<DL>
437<DD>Breaks a path up into a Vector of path elements, tokenizing on
438 <code>File.separator</code>.
439<P>
440<DD><DL>
441<DT><B>Parameters:</B><DD><CODE>path</CODE> - Path to tokenize. Must not be <code>null</code>.
442<DT><B>Returns:</B><DD>a Vector of path elements from the tokenized path</DL>
443</DD>
444</DL>
445<HR>
446
447<A NAME="tokenizePath(java.lang.String, java.lang.String)"><!-- --></A><H3>
448tokenizePath</H3>
449<PRE>
450public static java.util.Vector <B>tokenizePath</B>(java.lang.String&nbsp;path,
451 java.lang.String&nbsp;separator)</PRE>
452<DL>
453<DD>Breaks a path up into a Vector of path elements, tokenizing on
454<P>
455<DD><DL>
456<DT><B>Parameters:</B><DD><CODE>path</CODE> - Path to tokenize. Must not be <code>null</code>.<DD><CODE>separator</CODE> - the separator against which to tokenize.
457<DT><B>Returns:</B><DD>a Vector of path elements from the tokenized path<DT><B>Since:</B></DT>
458 <DD>Ant 1.6</DD>
459</DL>
460</DD>
461</DL>
462<HR>
463
464<A NAME="isOutOfDate(java.io.File, java.io.File, int)"><!-- --></A><H3>
465isOutOfDate</H3>
466<PRE>
467public static boolean <B>isOutOfDate</B>(java.io.File&nbsp;src,
468 java.io.File&nbsp;target,
469 int&nbsp;granularity)</PRE>
470<DL>
471<DD>Returns dependency information on these two files. If src has been
472 modified later than target, it returns true. If target doesn't exist,
473 it likewise returns true. Otherwise, target is newer than src and
474 is not out of date, thus the method returns false. It also returns
475 false if the src file doesn't even exist, since how could the
476 target then be out of date.
477<P>
478<DD><DL>
479<DT><B>Parameters:</B><DD><CODE>src</CODE> - the original file<DD><CODE>target</CODE> - the file being compared against<DD><CODE>granularity</CODE> - the amount in seconds of slack we will give in
480 determining out of dateness
481<DT><B>Returns:</B><DD>whether the target is out of date</DL>
482</DD>
483</DL>
484<HR>
485
486<A NAME="isOutOfDate(org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.Resource, int)"><!-- --></A><H3>
487isOutOfDate</H3>
488<PRE>
489public static boolean <B>isOutOfDate</B>(<A HREF="../../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A>&nbsp;src,
490 <A HREF="../../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A>&nbsp;target,
491 int&nbsp;granularity)</PRE>
492<DL>
493<DD>Returns dependency information on these two resources. If src has been
494 modified later than target, it returns true. If target doesn't exist,
495 it likewise returns true. Otherwise, target is newer than src and
496 is not out of date, thus the method returns false. It also returns
497 false if the src file doesn't even exist, since how could the
498 target then be out of date.
499<P>
500<DD><DL>
501<DT><B>Parameters:</B><DD><CODE>src</CODE> - the original resource<DD><CODE>target</CODE> - the resource being compared against<DD><CODE>granularity</CODE> - the amount in seconds of slack we will give in
502 determining out of dateness
503<DT><B>Returns:</B><DD>whether the target is out of date</DL>
504</DD>
505</DL>
506<HR>
507
508<A NAME="removeWhitespace(java.lang.String)"><!-- --></A><H3>
509removeWhitespace</H3>
510<PRE>
511public static java.lang.String <B>removeWhitespace</B>(java.lang.String&nbsp;input)</PRE>
512<DL>
513<DD>"Flattens" a string by removing all whitespace (space, tab, linefeed,
514 carriage return, and formfeed). This uses StringTokenizer and the
515 default set of tokens as documented in the single arguement constructor.
516<P>
517<DD><DL>
518<DT><B>Parameters:</B><DD><CODE>input</CODE> - a String to remove all whitespace.
519<DT><B>Returns:</B><DD>a String that has had all whitespace removed.</DL>
520</DD>
521</DL>
522<HR>
523
524<A NAME="hasWildcards(java.lang.String)"><!-- --></A><H3>
525hasWildcards</H3>
526<PRE>
527public static boolean <B>hasWildcards</B>(java.lang.String&nbsp;input)</PRE>
528<DL>
529<DD>Tests if a string contains stars or question marks
530<P>
531<DD><DL>
532<DT><B>Parameters:</B><DD><CODE>input</CODE> - a String which one wants to test for containing wildcard
533<DT><B>Returns:</B><DD>true if the string contains at least a star or a question mark</DL>
534</DD>
535</DL>
536<HR>
537
538<A NAME="rtrimWildcardTokens(java.lang.String)"><!-- --></A><H3>
539rtrimWildcardTokens</H3>
540<PRE>
541public static java.lang.String <B>rtrimWildcardTokens</B>(java.lang.String&nbsp;input)</PRE>
542<DL>
543<DD>removes from a pattern all tokens to the right containing wildcards
544<P>
545<DD><DL>
546<DT><B>Parameters:</B><DD><CODE>input</CODE> - the input string
547<DT><B>Returns:</B><DD>the leftmost part of the pattern without wildcards</DL>
548</DD>
549</DL>
550<!-- ========= END OF CLASS DATA ========= -->
551<HR>
552
553
554<!-- ======= START OF BOTTOM NAVBAR ====== -->
555<A NAME="navbar_bottom"><!-- --></A>
556<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
557<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
558<TR>
559<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
560<A NAME="navbar_bottom_firstrow"><!-- --></A>
561<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
562 <TR ALIGN="center" VALIGN="top">
563 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
564 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
565 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
566 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
567 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
568 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
569 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
570 </TR>
571</TABLE>
572</TD>
573<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
574</EM>
575</TD>
576</TR>
577
578<TR>
579<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
580&nbsp;<A HREF="../../../../../../org/apache/tools/ant/types/selectors/PresentSelector.FilePresence.html" title="class in org.apache.tools.ant.types.selectors"><B>PREV CLASS</B></A>&nbsp;
581&nbsp;<A HREF="../../../../../../org/apache/tools/ant/types/selectors/SelectSelector.html" title="class in org.apache.tools.ant.types.selectors"><B>NEXT CLASS</B></A></FONT></TD>
582<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
583 <A HREF="../../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
584&nbsp;<A HREF="SelectorUtils.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
585&nbsp;<SCRIPT type="text/javascript">
586 <!--
587 if(window==top) {
588 document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
589 }
590 //-->
591</SCRIPT>
592<NOSCRIPT>
593 <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
594</NOSCRIPT>
595
596</FONT></TD>
597</TR>
598<TR>
599<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
600 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
601<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
602DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
603</TR>
604</TABLE>
605<A NAME="skip-navbar_bottom"></A>
606<!-- ======== END OF BOTTOM NAVBAR ======= -->
607
608<HR>
609Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
610</BODY>
611</HTML>
Note: See TracBrowser for help on using the repository browser.