Java Doc for Project.java in  » Build » ANT » org » apache » tools » ant » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Build » ANT » org.apache.tools.ant 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tools.ant.Project

Project
public class Project implements ResourceFactory(Code)
Central representation of an Ant project. This class defines an Ant project with all of its targets, tasks and various other properties. It also provides the mechanism to kick off a build using a particular target name.

This class also encapsulates methods which allow files to be referred to using abstract path names which are translated to native system file paths at runtime.



Field Summary
final public static  StringJAVA_1_0
     Version constant for Java 1.0 .
final public static  StringJAVA_1_1
     Version constant for Java 1.1 .
final public static  StringJAVA_1_2
     Version constant for Java 1.2 .
final public static  StringJAVA_1_3
     Version constant for Java 1.3 .
final public static  StringJAVA_1_4
     Version constant for Java 1.4 .
final public static  intMSG_DEBUG
     Message priority of "debug".
final public static  intMSG_ERR
     Message priority of "error".
final public static  intMSG_INFO
     Message priority of "information".
final public static  intMSG_VERBOSE
     Message priority of "verbose".
final public static  intMSG_WARN
     Message priority of "warning".
final public static  StringTOKEN_END
     Default filter end token.
final public static  StringTOKEN_START
     Default filter start token.

Constructor Summary
public  Project()
     Create a new Ant project.

Method Summary
public synchronized  voidaddBuildListener(BuildListener listener)
     Add a build listener to the list.
