source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/build/javadocs/org/apache/tools/ant/util/ScriptRunner.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.4 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:35 NZST 2007 -->
6<TITLE>
7ScriptRunner (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.ant.util.ScriptRunner 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="ScriptRunner (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/util/ResourceUtils.html" title="class in org.apache.tools.ant.util"><B>PREV CLASS</B></A>&nbsp;
53&nbsp;<A HREF="../../../../../org/apache/tools/ant/util/SourceFileScanner.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> &nbsp;
56&nbsp;<A HREF="ScriptRunner.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.util</FONT>
85<BR>
86Class ScriptRunner</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.util.ScriptRunner</B>
90</PRE>
91<HR>
92<DL>
93<DT>public class <B>ScriptRunner</B><DT>extends java.lang.Object</DL>
94
95<P>
96This class is used to run BSF scripts
97<P>
98
99<P>
100<HR>
101
102<P>
103<!-- ======== NESTED CLASS SUMMARY ======== -->
104
105
106<!-- =========== FIELD SUMMARY =========== -->
107
108
109<!-- ======== CONSTRUCTOR SUMMARY ======== -->
110
111<A NAME="constructor_summary"><!-- --></A>
112<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
113<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
114<TD COLSPAN=2><FONT SIZE="+2">
115<B>Constructor Summary</B></FONT></TD>
116</TR>
117<TR BGCOLOR="white" CLASS="TableRowColor">
118<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ScriptRunner.html#ScriptRunner()">ScriptRunner</A></B>()</CODE>
119
120<BR>
121&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
122</TR>
123</TABLE>
124&nbsp;
125<!-- ========== METHOD SUMMARY =========== -->
126
127<A NAME="method_summary"><!-- --></A>
128<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
129<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
130<TD COLSPAN=2><FONT SIZE="+2">
131<B>Method Summary</B></FONT></TD>
132</TR>
133<TR BGCOLOR="white" CLASS="TableRowColor">
134<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
135<CODE>&nbsp;void</CODE></FONT></TD>
136<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ScriptRunner.html#addBean(java.lang.String, java.lang.Object)">addBean</A></B>(java.lang.String&nbsp;key,
137 java.lang.Object&nbsp;bean)</CODE>
138
139<BR>
140&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a single object into the script context.</TD>
141</TR>
142<TR BGCOLOR="white" CLASS="TableRowColor">
143<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
144<CODE>&nbsp;void</CODE></FONT></TD>
145<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ScriptRunner.html#addBeans(java.util.Map)">addBeans</A></B>(java.util.Map&nbsp;dictionary)</CODE>
146
147<BR>
148&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a list of named objects to the list to be exported to the script</TD>
149</TR>
150<TR BGCOLOR="white" CLASS="TableRowColor">
151<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
152<CODE>&nbsp;void</CODE></FONT></TD>
153<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ScriptRunner.html#addText(java.lang.String)">addText</A></B>(java.lang.String&nbsp;text)</CODE>
154
155<BR>
156&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the script text.</TD>
157</TR>
158<TR BGCOLOR="white" CLASS="TableRowColor">
159<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
160<CODE>&nbsp;void</CODE></FONT></TD>
161<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ScriptRunner.html#executeScript(java.lang.String)">executeScript</A></B>(java.lang.String&nbsp;execName)</CODE>
162
163<BR>
164&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do the work.</TD>
165</TR>
166<TR BGCOLOR="white" CLASS="TableRowColor">
167<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
168<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
169<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ScriptRunner.html#getLanguage()">getLanguage</A></B>()</CODE>
170
171<BR>
172&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the script language</TD>
173</TR>
174<TR BGCOLOR="white" CLASS="TableRowColor">
175<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176<CODE>&nbsp;void</CODE></FONT></TD>
177<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ScriptRunner.html#setLanguage(java.lang.String)">setLanguage</A></B>(java.lang.String&nbsp;language)</CODE>
178
179<BR>
180&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Defines the language (required).</TD>
181</TR>
182<TR BGCOLOR="white" CLASS="TableRowColor">
183<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
184<CODE>&nbsp;void</CODE></FONT></TD>
185<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/ScriptRunner.html#setSrc(java.io.File)">setSrc</A></B>(java.io.File&nbsp;file)</CODE>
186
187<BR>
188&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Load the script from an external file ; optional.</TD>
189</TR>
190</TABLE>
191&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
192<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
193<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
194<TD><B>Methods inherited from class java.lang.Object</B></TD>
195</TR>
196<TR BGCOLOR="white" CLASS="TableRowColor">
197<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
198</TR>
199</TABLE>
200&nbsp;
201<P>
202
203<!-- ============ FIELD DETAIL =========== -->
204
205
206<!-- ========= CONSTRUCTOR DETAIL ======== -->
207
208<A NAME="constructor_detail"><!-- --></A>
209<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
210<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
211<TD COLSPAN=1><FONT SIZE="+2">
212<B>Constructor Detail</B></FONT></TD>
213</TR>
214</TABLE>
215
216<A NAME="ScriptRunner()"><!-- --></A><H3>
217ScriptRunner</H3>
218<PRE>
219public <B>ScriptRunner</B>()</PRE>
220<DL>
221</DL>
222
223<!-- ============ METHOD DETAIL ========== -->
224
225<A NAME="method_detail"><!-- --></A>
226<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
227<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
228<TD COLSPAN=1><FONT SIZE="+2">
229<B>Method Detail</B></FONT></TD>
230</TR>
231</TABLE>
232
233<A NAME="addBeans(java.util.Map)"><!-- --></A><H3>
234addBeans</H3>
235<PRE>
236public void <B>addBeans</B>(java.util.Map&nbsp;dictionary)</PRE>
237<DL>
238<DD>Add a list of named objects to the list to be exported to the script
239<P>
240<DD><DL>
241<DT><B>Parameters:</B><DD><CODE>dictionary</CODE> - a map of objects to be placed into the script context
242 indexed by String names.</DL>
243</DD>
244</DL>
245<HR>
246
247<A NAME="addBean(java.lang.String, java.lang.Object)"><!-- --></A><H3>
248addBean</H3>
249<PRE>
250public void <B>addBean</B>(java.lang.String&nbsp;key,
251 java.lang.Object&nbsp;bean)</PRE>
252<DL>
253<DD>Add a single object into the script context.
254<P>
255<DD><DL>
256<DT><B>Parameters:</B><DD><CODE>key</CODE> - the name in the context this object is to stored under.<DD><CODE>bean</CODE> - the object to be stored in the script context.</DL>
257</DD>
258</DL>
259<HR>
260
261<A NAME="executeScript(java.lang.String)"><!-- --></A><H3>
262executeScript</H3>
263<PRE>
264public void <B>executeScript</B>(java.lang.String&nbsp;execName)
265 throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
266<DL>
267<DD>Do the work.
268<P>
269<DD><DL>
270<DT><B>Parameters:</B><DD><CODE>execName</CODE> - the name that will be passed to BSF for this script
271 execution.
272<DT><B>Throws:</B>
273<DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - if someting goes wrong exectuing the script.</DL>
274</DD>
275</DL>
276<HR>
277
278<A NAME="setLanguage(java.lang.String)"><!-- --></A><H3>
279setLanguage</H3>
280<PRE>
281public void <B>setLanguage</B>(java.lang.String&nbsp;language)</PRE>
282<DL>
283<DD>Defines the language (required).
284<P>
285<DD><DL>
286<DT><B>Parameters:</B><DD><CODE>language</CODE> - the scripting language name for the script.</DL>
287</DD>
288</DL>
289<HR>
290
291<A NAME="getLanguage()"><!-- --></A><H3>
292getLanguage</H3>
293<PRE>
294public java.lang.String <B>getLanguage</B>()</PRE>
295<DL>
296<DD>Get the script language
297<P>
298<DD><DL>
299
300<DT><B>Returns:</B><DD>the script language</DL>
301</DD>
302</DL>
303<HR>
304
305<A NAME="setSrc(java.io.File)"><!-- --></A><H3>
306setSrc</H3>
307<PRE>
308public void <B>setSrc</B>(java.io.File&nbsp;file)</PRE>
309<DL>
310<DD>Load the script from an external file ; optional.
311<P>
312<DD><DL>
313<DT><B>Parameters:</B><DD><CODE>file</CODE> - the file containing the script source.</DL>
314</DD>
315</DL>
316<HR>
317
318<A NAME="addText(java.lang.String)"><!-- --></A><H3>
319addText</H3>
320<PRE>
321public void <B>addText</B>(java.lang.String&nbsp;text)</PRE>
322<DL>
323<DD>Set the script text.
324<P>
325<DD><DL>
326<DT><B>Parameters:</B><DD><CODE>text</CODE> - a component of the script text to be added.</DL>
327</DD>
328</DL>
329<!-- ========= END OF CLASS DATA ========= -->
330<HR>
331
332
333<!-- ======= START OF BOTTOM NAVBAR ====== -->
334<A NAME="navbar_bottom"><!-- --></A>
335<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
336<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
337<TR>
338<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
339<A NAME="navbar_bottom_firstrow"><!-- --></A>
340<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
341 <TR ALIGN="center" VALIGN="top">
342 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
343 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
344 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
345 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
346 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
347 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
348 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
349 </TR>
350</TABLE>
351</TD>
352<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
353</EM>
354</TD>
355</TR>
356
357<TR>
358<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
359&nbsp;<A HREF="../../../../../org/apache/tools/ant/util/ResourceUtils.html" title="class in org.apache.tools.ant.util"><B>PREV CLASS</B></A>&nbsp;
360&nbsp;<A HREF="../../../../../org/apache/tools/ant/util/SourceFileScanner.html" title="class in org.apache.tools.ant.util"><B>NEXT CLASS</B></A></FONT></TD>
361<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
362 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
363&nbsp;<A HREF="ScriptRunner.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
364&nbsp;<SCRIPT type="text/javascript">
365 <!--
366 if(window==top) {
367 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
368 }
369 //-->
370</SCRIPT>
371<NOSCRIPT>
372 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
373</NOSCRIPT>
374
375</FONT></TD>
376</TR>
377<TR>
378<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
379 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
380<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
381DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
382</TR>
383</TABLE>
384<A NAME="skip-navbar_bottom"></A>
385<!-- ======== END OF BOTTOM NAVBAR ======= -->
386
387<HR>
388Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
389</BODY>
390</HTML>
Note: See TracBrowser for help on using the repository browser.