KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tools > ant > module > bridge > BridgeInterface


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.apache.tools.ant.module.bridge;
21
22 import java.io.File JavaDoc;
23 import java.io.InputStream JavaDoc;
24 import java.util.List JavaDoc;
25 import java.util.Map JavaDoc;
26 import org.netbeans.api.progress.ProgressHandle;
27 import org.openide.windows.OutputWriter;
28
29 /**
30  * What is implemented by bridge.jar.
31  * @author Jesse Glick
32  */

33 public interface BridgeInterface {
34
35     /**
36      * Actually run a build script.
37      * @param buildFile an Ant build script
38      * @param targets a list of target names to run, or null to run the default target
39      * @param in an input stream for console input
40      * @param out an output stream with the ability to have hyperlinks
41      * @param err an error stream with the ability to have hyperlinks
42      * @param properties any Ant properties to define
43      * @param verbosity the intended logging level
44      * @param displayName a user-presentable name for the session
45      * @param interestingOutputCallback will be called if and when some interesting output appears, or input is requested
46      * @param handle a progress handle to update if appropriate (switch to sleeping and back to indeterminate)
47      * @return true if the build succeeded, false if it failed for any reason
48      */

49     boolean run(File JavaDoc buildFile, List JavaDoc<String JavaDoc> targets, InputStream JavaDoc in, OutputWriter out, OutputWriter err, Map JavaDoc<String JavaDoc,String JavaDoc> properties, int verbosity, String JavaDoc displayName, Runnable JavaDoc interestingOutputCallback, ProgressHandle handle);
50     
51     /**
52      * Try to stop a running build.
53      * The implementation may wait for a while to stop at a safe point,
54      * and/or stop forcibly.
55      * @param process the thread which is currently running the build (in which {@link #run} was invoked)
56      */

57     void stop(Thread JavaDoc process);
58     
59     /**
60      * Get some informational value of the Ant version.
61      * @return the version
62      */

63     String JavaDoc getAntVersion();
64     
65     /**
66      * Check whether Ant 1.6 is loaded.
67      * If so, additional abilities may be possible, such as namespace support.
68      */

69     boolean isAnt16();
70     
71     /**
72      * Get a proxy for IntrospectionHelper, to introspect task + type structure.
73      */

74     IntrospectionHelperProxy getIntrospectionHelper(Class JavaDoc clazz);
75     
76     /**
77      * See Project.toBoolean.
78      */

79     boolean toBoolean(String JavaDoc val);
80     
81     /**
82      * Get values of an enumeration class.
83      * If it is not actually an enumeration class, return null.
84      */

85     String JavaDoc[] getEnumeratedValues(Class JavaDoc c);
86     
87 }
88
Popular Tags