public  voidaddDataTypeDefinition(String typeName, Class typeClass)
     Add a new datatype definition. Attempting to override an existing definition with an equivalent one (i.e.
public  voidaddFilter(String token, String value)
     Add a filter to the set of global filters.
public  voidaddIdReference(String id, Object value)
     Add an id reference.
public  voidaddOrReplaceTarget(Target target)
     Add a target to the project, or replaces one with the same name.
public  voidaddOrReplaceTarget(String targetName, Target target)
     Add a target to the project, or replaces one with the same name.
public  voidaddReference(String referenceName, Object value)
     Add a reference to the project.
Parameters:
  referenceName - The name of the reference.
public  voidaddTarget(Target target)
     Add a new target to the project.
public  voidaddTarget(String targetName, Target target)
     Add a new target to the project.
public  voidaddTaskDefinition(String taskName, Class taskClass)
     Add a new task definition to the project. Attempting to override an existing definition with an equivalent one (i.e.
public  voidcheckTaskClass(Class taskClass)
     Check whether or not a class is suitable for serving as Ant task. Ant task implementation classes must be public, concrete, and have a no-arg constructor.
Parameters:
  taskClass - The class to be checked.Must not be null.
exception:
  BuildException - if the class is unsuitable for being an Anttask.
public  voidcopyFile(String sourceFile, String destFile)
     Convenience method to copy a file from a source to a destination.
public  voidcopyFile(String sourceFile, String destFile, boolean filtering)
     Convenience method to copy a file from a source to a destination specifying if token filtering should be used.
public  voidcopyFile(String sourceFile, String destFile, boolean filtering, boolean overwrite)
     Convenience method to copy a file from a source to a destination specifying if token filtering should be used and if source files may overwrite newer destination files.
public  voidcopyFile(String sourceFile, String destFile, boolean filtering, boolean overwrite, boolean preserveLastModified)
     Convenience method to copy a file from a source to a destination specifying if token filtering should be used, if source files may overwrite newer destination files, and if the last modified time of the resulting file should be set to that of the source file.
public  voidcopyFile(File sourceFile, File destFile)
     Convenience method to copy a file from a source to a destination.
public  voidcopyFile(File sourceFile, File destFile, boolean filtering)
     Convenience method to copy a file from a source to a destination specifying if token filtering should be used.
public  voidcopyFile(File sourceFile, File destFile, boolean filtering, boolean overwrite)
     Convenience method to copy a file from a source to a destination specifying if token filtering should be used and if source files may overwrite newer destination files.
public  voidcopyFile(File sourceFile, File destFile, boolean filtering, boolean overwrite, boolean preserveLastModified)
     Convenience method to copy a file from a source to a destination specifying if token filtering should be used, if source files may overwrite newer destination files, and if the last modified time of the resulting file should be set to that of the source file.
public  voidcopyInheritedProperties(Project other)
     Copy all user properties that have not been set on the command line or a GUI tool from this instance to the Project instance given as the argument.

To copy all "user" properties, you will also have to call Project.copyUserProperties copyUserProperties .


Parameters:
  other - the project to copy the properties to.
public  voidcopyUserProperties(Project other)
     Copy all user properties that have been set on the command line or a GUI tool from this instance to the Project instance given as the argument.

To copy all "user" properties, you will also have to call Project.copyInheritedProperties copyInheritedProperties .


Parameters:
  other - the project to copy the properties to.
public  AntClassLoadercreateClassLoader(Path path)
     Factory method to create a class loader for loading classes from a given path.
Parameters:
  path - the path from which classes are to be loaded.
public  AntClassLoadercreateClassLoader(ClassLoader parent, Path path)
     Factory method to create a class loader for loading classes from a given path.
Parameters:
  parent - the parent classloader for the new loader.
Parameters:
  path - the path from which classes are to be loaded.
public  ObjectcreateDataType(String typeName)
     Create a new instance of a data type.
Parameters:
  typeName - The name of the data type to create an instance of.Must not be null.
public  ProjectcreateSubProject()
     Create and initialize a subproject.
public  TaskcreateTask(String taskType)
     Create a new instance of a task, adding it to a list of created tasks for later invalidation.
public  intdefaultInput(byte[] buffer, int offset, int length)
     Read data from the default input stream.
public  voiddemuxFlush(String output, boolean isError)
     Demultiplex flush operations so that each task receives the appropriate messages.
public  intdemuxInput(byte[] buffer, int offset, int length)
     Demux an input request to the correct task.
Parameters:
  buffer - the buffer into which data is to be read.
Parameters:
  offset - the offset into the buffer at which data is stored.
Parameters:
  length - the amount of data to read.
public  voiddemuxOutput(String output, boolean isWarning)
     Demultiplex output so that each task receives the appropriate messages.
public  voidexecuteSortedTargets(Vector sortedTargets)
     Execute a Vector of sorted targets.
public  voidexecuteTarget(String targetName)
     Execute the specified target and any targets it depends on.
public  voidexecuteTargets(Vector names)
     Execute the specified sequence of targets, and the targets they depend on.
public  voidfireBuildFinished(Throwable exception)
     Send a "build finished" event to the build listeners for this project.
Parameters:
  exception - an exception indicating a reason for a buildfailure.
public  voidfireBuildStarted()
     Send a "build started" event to the build listeners for this project.
protected  voidfireMessageLogged(Project project, String message, int priority)
     Send a "message logged" project level event to the build listeners for this project.
Parameters:
  project - The project generating the event.Should not be null.
Parameters:
  message - The message to send.
protected  voidfireMessageLogged(Project project, String message, Throwable throwable, int priority)
     Send a "message logged" project level event to the build listeners for this project.
Parameters:
  project - The project generating the event.Should not be null.
Parameters:
  message - The message to send.
protected  voidfireMessageLogged(Target target, String message, int priority)
     Send a "message logged" target level event to the build listeners for this project.
Parameters:
  target - The target generating the event.Must not be null.
Parameters:
  message - The message to send.
protected  voidfireMessageLogged(Target target, String message, Throwable throwable, int priority)
     Send a "message logged" target level event to the build listeners for this project.
Parameters:
  target - The target generating the event.Must not be null.
Parameters:
  message - The message to send.
protected  voidfireMessageLogged(Task task, String message, int priority)
     Send a "message logged" task level event to the build listeners for this project.
Parameters:
  task - The task generating the event.Must not be null.
Parameters:
  message - The message to send.
protected  voidfireMessageLogged(Task task, String message, Throwable throwable, int priority)
     Send a "message logged" task level event to the build listeners for this project.
Parameters:
  task - The task generating the event.Must not be null.
Parameters:
  message - The message to send.
public  voidfireSubBuildFinished(Throwable exception)
     Send a "subbuild finished" event to the build listeners for this project.
Parameters:
  exception - an exception indicating a reason for a buildfailure.
public  voidfireSubBuildStarted()
     Send a "subbuild started" event to the build listeners for this project.
protected  voidfireTargetFinished(Target target, Throwable exception)
     Send a "target finished" event to the build listeners for this project.
Parameters:
  target - The target which has finished building.Must not be null.
Parameters:
  exception - an exception indicating a reason for a buildfailure.
protected  voidfireTargetStarted(Target target)
     Send a "target started" event to the build listeners for this project.
protected  voidfireTaskFinished(Task task, Throwable exception)
     Send a "task finished" event to the build listeners for this project.
Parameters:
  task - The task which has finished executing.Must not be null.
Parameters:
  exception - an exception indicating a reason for a buildfailure.
protected  voidfireTaskStarted(Task task)
     Send a "task started" event to the build listeners for this project.
public  FilegetBaseDir()
     Return the base directory of the project as a file object.
public  VectorgetBuildListeners()
     Return a copy of the list of build listeners for the project.
public  ClassLoadergetCoreLoader()
     Return the core classloader to use for this project.
public  HashtablegetDataTypeDefinitions()
     Return the current datatype definition hashtable.
public  InputStreamgetDefaultInputStream()
     Get this project's input stream.
public  StringgetDefaultTarget()
     Return the name of the default target of the project.
public  StringgetDescription()
     Return the project description, if one has been set.
public  StringgetElementName(Object element)
     Return a description of the type of the given element, with special handling for instances of tasks and data types.

This is useful for logging purposes.
Parameters:
  element - The element to describe.Must not be null.

public  ExecutorgetExecutor()
     Get this Project's Executor (setting it if necessary).
public  HashtablegetFilters()
     Return a hashtable of global filters, mapping tokens to values.
public  FilterSetgetGlobalFilterSet()
     Return the set of global filters.
public  InputHandlergetInputHandler()
     Retrieve the current input handler.
public static  StringgetJavaVersion()
     Return the version of Java this class is running under. the version of Java as a String, e.g.
public  StringgetName()
     Return the project name, if one has been set.
public  HashtablegetProperties()
     Return a copy of the properties table.
public  StringgetProperty(String propertyName)
     Return the value of a property, if it is set.
Parameters:
  propertyName - The name of the property.May be null, in which casethe return value is also null.
public  ObjectgetReference(String key)
     Look up a reference by its key (ID).
Parameters:
  key - The key for the desired reference.Must not be null.
public  HashtablegetReferences()
     Return a map of the references in the project (String to Object).
public  ResourcegetResource(String name)
     Resolve the file relative to the project's basedir and return it as a FileResource.
Parameters:
  name - the name of the file to resolve.
public  HashtablegetTargets()
     Return the hashtable of targets.
public  HashtablegetTaskDefinitions()
     Return the current task definition hashtable.
public  TaskgetThreadTask(Thread thread)
     Get the current task associated with a thread, if any.
Parameters:
  thread - the thread for which the task is required.
public  HashtablegetUserProperties()
     Return a copy of the user property hashtable.
public  StringgetUserProperty(String propertyName)
     Return the value of a user property, if it is set.
Parameters:
  propertyName - The name of the property.May be null, in which casethe return value is also null.
public  voidinheritIDReferences(Project parent)
     Inherit the id references.
public  voidinit()
     Initialise the project.
public  voidinitProperties()
     Initializes the properties.
public  voidinitSubProject(Project subProject)
     Initialize a subproject.
public  booleanisKeepGoingMode()
     Return the keep-going mode.
public  voidlog(String message)
     Write a message to the log with the default log level of MSG_INFO .
Parameters:
  message - The text to log.
public  voidlog(String message, int msgLevel)
     Write a project level message to the log with the given log level.
Parameters:
  message - The text to log.
public  voidlog(String message, Throwable throwable, int msgLevel)
     Write a project level message to the log with the given log level.
Parameters:
  message - The text to log.
public  voidlog(Task task, String message, int msgLevel)
     Write a task level message to the log with the given log level.
Parameters:
  task - The task to use in the log.
public  voidlog(Task task, String message, Throwable throwable, int msgLevel)
     Write a task level message to the log with the given log level.
Parameters:
  task - The task to use in the log.
public  voidlog(Target target, String message, int msgLevel)
     Write a target level message to the log with the given log level.
Parameters:
  target - The target to use in the log.Must not be null.
Parameters:
  message - The text to log.
public  voidlog(Target target, String message, Throwable throwable, int msgLevel)
     Write a target level message to the log with the given log level.
Parameters:
  target - The target to use in the log.Must not be null.
Parameters:
  message - The text to log.
public synchronized  voidregisterThreadTask(Thread thread, Task task)
     Register a task as the current task for a thread.
public synchronized  voidremoveBuildListener(BuildListener listener)
     Remove a build listener from the list.
public  StringreplaceProperties(String value)
     Replace ${} style constructions in the given value with the string value of the corresponding data types.
Parameters:
  value - The string to be scanned for property references.May be null.
public  FileresolveFile(String fileName, File rootDir)
     Return the canonical form of a filename.

If the specified file name is relative it is resolved with respect to the given root directory.
Parameters:
  fileName - The name of the file to resolve.Must not be null.
Parameters:
  rootDir - The directory respective to which relative file namesare resolved.

public  FileresolveFile(String fileName)
     Return the canonical form of a filename.

If the specified file name is relative it is resolved with respect to the project's base directory.
Parameters:
  fileName - The name of the file to resolve.Must not be null.

public  voidsetBaseDir(File baseDir)
     Set the base directory for the project, checking that the given file exists and is a directory.
public  voidsetBasedir(String baseD)
     Set the base directory for the project, checking that the given filename exists and is a directory.
public  voidsetCoreLoader(ClassLoader coreLoader)
     Set the core classloader for the project.
public  voidsetDefault(String defaultTarget)
     Set the default target of the project.
public  voidsetDefaultInputStream(InputStream defaultInputStream)
     Set the default System input stream.
public  voidsetDefaultTarget(String defaultTarget)
     Set the default target of the project.
public  voidsetDescription(String description)
     Set the project description.
public  voidsetExecutor(Executor e)
     Set the Executor instance for this Project.
public  voidsetFileLastModified(File file, long time)
     Call File.setLastModified(long time) on Java above 1.1, and logs a warning on Java 1.1.
public  voidsetInheritedProperty(String name, String value)
     Set a user property, which cannot be overwritten by set/unset property calls.
public  voidsetInputHandler(InputHandler handler)
     Set the input handler.
public  voidsetJavaVersionProperty()
     Set the ant.java.version property and tests for unsupported JVM versions.
public  voidsetKeepGoingMode(boolean keepGoingMode)
     Set "keep-going" mode.
public  voidsetName(String name)
     Set the name of the project, also setting the user property ant.project.name.
public  voidsetNewProperty(String name, String value)
     Set a property if no value currently exists.
final public  voidsetProjectReference(Object obj)
     Set a reference to this Project on the parameterized object.
public  voidsetProperty(String name, String value)
     Set a property.
public  voidsetSystemProperties()
     Add all system properties which aren't already defined as user properties to the project properties.
public  voidsetUserProperty(String name, String value)
     Set a user property, which cannot be overwritten by set/unset property calls.
public static  booleantoBoolean(String s)
     Return the boolean equivalent of a string, which is considered true if either "on", "true", or "yes" is found, ignoring case.
Parameters:
  s - The string to convert to a boolean value.
final public  VectortopoSort(String root, Hashtable targetTable)
     Topologically sort a set of targets.
final public  VectortopoSort(String root, Hashtable targetTable, boolean returnAll)
     Topologically sort a set of targets.
final public  VectortopoSort(String[] root, Hashtable targetTable, boolean returnAll)
     Topologically sort a set of targets.
Parameters:
  root - String[] containing the names of the root targets.The sort is created in such a way that the ordered sequence ofTargets is the minimum possible such sequence to the specifiedroot targets.Must not be null.
Parameters:
  targetTable - A map of names to targets (String to Target).Must not be null.
Parameters:
  returnAll - boolean indicating whether to return alltargets, or the execution sequence only.
public static  StringtranslatePath(String toProcess)
     Translate a path into its native (platform specific) format.

This method uses PathTokenizer to separate the input path into its components.


Field Detail
JAVA_1_0
final public static String JAVA_1_0(Code)
Version constant for Java 1.0 . JavaEnvUtils.JAVA_1_0



JAVA_1_1
final public static String JAVA_1_1(Code)
Version constant for Java 1.1 . JavaEnvUtils.JAVA_1_1



JAVA_1_2
final public static String JAVA_1_2(Code)
Version constant for Java 1.2 . JavaEnvUtils.JAVA_1_2



JAVA_1_3
final public static String JAVA_1_3(Code)
Version constant for Java 1.3 . JavaEnvUtils.JAVA_1_3



JAVA_1_4
final public static String JAVA_1_4(Code)
Version constant for Java 1.4 . JavaEnvUtils.JAVA_1_4



MSG_DEBUG
final public static int MSG_DEBUG(Code)
Message priority of "debug".



MSG_ERR
final public static int MSG_ERR(Code)
Message priority of "error".



MSG_INFO
final public static int MSG_INFO(Code)
Message priority of "information".



MSG_VERBOSE
final public static int MSG_VERBOSE(Code)
Message priority of "verbose".



MSG_WARN
final public static int MSG_WARN(Code)
Message priority of "warning".



TOKEN_END
final public static String TOKEN_END(Code)
Default filter end token.



TOKEN_START
final public static String TOKEN_START(Code)
Default filter start token.




Constructor Detail
Project
public Project()(Code)
Create a new Ant project.




Method Detail
addBuildListener
public synchronized void addBuildListener(BuildListener listener)(Code)
Add a build listener to the list. This listener will be notified of build events for this project.
Parameters:
  listener - The listener to add to the list.Must not be null.



addDataTypeDefinition
public void addDataTypeDefinition(String typeName, Class typeClass)(Code)
Add a new datatype definition. Attempting to override an existing definition with an equivalent one (i.e. with the same classname) results in a verbose log message. Attempting to override an existing definition with a different one results in a warning log message, but the definition is changed.
Parameters:
  typeName - The name of the datatype.Must not be null.
Parameters:
  typeClass - The full name of the class implementing the datatype.Must not be null.



addFilter
public void addFilter(String token, String value)(Code)
Add a filter to the set of global filters.
Parameters:
  token - The token to filter.Must not be null.
Parameters:
  value - The replacement value.Must not be null.
See Also:   Project.getGlobalFilterSet()
See Also:   FilterSet.addFilter(StringString)



addIdReference
public void addIdReference(String id, Object value)(Code)
Add an id reference. Used for broken build files.
Parameters:
  id - the id to set.
Parameters:
  value - the value to set it to (Unknown element in this case.



addOrReplaceTarget
public void addOrReplaceTarget(Target target)(Code)
Add a target to the project, or replaces one with the same name.
Parameters:
  target - The target to be added or replaced in the project.Must not be null.



addOrReplaceTarget
public void addOrReplaceTarget(String targetName, Target target)(Code)
Add a target to the project, or replaces one with the same name.
Parameters:
  targetName - The name to use for the target.Must not be null.
Parameters:
  target - The target to be added or replaced in the project.Must not be null.



addReference
public void addReference(String referenceName, Object value)(Code)
Add a reference to the project.
Parameters:
  referenceName - The name of the reference. Must not be null.
Parameters:
  value - The value of the reference.



addTarget
public void addTarget(Target target) throws BuildException(Code)
Add a new target to the project.
Parameters:
  target - The target to be added to the project.Must not be null.
exception:
  BuildException - if the target already exists in the project
See Also:   Project.addOrReplaceTarget(Target)



addTarget
public void addTarget(String targetName, Target target) throws BuildException(Code)
Add a new target to the project.
Parameters:
  targetName - The name to use for the target.Must not be null.
Parameters:
  target - The target to be added to the project.Must not be null.
exception:
  BuildException - if the target already exists in the project.
See Also:   Project.addOrReplaceTarget(StringTarget)



addTaskDefinition
public void addTaskDefinition(String taskName, Class taskClass) throws BuildException(Code)
Add a new task definition to the project. Attempting to override an existing definition with an equivalent one (i.e. with the same classname) results in a verbose log message. Attempting to override an existing definition with a different one results in a warning log message and invalidates any tasks which have already been created with the old definition.
Parameters:
  taskName - The name of the task to add.Must not be null.
Parameters:
  taskClass - The full name of the class implementing the task.Must not be null.
exception:
  BuildException - if the class is unsuitable for being an Anttask. An error level message is logged beforethis exception is thrown.
See Also:   Project.checkTaskClass(Class)



checkTaskClass
public void checkTaskClass(Class taskClass) throws BuildException(Code)
Check whether or not a class is suitable for serving as Ant task. Ant task implementation classes must be public, concrete, and have a no-arg constructor.
Parameters:
  taskClass - The class to be checked.Must not be null.
exception:
  BuildException - if the class is unsuitable for being an Anttask. An error level message is logged beforethis exception is thrown.



copyFile
public void copyFile(String sourceFile, String destFile) throws IOException(Code)
Convenience method to copy a file from a source to a destination. No filtering is performed.
Parameters:
  sourceFile - Name of file to copy from.Must not be null.
Parameters:
  destFile - Name of file to copy to.Must not be null.
exception:
  IOException - if the copying fails.



copyFile
public void copyFile(String sourceFile, String destFile, boolean filtering) throws IOException(Code)
Convenience method to copy a file from a source to a destination specifying if token filtering should be used.
Parameters:
  sourceFile - Name of file to copy from.Must not be null.
Parameters:
  destFile - Name of file to copy to.Must not be null.
Parameters:
  filtering - Whether or not token filtering should be used duringthe copy.
exception:
  IOException - if the copying fails.



copyFile
public void copyFile(String sourceFile, String destFile, boolean filtering, boolean overwrite) throws IOException(Code)
Convenience method to copy a file from a source to a destination specifying if token filtering should be used and if source files may overwrite newer destination files.
Parameters:
  sourceFile - Name of file to copy from.Must not be null.
Parameters:
  destFile - Name of file to copy to.Must not be null.
Parameters:
  filtering - Whether or not token filtering should be used duringthe copy.
Parameters:
  overwrite - Whether or not the destination file should beoverwritten if it already exists.
exception:
  IOException - if the copying fails.



copyFile
public void copyFile(String sourceFile, String destFile, boolean filtering, boolean overwrite, boolean preserveLastModified) throws IOException(Code)
Convenience method to copy a file from a source to a destination specifying if token filtering should be used, if source files may overwrite newer destination files, and if the last modified time of the resulting file should be set to that of the source file.
Parameters:
  sourceFile - Name of file to copy from.Must not be null.
Parameters:
  destFile - Name of file to copy to.Must not be null.
Parameters:
  filtering - Whether or not token filtering should be used duringthe copy.
Parameters:
  overwrite - Whether or not the destination file should beoverwritten if it already exists.
Parameters:
  preserveLastModified - Whether or not the last modified time ofthe resulting file should be set to thatof the source file.
exception:
  IOException - if the copying fails.



copyFile
public void copyFile(File sourceFile, File destFile) throws IOException(Code)
Convenience method to copy a file from a source to a destination. No filtering is performed.
Parameters:
  sourceFile - File to copy from.Must not be null.
Parameters:
  destFile - File to copy to.Must not be null.
exception:
  IOException - if the copying fails.



copyFile
public void copyFile(File sourceFile, File destFile, boolean filtering) throws IOException(Code)
Convenience method to copy a file from a source to a destination specifying if token filtering should be used.
Parameters:
  sourceFile - File to copy from.Must not be null.
Parameters:
  destFile - File to copy to.Must not be null.
Parameters:
  filtering - Whether or not token filtering should be used duringthe copy.
exception:
  IOException - if the copying fails.



copyFile
public void copyFile(File sourceFile, File destFile, boolean filtering, boolean overwrite) throws IOException(Code)
Convenience method to copy a file from a source to a destination specifying if token filtering should be used and if source files may overwrite newer destination files.
Parameters:
  sourceFile - File to copy from.Must not be null.
Parameters:
  destFile - File to copy to.Must not be null.
Parameters:
  filtering - Whether or not token filtering should be used duringthe copy.
Parameters:
  overwrite - Whether or not the destination file should beoverwritten if it already exists.
exception:
  IOException - if the file cannot be copied.



copyFile
public void copyFile(File sourceFile, File destFile, boolean filtering, boolean overwrite, boolean preserveLastModified) throws IOException(Code)
Convenience method to copy a file from a source to a destination specifying if token filtering should be used, if source files may overwrite newer destination files, and if the last modified time of the resulting file should be set to that of the source file.
Parameters:
  sourceFile - File to copy from.Must not be null.
Parameters:
  destFile - File to copy to.Must not be null.
Parameters:
  filtering - Whether or not token filtering should be used duringthe copy.
Parameters:
  overwrite - Whether or not the destination file should beoverwritten if it already exists.
Parameters:
  preserveLastModified - Whether or not the last modified time ofthe resulting file should be set to thatof the source file.
exception:
  IOException - if the file cannot be copied.



copyInheritedProperties
public void copyInheritedProperties(Project other)(Code)
Copy all user properties that have not been set on the command line or a GUI tool from this instance to the Project instance given as the argument.

To copy all "user" properties, you will also have to call Project.copyUserProperties copyUserProperties .


Parameters:
  other - the project to copy the properties to. Must not be null.
since:
   Ant 1.5



copyUserProperties
public void copyUserProperties(Project other)(Code)
Copy all user properties that have been set on the command line or a GUI tool from this instance to the Project instance given as the argument.

To copy all "user" properties, you will also have to call Project.copyInheritedProperties copyInheritedProperties .


Parameters:
  other - the project to copy the properties to. Must not be null.
since:
   Ant 1.5



createClassLoader
public AntClassLoader createClassLoader(Path path)(Code)
Factory method to create a class loader for loading classes from a given path.
Parameters:
  path - the path from which classes are to be loaded. an appropriate classloader.



createClassLoader
public AntClassLoader createClassLoader(ClassLoader parent, Path path)(Code)
Factory method to create a class loader for loading classes from a given path.
Parameters:
  parent - the parent classloader for the new loader.
Parameters:
  path - the path from which classes are to be loaded. an appropriate classloader.



createDataType
public Object createDataType(String typeName) throws BuildException(Code)
Create a new instance of a data type.
Parameters:
  typeName - The name of the data type to create an instance of.Must not be null. an instance of the specified data type, or null ifthe data type name is not recognised.
exception:
  BuildException - if the data type name is recognised butinstance creation fails.



createSubProject
public Project createSubProject()(Code)
Create and initialize a subproject. By default the subproject will be of the same type as its parent. If a no-arg constructor is unavailable, the Project class will be used. a Project instance configured as a subproject of this Project.
since:
   Ant 1.7



createTask
public Task createTask(String taskType) throws BuildException(Code)
Create a new instance of a task, adding it to a list of created tasks for later invalidation. This causes all tasks to be remembered until the containing project is removed
Parameters:
  taskType - The name of the task to create an instance of.Must not be null. an instance of the specified task, or null ifthe task name is not recognised.
exception:
  BuildException - if the task name is recognised but taskcreation fails.



defaultInput
public int defaultInput(byte[] buffer, int offset, int length) throws IOException(Code)
Read data from the default input stream. If no default has been specified, System.in is used.
Parameters:
  buffer - the buffer into which data is to be read.
Parameters:
  offset - the offset into the buffer at which data is stored.
Parameters:
  length - the amount of data to read. the number of bytes read.
exception:
  IOException - if the data cannot be read.
since:
   Ant 1.6



demuxFlush
public void demuxFlush(String output, boolean isError)(Code)
Demultiplex flush operations so that each task receives the appropriate messages. If the current thread is not currently executing a task, the message is logged directly.
since:
   Ant 1.5.2
Parameters:
  output - Message to handle. Should not be null.
Parameters:
  isError - Whether the text represents an error (true)or information (false).



demuxInput
public int demuxInput(byte[] buffer, int offset, int length) throws IOException(Code)
Demux an input request to the correct task.
Parameters:
  buffer - the buffer into which data is to be read.
Parameters:
  offset - the offset into the buffer at which data is stored.
Parameters:
  length - the amount of data to read. the number of bytes read.
exception:
  IOException - if the data cannot be read.
since:
   Ant 1.6



demuxOutput
public void demuxOutput(String output, boolean isWarning)(Code)
Demultiplex output so that each task receives the appropriate messages. If the current thread is not currently executing a task, the message is logged directly.
Parameters:
  output - Message to handle. Should not be null.
Parameters:
  isWarning - Whether the text represents an warning (true)or information (false).



executeSortedTargets
public void executeSortedTargets(Vector sortedTargets) throws BuildException(Code)
Execute a Vector of sorted targets.
Parameters:
  sortedTargets - the aforementioned Vector.
throws:
  BuildException - on error.



executeTarget
public void executeTarget(String targetName) throws BuildException(Code)
Execute the specified target and any targets it depends on.
Parameters:
  targetName - The name of the target to execute.Must not be null.
exception:
  BuildException - if the build failed.



executeTargets
public void executeTargets(Vector names) throws BuildException(Code)
Execute the specified sequence of targets, and the targets they depend on.
Parameters:
  names - A vector of target name strings to execute.Must not be null.
exception:
  BuildException - if the build failed.



fireBuildFinished
public void fireBuildFinished(Throwable exception)(Code)
Send a "build finished" event to the build listeners for this project.
Parameters:
  exception - an exception indicating a reason for a buildfailure. May be null, indicatinga successful build.



fireBuildStarted
public void fireBuildStarted()(Code)
Send a "build started" event to the build listeners for this project.



fireMessageLogged
protected void fireMessageLogged(Project project, String message, int priority)(Code)
Send a "message logged" project level event to the build listeners for this project.
Parameters:
  project - The project generating the event.Should not be null.
Parameters:
  message - The message to send. Should not be null.
Parameters:
  priority - The priority of the message.



fireMessageLogged
protected void fireMessageLogged(Project project, String message, Throwable throwable, int priority)(Code)
Send a "message logged" project level event to the build listeners for this project.
Parameters:
  project - The project generating the event.Should not be null.
Parameters:
  message - The message to send. Should not be null.
Parameters:
  throwable - The exception that caused this message. May be null.
Parameters:
  priority - The priority of the message.
since:
   1.7



fireMessageLogged
protected void fireMessageLogged(Target target, String message, int priority)(Code)
Send a "message logged" target level event to the build listeners for this project.
Parameters:
  target - The target generating the event.Must not be null.
Parameters:
  message - The message to send. Should not be null.
Parameters:
  priority - The priority of the message.



fireMessageLogged
protected void fireMessageLogged(Target target, String message, Throwable throwable, int priority)(Code)
Send a "message logged" target level event to the build listeners for this project.
Parameters:
  target - The target generating the event.Must not be null.
Parameters:
  message - The message to send. Should not be null.
Parameters:
  throwable - The exception that caused this message. May be null.
Parameters:
  priority - The priority of the message.
since:
   1.7



fireMessageLogged
protected void fireMessageLogged(Task task, String message, int priority)(Code)
Send a "message logged" task level event to the build listeners for this project.
Parameters:
  task - The task generating the event.Must not be null.
Parameters:
  message - The message to send. Should not be null.
Parameters:
  priority - The priority of the message.



fireMessageLogged
protected void fireMessageLogged(Task task, String message, Throwable throwable, int priority)(Code)
Send a "message logged" task level event to the build listeners for this project.
Parameters:
  task - The task generating the event.Must not be null.
Parameters:
  message - The message to send. Should not be null.
Parameters:
  throwable - The exception that caused this message. May be null.
Parameters:
  priority - The priority of the message.
since:
   1.7



fireSubBuildFinished
public void fireSubBuildFinished(Throwable exception)(Code)
Send a "subbuild finished" event to the build listeners for this project.
Parameters:
  exception - an exception indicating a reason for a buildfailure. May be null, indicatinga successful build.
since:
   Ant 1.6.2



fireSubBuildStarted
public void fireSubBuildStarted()(Code)
Send a "subbuild started" event to the build listeners for this project.
since:
   Ant 1.6.2



fireTargetFinished
protected void fireTargetFinished(Target target, Throwable exception)(Code)
Send a "target finished" event to the build listeners for this project.
Parameters:
  target - The target which has finished building.Must not be null.
Parameters:
  exception - an exception indicating a reason for a buildfailure. May be null, indicatinga successful build.



fireTargetStarted
protected void fireTargetStarted(Target target)(Code)
Send a "target started" event to the build listeners for this project.
Parameters:
  target - The target which is starting to build.Must not be null.



fireTaskFinished
protected void fireTaskFinished(Task task, Throwable exception)(Code)
Send a "task finished" event to the build listeners for this project.
Parameters:
  task - The task which has finished executing.Must not be null.
Parameters:
  exception - an exception indicating a reason for a buildfailure. May be null, indicatinga successful build.



fireTaskStarted
protected void fireTaskStarted(Task task)(Code)
Send a "task started" event to the build listeners for this project.
Parameters:
  task - The target which is starting to execute.Must not be null.



getBaseDir
public File getBaseDir()(Code)
Return the base directory of the project as a file object. the project base directory, or null if thebase directory has not been successfully set to a valid value.



getBuildListeners
public Vector getBuildListeners()(Code)
Return a copy of the list of build listeners for the project. a list of build listeners for the project



getCoreLoader
public ClassLoader getCoreLoader()(Code)
Return the core classloader to use for this project. This may be null, indicating that the parent classloader should be used. the core classloader to use for this project.



getDataTypeDefinitions
public Hashtable getDataTypeDefinitions()(Code)
Return the current datatype definition hashtable. The returned hashtable is "live" and so should not be modified. a map of from datatype name to implementing class(String to Class).



getDefaultInputStream
public InputStream getDefaultInputStream()(Code)
Get this project's input stream. the InputStream instance in use by this Project instance toread input.



getDefaultTarget
public String getDefaultTarget()(Code)
Return the name of the default target of the project. name of the default target ornull if no default has been set.



getDescription
public String getDescription()(Code)
Return the project description, if one has been set. the project description, or null if it hasn'tbeen set.



getElementName
public String getElementName(Object element)(Code)
Return a description of the type of the given element, with special handling for instances of tasks and data types.

This is useful for logging purposes.
Parameters:
  element - The element to describe.Must not be null. a description of the element type.
since:
   1.95, Ant 1.5




getExecutor
public Executor getExecutor()(Code)
Get this Project's Executor (setting it if necessary). an Executor instance.



getFilters
public Hashtable getFilters()(Code)
Return a hashtable of global filters, mapping tokens to values. a hashtable of global filters, mapping tokens to values(String to String).
See Also:   Project.getGlobalFilterSet()
See Also:   FilterSet.getFilterHash



getGlobalFilterSet
public FilterSet getGlobalFilterSet()(Code)
Return the set of global filters. the set of global filters.



getInputHandler
public InputHandler getInputHandler()(Code)
Retrieve the current input handler. the InputHandler instance currently in place for the projectinstance.



getJavaVersion
public static String getJavaVersion()(Code)
Return the version of Java this class is running under. the version of Java as a String, e.g. "1.1" .
See Also:   org.apache.tools.ant.util.JavaEnvUtils.getJavaVersion



getName
public String getName()(Code)
Return the project name, if one has been set. the project name, or null if it hasn't been set.



getProperties
public Hashtable getProperties()(Code)
Return a copy of the properties table. a hashtable containing all properties(including user properties).



getProperty
public String getProperty(String propertyName)(Code)
Return the value of a property, if it is set.
Parameters:
  propertyName - The name of the property.May be null, in which casethe return value is also null. the property value, or null for no matchor if a null name is provided.



getReference
public Object getReference(String key)(Code)
Look up a reference by its key (ID).
Parameters:
  key - The key for the desired reference.Must not be null. the reference with the specified ID, or null ifthere is no such reference in the project.



getReferences
public Hashtable getReferences()(Code)
Return a map of the references in the project (String to Object). The returned hashtable is "live" and so must not be modified. a map of the references in the project (String to Object).



getResource
public Resource getResource(String name)(Code)
Resolve the file relative to the project's basedir and return it as a FileResource.
Parameters:
  name - the name of the file to resolve. the file resource.
since:
   Ant 1.7



getTargets
public Hashtable getTargets()(Code)
Return the hashtable of targets. The returned hashtable is "live" and so should not be modified. a map from name to target (String to Target).



getTaskDefinitions
public Hashtable getTaskDefinitions()(Code)
Return the current task definition hashtable. The returned hashtable is "live" and so should not be modified. a map of from task name to implementing class(String to Class).



getThreadTask
public Task getThreadTask(Thread thread)(Code)
Get the current task associated with a thread, if any.
Parameters:
  thread - the thread for which the task is required. the task which is currently registered for the given thread ornull if no task is registered.



getUserProperties
public Hashtable getUserProperties()(Code)
Return a copy of the user property hashtable. a hashtable containing just the user properties.



getUserProperty
public String getUserProperty(String propertyName)(Code)
Return the value of a user property, if it is set.
Parameters:
  propertyName - The name of the property.May be null, in which casethe return value is also null. the property value, or null for no matchor if a null name is provided.



inheritIDReferences
public void inheritIDReferences(Project parent)(Code)
Inherit the id references.
Parameters:
  parent - the parent project of this project.



init
public void init() throws BuildException(Code)
Initialise the project. This involves setting the default task definitions and loading the system properties.
exception:
  BuildException - if the default task list cannot be loaded.



initProperties
public void initProperties() throws BuildException(Code)
Initializes the properties.
exception:
  BuildException - if an vital property could not be set.
since:
   Ant 1.7



initSubProject
public void initSubProject(Project subProject)(Code)
Initialize a subproject.
Parameters:
  subProject - the subproject to initialize.



isKeepGoingMode
public boolean isKeepGoingMode()(Code)
Return the keep-going mode. If the keepGoing settor/getter methods are used in conjunction with the ant.executor.class property, they will have no effect. "keep-going" mode
since:
   Ant 1.6



log
public void log(String message)(Code)
Write a message to the log with the default log level of MSG_INFO .
Parameters:
  message - The text to log. Should not be null.



log
public void log(String message, int msgLevel)(Code)
Write a project level message to the log with the given log level.
Parameters:
  message - The text to log. Should not be null.
Parameters:
  msgLevel - The log priority level to use.



log
public void log(String message, Throwable throwable, int msgLevel)(Code)
Write a project level message to the log with the given log level.
Parameters:
  message - The text to log. Should not be null.
Parameters:
  throwable - The exception causing this log, may be null.
Parameters:
  msgLevel - The log priority level to use.
since:
   1.7



log
public void log(Task task, String message, int msgLevel)(Code)
Write a task level message to the log with the given log level.
Parameters:
  task - The task to use in the log. Must not be null.
Parameters:
  message - The text to log. Should not be null.
Parameters:
  msgLevel - The log priority level to use.



log
public void log(Task task, String message, Throwable throwable, int msgLevel)(Code)
Write a task level message to the log with the given log level.
Parameters:
  task - The task to use in the log. Must not be null.
Parameters:
  message - The text to log. Should not be null.
Parameters:
  throwable - The exception causing this log, may be null.
Parameters:
  msgLevel - The log priority level to use.
since:
   1.7



log
public void log(Target target, String message, int msgLevel)(Code)
Write a target level message to the log with the given log level.
Parameters:
  target - The target to use in the log.Must not be null.
Parameters:
  message - The text to log. Should not be null.
Parameters:
  msgLevel - The log priority level to use.



log
public void log(Target target, String message, Throwable throwable, int msgLevel)(Code)
Write a target level message to the log with the given log level.
Parameters:
  target - The target to use in the log.Must not be null.
Parameters:
  message - The text to log. Should not be null.
Parameters:
  throwable - The exception causing this log, may be null.
Parameters:
  msgLevel - The log priority level to use.
since:
   1.7



registerThreadTask
public synchronized void registerThreadTask(Thread thread, Task task)(Code)
Register a task as the current task for a thread. If the task is null, the thread's entry is removed.
Parameters:
  thread - the thread on which the task is registered.
Parameters:
  task - the task to be registered.
since:
   Ant 1.5



removeBuildListener
public synchronized void removeBuildListener(BuildListener listener)(Code)
Remove a build listener from the list. This listener will no longer be notified of build events for this project.
Parameters:
  listener - The listener to remove from the list.Should not be null.



replaceProperties
public String replaceProperties(String value) throws BuildException(Code)
Replace ${} style constructions in the given value with the string value of the corresponding data types.
Parameters:
  value - The string to be scanned for property references.May be null. the given string with embedded property names replacedby values, or null if the given string isnull.
exception:
  BuildException - if the given value has an unclosedproperty name, e.g. ${xxx.



resolveFile
public File resolveFile(String fileName, File rootDir)(Code)
Return the canonical form of a filename.

If the specified file name is relative it is resolved with respect to the given root directory.
Parameters:
  fileName - The name of the file to resolve.Must not be null.
Parameters:
  rootDir - The directory respective to which relative file namesare resolved. May be null, in which casethe current directory is used. the resolved File.




resolveFile
public File resolveFile(String fileName)(Code)
Return the canonical form of a filename.

If the specified file name is relative it is resolved with respect to the project's base directory.
Parameters:
  fileName - The name of the file to resolve.Must not be null. the resolved File.




setBaseDir
public void setBaseDir(File baseDir) throws BuildException(Code)
Set the base directory for the project, checking that the given file exists and is a directory.
Parameters:
  baseDir - The project base directory.Must not be null.
exception:
  BuildException - if the specified file doesn't exist orisn't a directory.



setBasedir
public void setBasedir(String baseD) throws BuildException(Code)
Set the base directory for the project, checking that the given filename exists and is a directory.
Parameters:
  baseD - The project base directory.Must not be null.
exception:
  BuildException - if the directory if invalid.



setCoreLoader
public void setCoreLoader(ClassLoader coreLoader)(Code)
Set the core classloader for the project. If a null classloader is specified, the parent classloader should be used.
Parameters:
  coreLoader - The classloader to use for the project.May be null.



setDefault
public void setDefault(String defaultTarget)(Code)
Set the default target of the project.
Parameters:
  defaultTarget - The name of the default target for this project.May be null, indicating that there isno default target.



setDefaultInputStream
public void setDefaultInputStream(InputStream defaultInputStream)(Code)
Set the default System input stream. Normally this stream is set to System.in. This inputStream is used when no task input redirection is being performed.
Parameters:
  defaultInputStream - the default input stream to use when inputis requested.
since:
   Ant 1.6



setDefaultTarget
public void setDefaultTarget(String defaultTarget)(Code)
Set the default target of the project.
Parameters:
  defaultTarget - The name of the default target for this project.May be null, indicating that there isno default target.
See Also:   Project.setDefault(String)



setDescription
public void setDescription(String description)(Code)
Set the project description.
Parameters:
  description - The description of the project.May be null.



setExecutor
public void setExecutor(Executor e)(Code)
Set the Executor instance for this Project.
Parameters:
  e - the Executor to use.



setFileLastModified
public void setFileLastModified(File file, long time) throws BuildException(Code)
Call File.setLastModified(long time) on Java above 1.1, and logs a warning on Java 1.1.
Parameters:
  file - The file to set the last modified time on.Must not be null.
Parameters:
  time - the required modification time.
exception:
  BuildException - if the last modified time cannot be setdespite running on a platform with a versionabove 1.1.



setInheritedProperty
public void setInheritedProperty(String name, String value)(Code)
Set a user property, which cannot be overwritten by set/unset property calls. Any previous value is overwritten. Also marks these properties as properties that have not come from the command line.
Parameters:
  name - The name of property to set.Must not be null.
Parameters:
  value - The new value of the property.Must not be null.
See Also:   Project.setProperty(String,String)



setInputHandler
public void setInputHandler(InputHandler handler)(Code)
Set the input handler.
Parameters:
  handler - the InputHandler instance to use for gathering input.



setJavaVersionProperty
public void setJavaVersionProperty() throws BuildException(Code)
Set the ant.java.version property and tests for unsupported JVM versions. If the version is supported, verbose log messages are generated to record the Java version and operating system name.
exception:
  BuildException - if this Java version is not supported.
See Also:   org.apache.tools.ant.util.JavaEnvUtils.getJavaVersion



setKeepGoingMode
public void setKeepGoingMode(boolean keepGoingMode)(Code)
Set "keep-going" mode. In this mode Ant will try to execute as many targets as possible. All targets that do not depend on failed target(s) will be executed. If the keepGoing settor/getter methods are used in conjunction with the ant.executor.class property, they will have no effect.
Parameters:
  keepGoingMode - "keep-going" mode
since:
   Ant 1.6



setName
public void setName(String name)(Code)
Set the name of the project, also setting the user property ant.project.name.
Parameters:
  name - The name of the project.Must not be null.



setNewProperty
public void setNewProperty(String name, String value)(Code)
Set a property if no value currently exists. If the property exists already, a message is logged and the method returns with no other effect.
Parameters:
  name - The name of property to set.Must not be null.
Parameters:
  value - The new value of the property.Must not be null.
since:
   1.5



setProjectReference
final public void setProjectReference(Object obj)(Code)
Set a reference to this Project on the parameterized object. Need to set the project before other set/add elements are called.
Parameters:
  obj - the object to invoke setProject(this) on.



setProperty
public void setProperty(String name, String value)(Code)
Set a property. Any existing property of the same name is overwritten, unless it is a user property.
Parameters:
  name - The name of property to set.Must not be null.
Parameters:
  value - The new value of the property.Must not be null.



setSystemProperties
public void setSystemProperties()(Code)
Add all system properties which aren't already defined as user properties to the project properties.



setUserProperty
public void setUserProperty(String name, String value)(Code)
Set a user property, which cannot be overwritten by set/unset property calls. Any previous value is overwritten.
Parameters:
  name - The name of property to set.Must not be null.
Parameters:
  value - The new value of the property.Must not be null.
See Also:   Project.setProperty(String,String)



toBoolean
public static boolean toBoolean(String s)(Code)
Return the boolean equivalent of a string, which is considered true if either "on", "true", or "yes" is found, ignoring case.
Parameters:
  s - The string to convert to a boolean value. true if the given string is "on","true" or "yes", orfalse otherwise.



topoSort
final public Vector topoSort(String root, Hashtable targetTable) throws BuildException(Code)
Topologically sort a set of targets. Equivalent to calling topoSort(new String[] {root}, targets, true).
Parameters:
  root - The name of the root target. The sort is created in sucha way that the sequence of Targets up to the roottarget is the minimum possible such sequence.Must not be null.
Parameters:
  targetTable - A Hashtable mapping names to Targets.Must not be null. a Vector of ALL Target objects in sorted order.
exception:
  BuildException - if there is a cyclic dependency among thetargets, or if a named target does not exist.



topoSort
final public Vector topoSort(String root, Hashtable targetTable, boolean returnAll) throws BuildException(Code)
Topologically sort a set of targets. Equivalent to calling topoSort(new String[] {root}, targets, returnAll).
Parameters:
  root - The name of the root target. The sort is created in sucha way that the sequence of Targets up to the roottarget is the minimum possible such sequence.Must not be null.
Parameters:
  targetTable - A Hashtable mapping names to Targets.Must not be null.
Parameters:
  returnAll - boolean indicating whether to return alltargets, or the execution sequence only. a Vector of Target objects in sorted order.
exception:
  BuildException - if there is a cyclic dependency among thetargets, or if a named target does not exist.
since:
   Ant 1.6.3



topoSort
final public Vector topoSort(String[] root, Hashtable targetTable, boolean returnAll) throws BuildException(Code)
Topologically sort a set of targets.
Parameters:
  root - String[] containing the names of the root targets.The sort is created in such a way that the ordered sequence ofTargets is the minimum possible such sequence to the specifiedroot targets.Must not be null.
Parameters:
  targetTable - A map of names to targets (String to Target).Must not be null.
Parameters:
  returnAll - boolean indicating whether to return alltargets, or the execution sequence only. a Vector of Target objects in sorted order.
exception:
  BuildException - if there is a cyclic dependency among thetargets, or if a named target does not exist.
since:
   Ant 1.6.3



translatePath
public static String translatePath(String toProcess)(Code)
Translate a path into its native (platform specific) format.

This method uses PathTokenizer to separate the input path into its components. This handles DOS style paths in a relatively sensible way. The file separators are then converted to their platform specific versions.
Parameters:
  toProcess - The path to be translated.May be null. the native version of the specified path oran empty string if the path is null or empty.
See Also:   PathTokenizer




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.