KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > build > IAntScript


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - Initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.build;
12
13 import java.util.Map JavaDoc;
14
15 /**
16  * Interface providing helper methods to produce Ant scripts.
17  * <p>
18  * It contains convenience methods for creating the XML elements
19  * required for Ant scripts. See the <a HREF="http://ant.apache.org">Ant</a>
20  * website for more details on Ant scripts and the particular Ant tasks.
21  * </p>
22  * <p>
23  * This interface is not intended to be implemented by clients.
24  * </p>
25  */

26 public interface IAntScript {
27
28     /**
29      * Print the given string to the Ant script.
30      *
31      * @param string the string to print.
32      */

33     public void print(String JavaDoc string);
34
35     /**
36      * Print the given comment to the Ant script folled by a carriage-return.
37      *
38      * @param comment the comment to print.
39      */

40     public void printComment(String JavaDoc comment);
41
42     /**
43      * Print the given string followed by a carriage-return.
44      *
45      * @param string the string to print.
46      */

47     public void println(String JavaDoc string);
48
49     /**
50      * Print a empty line.
51      */

52     public void println();
53     
54     /**
55      * Print an ant call task as defined by <a HREF="http://ant.apache.org/manual/CoreTasks/antcall.html">AntCall</a>}.
56      * @param target the target executed by the call. This value can not be <code>null</code>.
57      * @param inheritAll If true, pass all properties to the new Ant project.
58      * @param params Specifies as key / value pairs, the properties to set before running the specified target. This value can be <code>null</code>
59      */

60     public void printAntCallTask(String JavaDoc target, boolean inheritAll, Map JavaDoc params);
61     
62     /**
63      * Print an XML attribute. <code>name=value</code>.
64      * @param name the name of the attribute to print. This value can not be <code>null</code>.
65      * @param value the name of the value to print. This value can be <code>null</code>.
66      * @param mandatory indicate whether or not the value is mandatory.
67      * If the <code>value</code> is <code>null</code> and the attribute is mandatory, the printed value will be "".
68      */

69     public void printAttribute(String JavaDoc name, String JavaDoc value, boolean mandatory);
70     
71     /**
72      * Print tagName as an xml begin tag (<code>&lt;tagName&gt;<code>).
73      * @param tagName the tag to print.
74      */

75     public void printStartTag(String JavaDoc tagName);
76     
77     /**
78      * Print tagName as an xml end tag (<code>&lt;/tagName&gt;<code>).
79      * @param endTag the tag to print.
80      */

81     public void printEndTag(String JavaDoc endTag);
82     
83     /**
84      * Print as many tabs as current nesting level requires
85      */

86     public void printTabs();
87     
88     /**
89      * Print a target declaration. See <a HREF="http://ant.apache.org/manual/using.html#targets">Ant's targets</a>.
90      * @param name the name of the target. This value can not be <code>null</code>.
91      * @param depends a comma-separated list of names of targets on which this target depends. This value can be <code>null</code>.
92      * @param ifClause the name of the property that must be set in order for this target to execute. This value can be <code>null</code>
93      * @param unlessClause the name of the property that must not be set in order for this target to execute. This value can be <code>null</code>
94      * @param description a short description of this target's function. This value can be <code>null</code>
95      */

96     public void printTargetDeclaration(String JavaDoc name, String JavaDoc depends, String JavaDoc ifClause, String JavaDoc unlessClause, String JavaDoc description);
97     
98     /**
99      * Print the end tag for a target declaration.
100      */

101     public void printTargetEnd();
102 }
103
Popular Tags