org.apache.tools.ant.module/3 3.47.1 2

org.apache.tools.ant.module.api.support
Class AntScriptUtils

java.lang.Object
  extended by org.apache.tools.ant.module.api.support.AntScriptUtils

public class AntScriptUtils
extends Object

Convenience utilities for working with Ant scripts.

Since:
org.apache.tools.ant.module/3 3.31

Method Summary
static AntProjectCookie antProjectCookieFor(FileObject script)
          Loads a file believed to be an Ant script.
static String getAntScriptName(FileObject script)
          Finds the name of an Ant script.
static List<String> getCallableTargetNames(FileObject script)
          Finds the names of callable targets in an Ant script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

antProjectCookieFor

public static AntProjectCookie antProjectCookieFor(FileObject script)
Loads a file believed to be an Ant script.

Parameters:
script - a file assumed to be an Ant script
Returns:
a handle for it (never null but may or may not be parsable)

getAntScriptName

public static String getAntScriptName(FileObject script)
Finds the name of an Ant script.

Parameters:
script - Ant script to inspect
Returns:
name of the Ant script as specified in the name attribute of the project element, or null if the file is not a valid Ant script or the script is anonymous

getCallableTargetNames

public static List<String> getCallableTargetNames(FileObject script)
                                           throws IOException
Finds the names of callable targets in an Ant script.

Parameters:
script - Ant script to inspect
Returns:
list of target names, sorted (by locale)
Throws:
IOException - if the script cannot be inspected

org.apache.tools.ant.module/3 3.47.1 2

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.