source: release-kits/lirk3/resources/gs3-release-maker/ant/docs/manual/api/org/apache/tools/ant/PropertyHelper.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 33.5 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:15 NZST 2007 -->
6<TITLE>
7PropertyHelper (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.ant.PropertyHelper 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="PropertyHelper (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/ProjectHelper.html" title="class in org.apache.tools.ant"><B>PREV CLASS</B></A>&nbsp;
53&nbsp;<A HREF="../../../../org/apache/tools/ant/RuntimeConfigurable.html" title="class in org.apache.tools.ant"><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="PropertyHelper.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;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
73<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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</FONT>
85<BR>
86Class PropertyHelper</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.PropertyHelper</B>
90</PRE>
91<HR>
92<DL>
93<DT>public class <B>PropertyHelper</B><DT>extends java.lang.Object</DL>
94
95<P>
96NOT FINAL. API MAY CHANGE
97
98 Deals with properties - substitution, dynamic properties, etc.
99
100 This is the same code as in Ant1.5. The main addition is the ability
101 to chain multiple PropertyHelpers and to replace the default.
102<P>
103
104<P>
105<DL>
106<DT><B>Since:</B></DT>
107 <DD>Ant 1.6</DD>
108</DL>
109<HR>
110
111<P>
112<!-- ======== NESTED CLASS SUMMARY ======== -->
113
114
115<!-- =========== FIELD SUMMARY =========== -->
116
117
118<!-- ======== CONSTRUCTOR SUMMARY ======== -->
119
120<A NAME="constructor_summary"><!-- --></A>
121<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
122<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
123<TD COLSPAN=2><FONT SIZE="+2">
124<B>Constructor Summary</B></FONT></TD>
125</TR>
126<TR BGCOLOR="white" CLASS="TableRowColor">
127<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
128<CODE>protected </CODE></FONT></TD>
129<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#PropertyHelper()">PropertyHelper</A></B>()</CODE>
130
131<BR>
132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor.</TD>
133</TR>
134</TABLE>
135&nbsp;
136<!-- ========== METHOD SUMMARY =========== -->
137
138<A NAME="method_summary"><!-- --></A>
139<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
140<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
141<TD COLSPAN=2><FONT SIZE="+2">
142<B>Method Summary</B></FONT></TD>
143</TR>
144<TR BGCOLOR="white" CLASS="TableRowColor">
145<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
146<CODE>&nbsp;void</CODE></FONT></TD>
147<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#copyInheritedProperties(org.apache.tools.ant.Project)">copyInheritedProperties</A></B>(<A HREF="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;other)</CODE>
148
149<BR>
150&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copies all user properties that have not been set on the
151 command line or a GUI tool from this instance to the Project
152 instance given as the argument.</TD>
153</TR>
154<TR BGCOLOR="white" CLASS="TableRowColor">
155<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
156<CODE>&nbsp;void</CODE></FONT></TD>
157<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#copyUserProperties(org.apache.tools.ant.Project)">copyUserProperties</A></B>(<A HREF="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;other)</CODE>
158
159<BR>
160&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copies all user properties that have been set on the command
161 line or a GUI tool from this instance to the Project instance
162 given as the argument.</TD>
163</TR>
164<TR BGCOLOR="white" CLASS="TableRowColor">
165<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
166<CODE>&nbsp;<A HREF="../../../../org/apache/tools/ant/PropertyHelper.html" title="class in org.apache.tools.ant">PropertyHelper</A></CODE></FONT></TD>
167<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#getNext()">getNext</A></B>()</CODE>
168
169<BR>
170&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the next property helper in the chain.</TD>
171</TR>
172<TR BGCOLOR="white" CLASS="TableRowColor">
173<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
174<CODE>&nbsp;java.util.Hashtable</CODE></FONT></TD>
175<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#getProperties()">getProperties</A></B>()</CODE>
176
177<BR>
178&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a copy of the properties table.</TD>
179</TR>
180<TR BGCOLOR="white" CLASS="TableRowColor">
181<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
182<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
183<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#getProperty(java.lang.String, java.lang.String)">getProperty</A></B>(java.lang.String&nbsp;ns,
184 java.lang.String&nbsp;name)</CODE>
185
186<BR>
187&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of a property, if it is set.</TD>
188</TR>
189<TR BGCOLOR="white" CLASS="TableRowColor">
190<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
191<CODE>static&nbsp;<A HREF="../../../../org/apache/tools/ant/PropertyHelper.html" title="class in org.apache.tools.ant">PropertyHelper</A></CODE></FONT></TD>
192<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#getPropertyHelper(org.apache.tools.ant.Project)">getPropertyHelper</A></B>(<A HREF="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;project)</CODE>
193
194<BR>
195&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Factory method to create a property processor.</TD>
196</TR>
197<TR BGCOLOR="white" CLASS="TableRowColor">
198<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
199<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
200<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#getPropertyHook(java.lang.String, java.lang.String, boolean)">getPropertyHook</A></B>(java.lang.String&nbsp;ns,
201 java.lang.String&nbsp;name,
202 boolean&nbsp;user)</CODE>
203
204<BR>
205&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a property.</TD>
206</TR>
207<TR BGCOLOR="white" CLASS="TableRowColor">
208<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
209<CODE>&nbsp;java.util.Hashtable</CODE></FONT></TD>
210<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#getUserProperties()">getUserProperties</A></B>()</CODE>
211
212<BR>
213&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a copy of the user property hashtable</TD>
214</TR>
215<TR BGCOLOR="white" CLASS="TableRowColor">
216<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
217<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
218<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#getUserProperty(java.lang.String, java.lang.String)">getUserProperty</A></B>(java.lang.String&nbsp;ns,
219 java.lang.String&nbsp;name)</CODE>
220
221<BR>
222&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of a user property, if it is set.</TD>
223</TR>
224<TR BGCOLOR="white" CLASS="TableRowColor">
225<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
226<CODE>&nbsp;void</CODE></FONT></TD>
227<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#parsePropertyString(java.lang.String, java.util.Vector, java.util.Vector)">parsePropertyString</A></B>(java.lang.String&nbsp;value,
228 java.util.Vector&nbsp;fragments,
229 java.util.Vector&nbsp;propertyRefs)</CODE>
230
231<BR>
232&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parses a string containing <code>${xxx}</code> style property
233 references into two lists.</TD>
234</TR>
235<TR BGCOLOR="white" CLASS="TableRowColor">
236<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
237<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
238<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#replaceProperties(java.lang.String, java.lang.String, java.util.Hashtable)">replaceProperties</A></B>(java.lang.String&nbsp;ns,
239 java.lang.String&nbsp;value,
240 java.util.Hashtable&nbsp;keys)</CODE>
241
242<BR>
243&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replaces <code>${xxx}</code> style constructions in the given value
244 with the string value of the corresponding data types.</TD>
245</TR>
246<TR BGCOLOR="white" CLASS="TableRowColor">
247<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
248<CODE>&nbsp;void</CODE></FONT></TD>
249<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#setInheritedProperty(java.lang.String, java.lang.String, java.lang.Object)">setInheritedProperty</A></B>(java.lang.String&nbsp;ns,
250 java.lang.String&nbsp;name,
251 java.lang.Object&nbsp;value)</CODE>
252
253<BR>
254&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets an inherited user property, which cannot be overwritten by set/unset
255 property calls.</TD>
256</TR>
257<TR BGCOLOR="white" CLASS="TableRowColor">
258<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
259<CODE>&nbsp;void</CODE></FONT></TD>
260<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#setNewProperty(java.lang.String, java.lang.String, java.lang.Object)">setNewProperty</A></B>(java.lang.String&nbsp;ns,
261 java.lang.String&nbsp;name,
262 java.lang.Object&nbsp;value)</CODE>
263
264<BR>
265&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a property if no value currently exists.</TD>
266</TR>
267<TR BGCOLOR="white" CLASS="TableRowColor">
268<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
269<CODE>&nbsp;void</CODE></FONT></TD>
270<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#setNext(org.apache.tools.ant.PropertyHelper)">setNext</A></B>(<A HREF="../../../../org/apache/tools/ant/PropertyHelper.html" title="class in org.apache.tools.ant">PropertyHelper</A>&nbsp;next)</CODE>
271
272<BR>
273&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;There are 2 ways to hook into property handling:
274 - you can replace the main PropertyHelper.</TD>
275</TR>
276<TR BGCOLOR="white" CLASS="TableRowColor">
277<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
278<CODE>&nbsp;void</CODE></FONT></TD>
279<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#setProject(org.apache.tools.ant.Project)">setProject</A></B>(<A HREF="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;p)</CODE>
280
281<BR>
282&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the project for which this helper is performing property resolution</TD>
283</TR>
284<TR BGCOLOR="white" CLASS="TableRowColor">
285<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
286<CODE>&nbsp;boolean</CODE></FONT></TD>
287<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#setProperty(java.lang.String, java.lang.String, java.lang.Object, boolean)">setProperty</A></B>(java.lang.String&nbsp;ns,
288 java.lang.String&nbsp;name,
289 java.lang.Object&nbsp;value,
290 boolean&nbsp;verbose)</CODE>
291
292<BR>
293&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default implementation of setProperty.</TD>
294</TR>
295<TR BGCOLOR="white" CLASS="TableRowColor">
296<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
297<CODE>&nbsp;boolean</CODE></FONT></TD>
298<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#setPropertyHook(java.lang.String, java.lang.String, java.lang.Object, boolean, boolean, boolean)">setPropertyHook</A></B>(java.lang.String&nbsp;ns,
299 java.lang.String&nbsp;name,
300 java.lang.Object&nbsp;value,
301 boolean&nbsp;inherited,
302 boolean&nbsp;user,
303 boolean&nbsp;isNew)</CODE>
304
305<BR>
306&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a property.</TD>
307</TR>
308<TR BGCOLOR="white" CLASS="TableRowColor">
309<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
310<CODE>&nbsp;void</CODE></FONT></TD>
311<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#setUserProperty(java.lang.String, java.lang.String, java.lang.Object)">setUserProperty</A></B>(java.lang.String&nbsp;ns,
312 java.lang.String&nbsp;name,
313 java.lang.Object&nbsp;value)</CODE>
314
315<BR>
316&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a user property, which cannot be overwritten by
317 set/unset property calls.</TD>
318</TR>
319</TABLE>
320&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
321<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
322<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
323<TD><B>Methods inherited from class java.lang.Object</B></TD>
324</TR>
325<TR BGCOLOR="white" CLASS="TableRowColor">
326<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
327</TR>
328</TABLE>
329&nbsp;
330<P>
331
332<!-- ============ FIELD DETAIL =========== -->
333
334
335<!-- ========= CONSTRUCTOR DETAIL ======== -->
336
337<A NAME="constructor_detail"><!-- --></A>
338<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
339<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
340<TD COLSPAN=1><FONT SIZE="+2">
341<B>Constructor Detail</B></FONT></TD>
342</TR>
343</TABLE>
344
345<A NAME="PropertyHelper()"><!-- --></A><H3>
346PropertyHelper</H3>
347<PRE>
348protected <B>PropertyHelper</B>()</PRE>
349<DL>
350<DD>Default constructor.
351<P>
352</DL>
353
354<!-- ============ METHOD DETAIL ========== -->
355
356<A NAME="method_detail"><!-- --></A>
357<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
358<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
359<TD COLSPAN=1><FONT SIZE="+2">
360<B>Method Detail</B></FONT></TD>
361</TR>
362</TABLE>
363
364<A NAME="setProject(org.apache.tools.ant.Project)"><!-- --></A><H3>
365setProject</H3>
366<PRE>
367public void <B>setProject</B>(<A HREF="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;p)</PRE>
368<DL>
369<DD>Set the project for which this helper is performing property resolution
370<P>
371<DD><DL>
372<DT><B>Parameters:</B><DD><CODE>p</CODE> - the project instance.</DL>
373</DD>
374</DL>
375<HR>
376
377<A NAME="setNext(org.apache.tools.ant.PropertyHelper)"><!-- --></A><H3>
378setNext</H3>
379<PRE>
380public void <B>setNext</B>(<A HREF="../../../../org/apache/tools/ant/PropertyHelper.html" title="class in org.apache.tools.ant">PropertyHelper</A>&nbsp;next)</PRE>
381<DL>
382<DD>There are 2 ways to hook into property handling:
383 - you can replace the main PropertyHelper. The replacement is required
384 to support the same semantics (of course :-)
385
386 - you can chain a property helper capable of storing some properties.
387 Again, you are required to respect the immutability semantics (at
388 least for non-dynamic properties)
389<P>
390<DD><DL>
391<DT><B>Parameters:</B><DD><CODE>next</CODE> - the next property helper in the chain.</DL>
392</DD>
393</DL>
394<HR>
395
396<A NAME="getNext()"><!-- --></A><H3>
397getNext</H3>
398<PRE>
399public <A HREF="../../../../org/apache/tools/ant/PropertyHelper.html" title="class in org.apache.tools.ant">PropertyHelper</A> <B>getNext</B>()</PRE>
400<DL>
401<DD>Get the next property helper in the chain.
402<P>
403<DD><DL>
404
405<DT><B>Returns:</B><DD>the next property helper.</DL>
406</DD>
407</DL>
408<HR>
409
410<A NAME="getPropertyHelper(org.apache.tools.ant.Project)"><!-- --></A><H3>
411getPropertyHelper</H3>
412<PRE>
413public static <A HREF="../../../../org/apache/tools/ant/PropertyHelper.html" title="class in org.apache.tools.ant">PropertyHelper</A> <B>getPropertyHelper</B>(<A HREF="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;project)</PRE>
414<DL>
415<DD>Factory method to create a property processor.
416 Users can provide their own or replace it using "ant.PropertyHelper"
417 reference. User tasks can also add themselves to the chain, and provide
418 dynamic properties.
419<P>
420<DD><DL>
421<DT><B>Parameters:</B><DD><CODE>project</CODE> - the project fro which the property helper is required.
422<DT><B>Returns:</B><DD>the project's property helper.</DL>
423</DD>
424</DL>
425<HR>
426
427<A NAME="setPropertyHook(java.lang.String, java.lang.String, java.lang.Object, boolean, boolean, boolean)"><!-- --></A><H3>
428setPropertyHook</H3>
429<PRE>
430public boolean <B>setPropertyHook</B>(java.lang.String&nbsp;ns,
431 java.lang.String&nbsp;name,
432 java.lang.Object&nbsp;value,
433 boolean&nbsp;inherited,
434 boolean&nbsp;user,
435 boolean&nbsp;isNew)</PRE>
436<DL>
437<DD>Sets a property. Any existing property of the same name
438 is overwritten, unless it is a user property. Will be called
439 from setProperty().
440
441 If all helpers return false, the property will be saved in
442 the default properties table by setProperty.
443<P>
444<DD><DL>
445<DT><B>Parameters:</B><DD><CODE>ns</CODE> - The namespace that the property is in (currently
446 not used.<DD><CODE>name</CODE> - The name of property to set.
447 Must not be <code>null</code>.<DD><CODE>value</CODE> - The new value of the property.
448 Must not be <code>null</code>.<DD><CODE>inherited</CODE> - True if this property is inherited (an [sub]ant[call] property).<DD><CODE>user</CODE> - True if this property is a user property.<DD><CODE>isNew</CODE> - True is this is a new property.
449<DT><B>Returns:</B><DD>true if this helper has stored the property, false if it
450 couldn't. Each helper should delegate to the next one (unless it
451 has a good reason not to).</DL>
452</DD>
453</DL>
454<HR>
455
456<A NAME="getPropertyHook(java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
457getPropertyHook</H3>
458<PRE>
459public java.lang.Object <B>getPropertyHook</B>(java.lang.String&nbsp;ns,
460 java.lang.String&nbsp;name,
461 boolean&nbsp;user)</PRE>
462<DL>
463<DD>Get a property. If all hooks return null, the default
464 tables will be used.
465<P>
466<DD><DL>
467<DT><B>Parameters:</B><DD><CODE>ns</CODE> - namespace of the sought property.<DD><CODE>name</CODE> - name of the sought property.<DD><CODE>user</CODE> - True if this is a user property.
468<DT><B>Returns:</B><DD>The property, if returned by a hook, or null if none.</DL>
469</DD>
470</DL>
471<HR>
472
473<A NAME="parsePropertyString(java.lang.String, java.util.Vector, java.util.Vector)"><!-- --></A><H3>
474parsePropertyString</H3>
475<PRE>
476public void <B>parsePropertyString</B>(java.lang.String&nbsp;value,
477 java.util.Vector&nbsp;fragments,
478 java.util.Vector&nbsp;propertyRefs)
479 throws <A HREF="../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
480<DL>
481<DD>Parses a string containing <code>${xxx}</code> style property
482 references into two lists. The first list is a collection
483 of text fragments, while the other is a set of string property names.
484 <code>null</code> entries in the first list indicate a property
485 reference from the second list.
486
487 It can be overridden with a more efficient or customized version.
488<P>
489<DD><DL>
490<DT><B>Parameters:</B><DD><CODE>value</CODE> - Text to parse. Must not be <code>null</code>.<DD><CODE>fragments</CODE> - List to add text fragments to.
491 Must not be <code>null</code>.<DD><CODE>propertyRefs</CODE> - List to add property names to.
492 Must not be <code>null</code>.
493<DT><B>Throws:</B>
494<DD><CODE><A HREF="../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - if the string contains an opening
495 <code>${</code> without a closing
496 <code>}</code></DL>
497</DD>
498</DL>
499<HR>
500
501<A NAME="replaceProperties(java.lang.String, java.lang.String, java.util.Hashtable)"><!-- --></A><H3>
502replaceProperties</H3>
503<PRE>
504public java.lang.String <B>replaceProperties</B>(java.lang.String&nbsp;ns,
505 java.lang.String&nbsp;value,
506 java.util.Hashtable&nbsp;keys)
507 throws <A HREF="../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
508<DL>
509<DD>Replaces <code>${xxx}</code> style constructions in the given value
510 with the string value of the corresponding data types.
511<P>
512<DD><DL>
513<DT><B>Parameters:</B><DD><CODE>ns</CODE> - The namespace for the property.<DD><CODE>value</CODE> - The string to be scanned for property references.
514 May be <code>null</code>, in which case this
515 method returns immediately with no effect.<DD><CODE>keys</CODE> - Mapping (String to String) of property names to their
516 values. If <code>null</code>, only project properties will
517 be used.
518<DT><B>Returns:</B><DD>the original string with the properties replaced, or
519 <code>null</code> if the original string is <code>null</code>.
520<DT><B>Throws:</B>
521<DD><CODE><A HREF="../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - if the string contains an opening
522 <code>${</code> without a closing
523 <code>}</code></DL>
524</DD>
525</DL>
526<HR>
527
528<A NAME="setProperty(java.lang.String, java.lang.String, java.lang.Object, boolean)"><!-- --></A><H3>
529setProperty</H3>
530<PRE>
531public boolean <B>setProperty</B>(java.lang.String&nbsp;ns,
532 java.lang.String&nbsp;name,
533 java.lang.Object&nbsp;value,
534 boolean&nbsp;verbose)</PRE>
535<DL>
536<DD>Default implementation of setProperty. Will be called from Project.
537 This is the original 1.5 implementation, with calls to the hook
538 added.
539<P>
540<DD><DL>
541<DT><B>Parameters:</B><DD><CODE>ns</CODE> - The namespace for the property (currently not used).<DD><CODE>name</CODE> - The name of the property.<DD><CODE>value</CODE> - The value to set the property to.<DD><CODE>verbose</CODE> - If this is true output extra log messages.
542<DT><B>Returns:</B><DD>true if the property is set.</DL>
543</DD>
544</DL>
545<HR>
546
547<A NAME="setNewProperty(java.lang.String, java.lang.String, java.lang.Object)"><!-- --></A><H3>
548setNewProperty</H3>
549<PRE>
550public void <B>setNewProperty</B>(java.lang.String&nbsp;ns,
551 java.lang.String&nbsp;name,
552 java.lang.Object&nbsp;value)</PRE>
553<DL>
554<DD>Sets a property if no value currently exists. If the property
555 exists already, a message is logged and the method returns with
556 no other effect.
557<P>
558<DD><DL>
559<DT><B>Parameters:</B><DD><CODE>ns</CODE> - The namespace for the property (currently not used).<DD><CODE>name</CODE> - The name of property to set.
560 Must not be <code>null</code>.<DD><CODE>value</CODE> - The new value of the property.
561 Must not be <code>null</code>.<DT><B>Since:</B></DT>
562 <DD>Ant 1.6</DD>
563</DL>
564</DD>
565</DL>
566<HR>
567
568<A NAME="setUserProperty(java.lang.String, java.lang.String, java.lang.Object)"><!-- --></A><H3>
569setUserProperty</H3>
570<PRE>
571public void <B>setUserProperty</B>(java.lang.String&nbsp;ns,
572 java.lang.String&nbsp;name,
573 java.lang.Object&nbsp;value)</PRE>
574<DL>
575<DD>Sets a user property, which cannot be overwritten by
576 set/unset property calls. Any previous value is overwritten.
577<P>
578<DD><DL>
579<DT><B>Parameters:</B><DD><CODE>ns</CODE> - The namespace for the property (currently not used).<DD><CODE>name</CODE> - The name of property to set.
580 Must not be <code>null</code>.<DD><CODE>value</CODE> - The new value of the property.
581 Must not be <code>null</code>.</DL>
582</DD>
583</DL>
584<HR>
585
586<A NAME="setInheritedProperty(java.lang.String, java.lang.String, java.lang.Object)"><!-- --></A><H3>
587setInheritedProperty</H3>
588<PRE>
589public void <B>setInheritedProperty</B>(java.lang.String&nbsp;ns,
590 java.lang.String&nbsp;name,
591 java.lang.Object&nbsp;value)</PRE>
592<DL>
593<DD>Sets an inherited user property, which cannot be overwritten by set/unset
594 property calls. Any previous value is overwritten. Also marks
595 these properties as properties that have not come from the
596 command line.
597<P>
598<DD><DL>
599<DT><B>Parameters:</B><DD><CODE>ns</CODE> - The namespace for the property (currently not used).<DD><CODE>name</CODE> - The name of property to set.
600 Must not be <code>null</code>.<DD><CODE>value</CODE> - The new value of the property.
601 Must not be <code>null</code>.</DL>
602</DD>
603</DL>
604<HR>
605
606<A NAME="getProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>
607getProperty</H3>
608<PRE>
609public java.lang.Object <B>getProperty</B>(java.lang.String&nbsp;ns,
610 java.lang.String&nbsp;name)</PRE>
611<DL>
612<DD>Returns the value of a property, if it is set. You can override
613 this method in order to plug your own storage.
614<P>
615<DD><DL>
616<DT><B>Parameters:</B><DD><CODE>ns</CODE> - The namespace for the property (currently not used).<DD><CODE>name</CODE> - The name of the property.
617 May be <code>null</code>, in which case
618 the return value is also <code>null</code>.
619<DT><B>Returns:</B><DD>the property value, or <code>null</code> for no match
620 or if a <code>null</code> name is provided.</DL>
621</DD>
622</DL>
623<HR>
624
625<A NAME="getUserProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>
626getUserProperty</H3>
627<PRE>
628public java.lang.Object <B>getUserProperty</B>(java.lang.String&nbsp;ns,
629 java.lang.String&nbsp;name)</PRE>
630<DL>
631<DD>Returns the value of a user property, if it is set.
632<P>
633<DD><DL>
634<DT><B>Parameters:</B><DD><CODE>ns</CODE> - The namespace for the property (currently not used).<DD><CODE>name</CODE> - The name of the property.
635 May be <code>null</code>, in which case
636 the return value is also <code>null</code>.
637<DT><B>Returns:</B><DD>the property value, or <code>null</code> for no match
638 or if a <code>null</code> name is provided.</DL>
639</DD>
640</DL>
641<HR>
642
643<A NAME="getProperties()"><!-- --></A><H3>
644getProperties</H3>
645<PRE>
646public java.util.Hashtable <B>getProperties</B>()</PRE>
647<DL>
648<DD>Returns a copy of the properties table.
649<P>
650<DD><DL>
651
652<DT><B>Returns:</B><DD>a hashtable containing all properties
653 (including user properties).</DL>
654</DD>
655</DL>
656<HR>
657
658<A NAME="getUserProperties()"><!-- --></A><H3>
659getUserProperties</H3>
660<PRE>
661public java.util.Hashtable <B>getUserProperties</B>()</PRE>
662<DL>
663<DD>Returns a copy of the user property hashtable
664<P>
665<DD><DL>
666
667<DT><B>Returns:</B><DD>a hashtable containing just the user properties</DL>
668</DD>
669</DL>
670<HR>
671
672<A NAME="copyInheritedProperties(org.apache.tools.ant.Project)"><!-- --></A><H3>
673copyInheritedProperties</H3>
674<PRE>
675public void <B>copyInheritedProperties</B>(<A HREF="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;other)</PRE>
676<DL>
677<DD>Copies all user properties that have not been set on the
678 command line or a GUI tool from this instance to the Project
679 instance given as the argument.
680
681 <p>To copy all "user" properties, you will also have to call
682 <A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#copyUserProperties(org.apache.tools.ant.Project)"><CODE>copyUserProperties</CODE></A>.</p>
683<P>
684<DD><DL>
685<DT><B>Parameters:</B><DD><CODE>other</CODE> - the project to copy the properties to. Must not be null.<DT><B>Since:</B></DT>
686 <DD>Ant 1.6</DD>
687</DL>
688</DD>
689</DL>
690<HR>
691
692<A NAME="copyUserProperties(org.apache.tools.ant.Project)"><!-- --></A><H3>
693copyUserProperties</H3>
694<PRE>
695public void <B>copyUserProperties</B>(<A HREF="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;other)</PRE>
696<DL>
697<DD>Copies all user properties that have been set on the command
698 line or a GUI tool from this instance to the Project instance
699 given as the argument.
700
701 <p>To copy all "user" properties, you will also have to call
702 <A HREF="../../../../org/apache/tools/ant/PropertyHelper.html#copyInheritedProperties(org.apache.tools.ant.Project)"><CODE>copyInheritedProperties</CODE></A>.</p>
703<P>
704<DD><DL>
705<DT><B>Parameters:</B><DD><CODE>other</CODE> - the project to copy the properties to. Must not be null.<DT><B>Since:</B></DT>
706 <DD>Ant 1.6</DD>
707</DL>
708</DD>
709</DL>
710<!-- ========= END OF CLASS DATA ========= -->
711<HR>
712
713
714<!-- ======= START OF BOTTOM NAVBAR ====== -->
715<A NAME="navbar_bottom"><!-- --></A>
716<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
717<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
718<TR>
719<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
720<A NAME="navbar_bottom_firstrow"><!-- --></A>
721<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
722 <TR ALIGN="center" VALIGN="top">
723 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
724 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
725 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
726 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
727 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
728 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
729 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
730 </TR>
731</TABLE>
732</TD>
733<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
734</EM>
735</TD>
736</TR>
737
738<TR>
739<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
740&nbsp;<A HREF="../../../../org/apache/tools/ant/ProjectHelper.html" title="class in org.apache.tools.ant"><B>PREV CLASS</B></A>&nbsp;
741&nbsp;<A HREF="../../../../org/apache/tools/ant/RuntimeConfigurable.html" title="class in org.apache.tools.ant"><B>NEXT CLASS</B></A></FONT></TD>
742<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
743 <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
744&nbsp;<A HREF="PropertyHelper.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
745&nbsp;<SCRIPT type="text/javascript">
746 <!--
747 if(window==top) {
748 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
749 }
750 //-->
751</SCRIPT>
752<NOSCRIPT>
753 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
754</NOSCRIPT>
755
756</FONT></TD>
757</TR>
758<TR>
759<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
760 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
761<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
762DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
763</TR>
764</TABLE>
765<A NAME="skip-navbar_bottom"></A>
766<!-- ======== END OF BOTTOM NAVBAR ======= -->
767
768<HR>
769Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
770</BODY>
771</HTML>
Note: See TracBrowser for help on using the repository browser.