Top Description Inners Fields Constructors Methods
org.apache.tools.ant

public Class Project

extends Object
implements ResourceFactory
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.types.ResourceFactory
Imports
java.io.EOFException, .File, .IOException, .InputStream, java.lang.reflect.Method, .Modifier, java.util.Arrays, .Collections, .HashMap, .HashSet, .Hashtable, .Map, .Optional, .Properties, .Set, .Stack, .Vector, .WeakHashMap, java.util.stream.Collectors, org.apache.tools.ant.helper.DefaultExecutor, org.apache.tools.ant.input.DefaultInputHandler, .InputHandler, org.apache.tools.ant.launch.Locator, org.apache.tools.ant.types.Description, .FilterSet, .FilterSetCollection, .Path, .Resource, .ResourceFactory, org.apache.tools.ant.types.resources.FileResource, org.apache.tools.ant.util.FileUtils, .JavaEnvUtils, .VectorSet

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private File
baseDir

Project base directory.

private ClassLoader
coreLoader

The Ant core classloader--may be null if using parent classloader.

private InputStream
defaultInputStream

The default input stream used to read any input.

private String
defaultTarget

Name of the project's default target.

private String
description

Description for this project (if any).

private static final FileUtils
FILE_UTILS

Instance of a utility class to use for file operations.

private final FilterSetCollection
globalFilters

Wrapper around globalFilterSet.

private final FilterSet
globalFilterSet

Set of global filters.

private final HashMap<String, Object>
idReferences

Map of id references - used for indicating broken build files

private InputHandler
inputHandler

Called to handle any input requests.

private final ThreadLocal<Boolean>
isLoggingMessage

for each thread, record whether it is currently executing messageLogged

public static final String
JAVA_1_0

Version constant for Java 1.0 .

public static final String
JAVA_1_1

Version constant for Java 1.1 .

public static final String
JAVA_1_2

Version constant for Java 1.2 .

public static final String
JAVA_1_3

Version constant for Java 1.3 .

public static final String
JAVA_1_4

Version constant for Java 1.4 .

private boolean
keepGoingMode

Keep going flag.

private volatile BuildListener[]
listeners

List of listeners to notify of build events.

private final Object
listenersLock

lock object used when adding/removing listeners

public static final int
MSG_DEBUG

Message priority of "debug".

public static final int
MSG_ERR

Message priority of "error".

public static final int
MSG_INFO

Message priority of "information".

public static final int
MSG_VERBOSE

Message priority of "verbose".

public static final int
MSG_WARN

Message priority of "warning".

private String
name

Name of this project.

private final Hashtable<String, Object>
references

Map of references within the project (paths etc) (String to Object).

private final Object
referencesLock

lock object used when adding/removing references

private final Hashtable<String, Target>
targets

Map from target names to targets (String to Target).

private final Map<ThreadGroup, Task>
threadGroupTasks

Records the latest task to be executed on a thread group.

private final Map<Thread, Task>
threadTasks

Records the latest task to be executed on a thread.

public static final String
TOKEN_END

Default filter end token.

public static final String
TOKEN_START

Default filter start token.

private static final String
VISITED

Constant for the "visited" state, used when traversing a DFS of target dependencies.

private static final String
VISITING

Constant for the "visiting" state, used when traversing a DFS of target dependencies.

Constructor Summary

AccessConstructor and Description
public
Project()

Create a new Ant project.

Method Summary

Modifier and TypeMethod and Description
public void
addBuildListener(final BuildListener
The listener to add to the list. Must not be null.
listener
)

Add a build listener to the list.

public void
addDataTypeDefinition(final String
The name of the datatype. Must not be null.
typeName
,
final Class<?>
The full name of the class implementing the datatype. Must not be null.
typeClass
)

Add a new datatype definition.

public void
addFilter(final String
The token to filter. Must not be null.
token
,
final String
The replacement value. Must not be null.
value
)

Deprecated since 1.4.x. Use getGlobalFilterSet().addFilter(token,value)
Add a filter to the set of global filters.
public void
addIdReference(final String
the id to set.
id
,
final Object
the value to set it to (Unknown element in this case.
value
)

Add an id reference.

public void
addOrReplaceTarget(final Target
The target to be added or replaced in the project. Must not be null.
target
)

Add a target to the project, or replaces one with the same name.

public void
addOrReplaceTarget(final String
The name to use for the target. Must not be null.
targetName
,
final Target
The target to be added or replaced in the project. Must not be null.
target
)

Add a target to the project, or replaces one with the same name.

public void
addReference(final String
The name of the reference. Must not be null.
referenceName
,
final Object
The value of the reference.
value
)

Add a reference to the project.

public void
addTarget(final Target
The target to be added to the project. Must not be null.
target
)

Add a new target to the project.

public void
addTarget(final String
The name to use for the target. Must not be null.
targetName
,
final Target
The target to be added to the project. Must not be null.
target
)

Add a new target to the project.

public void
addTaskDefinition(final String
The name of the task to add. Must not be null.
taskName
,
final Class<?>
The full name of the class implementing the task. Must not be null.
taskClass
)

Add a new task definition to the project.

public void
checkTaskClass(final Class<?>
The class to be checked. Must not be null.
taskClass
)

Check whether or not a class is suitable for serving as Ant task.

public void
copyFile(final String
Name of file to copy from. Must not be null.
sourceFile
,
final String
Name of file to copy to. Must not be null.
destFile
)

Deprecated since 1.4.x
Convenience method to copy a file from a source to a destination.
public void
copyFile(final String
Name of file to copy from. Must not be null.
sourceFile
,
final String
Name of file to copy to. Must not be null.
destFile
,
final boolean
Whether or not token filtering should be used during the copy.
filtering
)

Deprecated since 1.4.x
Convenience method to copy a file from a source to a destination specifying if token filtering should be used.
public void
copyFile(final String
Name of file to copy from. Must not be null.
sourceFile
,
final String
Name of file to copy to. Must not be null.
destFile
,
final boolean
Whether or not token filtering should be used during the copy.
filtering
,
final boolean
Whether or not the destination file should be overwritten if it already exists.
overwrite
)

Deprecated since 1.4.x
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 void
copyFile(final String
Name of file to copy from. Must not be null.
sourceFile
,
final String
Name of file to copy to. Must not be null.
destFile
,
final boolean
Whether or not token filtering should be used during the copy.
filtering
,
final boolean
Whether or not the destination file should be overwritten if it already exists.
overwrite
,
final boolean
Whether or not the last modified time of the resulting file should be set to that of the source file.
preserveLastModified
)

Deprecated since 1.4.x
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 void
copyFile(final File
File to copy from. Must not be null.
sourceFile
,
final File
File to copy to. Must not be null.
destFile
)

Deprecated since 1.4.x
Convenience method to copy a file from a source to a destination.
public void
copyFile(final File
File to copy from. Must not be null.
sourceFile
,
final File
File to copy to. Must not be null.
destFile
,
final boolean
Whether or not token filtering should be used during the copy.
filtering
)

Deprecated since 1.4.x
Convenience method to copy a file from a source to a destination specifying if token filtering should be used.
public void
copyFile(final File
File to copy from. Must not be null.
sourceFile
,
final File
File to copy to. Must not be null.
destFile
,
final boolean
Whether or not token filtering should be used during the copy.
filtering
,
final boolean
Whether or not the destination file should be overwritten if it already exists.
overwrite
)

Deprecated since 1.4.x
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 void
copyFile(final File
File to copy from. Must not be null.
sourceFile
,
final File
File to copy to. Must not be null.
destFile
,
final boolean
Whether or not token filtering should be used during the copy.
filtering
,
final boolean
Whether or not the destination file should be overwritten if it already exists.
overwrite
,
final boolean
Whether or not the last modified time of the resulting file should be set to that of the source file.
preserveLastModified
)

Deprecated since 1.4.x
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 void
copyInheritedProperties(final Project
the project to copy the properties to. Must not be null.
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.

public void
copyUserProperties(final Project
the project to copy the properties to. Must not be null.
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.

public AntClassLoader

Returns:

an appropriate classloader.
createClassLoader
(final Path
the path from which classes are to be loaded.
path
)

Factory method to create a class loader for loading classes from a given path.

public AntClassLoader

Returns:

an appropriate classloader.
createClassLoader
(final ClassLoader
the parent classloader for the new loader.
parent
,
final Path
the path from which classes are to be loaded.
path
)

Factory method to create a class loader for loading classes from a given path.

public Object

Returns:

an instance of the specified data type, or null if the data type name is not recognised.
createDataType
(final String
The name of the data type to create an instance of. Must not be null.
typeName
)

Create a new instance of a data type.

public Project

Returns:

a Project instance configured as a subproject of this Project.
createSubProject
()

Create and initialize a subproject.

public Task

Returns:

an instance of the specified task, or null if the task name is not recognised.
createTask
(final String
The name of the task to create an instance of. Must not be null.
taskType
)

Create a new instance of a task, adding it to a list of created tasks for later invalidation.

public int

Returns:

the number of bytes read.
defaultInput
(final byte[]
the buffer into which data is to be read.
buffer
,
final int
the offset into the buffer at which data is stored.
offset
,
final int
the amount of data to read.
length
)

Read data from the default input stream.

public void
demuxFlush(final String
Message to handle. Should not be null.
output
,
final boolean
Whether the text represents an error (true) or information (false).
isError
)

Demultiplex flush operations so that each task receives the appropriate messages.

public int

Returns:

the number of bytes read.
demuxInput
(final byte[]
the buffer into which data is to be read.
buffer
,
final int
the offset into the buffer at which data is stored.
offset
,
final int
the amount of data to read.
length
)

Demux an input request to the correct task.

public void
demuxOutput(final String
Message to handle. Should not be null.
output
,
final boolean
Whether the text represents an warning (true) or information (false).
isWarning
)

Demultiplex output so that each task receives the appropriate messages.

public void
executeSortedTargets(final Vector<Target>
the aforementioned Vector.
sortedTargets
)

Execute a Vector of sorted targets.

public void
executeTarget(final String
The name of the target to execute. Must not be null.
targetName
)

Execute the specified target and any targets it depends on.

public void
executeTargets(final Vector<String>
A vector of target name strings to execute. Must not be null.
names
)

Execute the specified sequence of targets, and the targets they depend on.

public void
fireBuildFinished(final Throwable
an exception indicating a reason for a build failure. May be null, indicating a successful build.
exception
)

Send a "build finished" event to the build listeners for this project.

public void
fireBuildStarted()

Send a "build started" event to the build listeners for this project.

protected void
fireMessageLogged(final Project
The project generating the event. Should not be null.
project
,
final String
The message to send. Should not be null.
message
,
final int
The priority of the message.
priority
)

Send a "message logged" project level event to the build listeners for this project.

protected void
fireMessageLogged(final Project
The project generating the event. Should not be null.
project
,
final String
The message to send. Should not be null.
message
,
final Throwable
The exception that caused this message. May be null.
throwable
,
final int
The priority of the message.
priority
)

Send a "message logged" project level event to the build listeners for this project.

protected void
fireMessageLogged(final Target
The target generating the event. Must not be null.
target
,
final String
The message to send. Should not be null.
message
,
final int
The priority of the message.
priority
)

Send a "message logged" target level event to the build listeners for this project.

protected void
fireMessageLogged(final Target
The target generating the event. Must not be null.
target
,
final String
The message to send. Should not be null.
message
,
final Throwable
The exception that caused this message. May be null.
throwable
,
final int
The priority of the message.
priority
)

Send a "message logged" target level event to the build listeners for this project.

protected void
fireMessageLogged(final Task
The task generating the event. Must not be null.
task
,
final String
The message to send. Should not be null.
message
,
final int
The priority of the message.
priority
)

Send a "message logged" task level event to the build listeners for this project.

protected void
fireMessageLogged(final Task
The task generating the event. Must not be null.
task
,
final String
The message to send. Should not be null.
message
,
final Throwable
The exception that caused this message. May be null.
throwable
,
final int
The priority of the message.
priority
)

Send a "message logged" task level event to the build listeners for this project.

private void
fireMessageLoggedEvent(final BuildEvent
The event to send. This should be built up with the appropriate task/target/project by the caller, so that this method can set the message and priority, then send the event. Must not be null.
event
,
String
The message to send. Should not be null.
message
,
final int
The priority of the message.
priority
)

Send a "message logged" event to the build listeners for this project.

public void
fireSubBuildFinished(final Throwable
an exception indicating a reason for a build failure. May be null, indicating a successful build.
exception
)

Send a "subbuild finished" event to the build listeners for this project.

public void
fireSubBuildStarted()

Send a "subbuild started" event to the build listeners for this project.

protected void
fireTargetFinished(final Target
The target which has finished building. Must not be null.
target
,
final Throwable
an exception indicating a reason for a build failure. May be null, indicating a successful build.
exception
)

Send a "target finished" event to the build listeners for this project.

protected void
fireTargetStarted(final Target
The target which is starting to build. Must not be null.
target
)

Send a "target started" event to the build listeners for this project.

protected void
fireTaskFinished(final Task
The task which has finished executing. Must not be null.
task
,
final Throwable
an exception indicating a reason for a build failure. May be null, indicating a successful build.
exception
)

Send a "task finished" event to the build listeners for this project.

protected void
fireTaskStarted(final Task
The target which is starting to execute. Must not be null.
task
)

Send a "task started" event to the build listeners for this project.

public File

Returns:

the project base directory, or null if the base directory has not been successfully set to a valid value.
getBaseDir
()

Return the base directory of the project as a file object.

public Vector<BuildListener>

Returns:

a list of build listeners for the project
getBuildListeners
()

Return a copy of the list of build listeners for the project.

public Map<String, Class<?>>

Returns:

a map of from datatype name to implementing class (String to Class).
getCopyOfDataTypeDefinitions
()

Return the current datatype definition map.

public Map<String, Object>

Returns:

a map of the references in the project (String to Object).
getCopyOfReferences
()

Return a map of the references in the project (String to Object).

public Map<String, Target>

Returns:

a map from name to target (String to Target).
getCopyOfTargets
()

Return the map of targets.

public Map<String, Class<?>>

Returns:

a map of from task name to implementing class (String to Class).
getCopyOfTaskDefinitions
()

Return the current task definition map.

public ClassLoader

Returns:

the core classloader to use for this project.
getCoreLoader
()

Return the core classloader to use for this project.

public Hashtable<String, Class<?>>

Returns:

a map of from datatype name to implementing class (String to Class).
getDataTypeDefinitions
()

Return the current datatype definition hashtable.

public InputStream

Returns:

the InputStream instance in use by this Project instance to read input.
getDefaultInputStream
()

Get this project's input stream.

public String

Returns:

name of the default target or null if no default has been set.
getDefaultTarget
()

Return the name of the default target of the project.

public String

Returns:

the project description, or null if it hasn't been set.
getDescription
()

Return the project description, if one has been set.

public String

Returns:

a description of the element type.
getElementName
(final Object
The element to describe. Must not be null.
element
)

Return a description of the type of the given element, with special handling for instances of tasks and data types.

public Executor

Returns:

an Executor instance.
getExecutor
()

Get this Project's Executor (setting it if necessary).

public Hashtable<String, String>

Returns:

a hashtable of global filters, mapping tokens to values (String to String).
getFilters
()

Deprecated since 1.4.x Use getGlobalFilterSet().getFilterHash().
Return a hashtable of global filters, mapping tokens to values.
public FilterSet

Returns:

the set of global filters.
getGlobalFilterSet
()

Return the set of global filters.

public Hashtable<String, Object>

Returns:

a hashtable containing just the inherited properties.
getInheritedProperties
()

Return a copy of the inherited property hashtable.

public InputHandler

Returns:

the InputHandler instance currently in place for the project instance.
getInputHandler
()

Retrieve the current input handler.

public static String

Returns:

the version of Java as a String, e.g. "1.1" .
getJavaVersion
()

Deprecated since 1.5.x. Use org.apache.tools.ant.util.JavaEnvUtils instead.
Return the version of Java this class is running under.
public String

Returns:

the project name, or null if it hasn't been set.
getName
()

Return the project name, if one has been set.

public static Project

Returns:

Project instance, if any.
getProject
(final Object
the object to query.
o
)

Get the Project instance associated with the specified object.

public Hashtable<String, Object>

Returns:

a hashtable containing all properties (including user properties) known to the project directly, does not contain local properties.
getProperties
()

Return a copy of the properties table.

public String

Returns:

the property value, or null for no match or if a null name is provided.
getProperty
(final String
The name of the property. May be null, in which case the return value is also null.
propertyName
)

Return the value of a property, if it is set.

public Set<String>

Returns:

the names of all known properties including local user and local properties.
getPropertyNames
()

Returns the names of all known properties.

public <
desired type
T
>
T

Returns:

the reference with the specified ID, or null if there is no such reference in the project, with type inference.
getReference
(final String
The key for the desired reference. Must not be null.
key
)

Look up a reference by its key (ID).

public Hashtable<String, Object>

Returns:

a map of the references in the project (String to Object).
getReferences
()

Return a map of the references in the project (String to Object).

public Resource

Returns:

the file resource.
getResource
(final String
the name of the file to resolve.
name
)

Implements org.apache.tools.ant.types.ResourceFactory.getResource.

Resolve the file relative to the project's basedir and return it as a FileResource.
public Hashtable<String, Target>

Returns:

a map from name to target (String to Target).
getTargets
()

Return the hashtable of targets.

public Hashtable<String, Class<?>>

Returns:

a map of from task name to implementing class (String to Class).
getTaskDefinitions
()

Return the current task definition hashtable.

public Task

Returns:

the task which is currently registered for the given thread or null if no task is registered.
getThreadTask
(final Thread
the thread for which the task is required.
thread
)

Get the current task associated with a thread, if any.

public Hashtable<String, Object>

Returns:

a hashtable containing just the user properties.
getUserProperties
()

Return a copy of the user property hashtable.

public String

Returns:

the property value, or null for no match or if a null name is provided.
getUserProperty
(final String
The name of the property. May be null, in which case the return value is also null.
propertyName
)

Return the value of a user property, if it is set.

public boolean

Returns:

boolean
hasReference
(final String
String
key
)

Does the project know this reference?

public void
inheritIDReferences(final Project
the parent project of this project.
parent
)

Inherit the id references.

public void
init()

Initialise the project.

public void
initProperties()

Initializes the properties.

public void
initSubProject(final Project
the subproject to initialize.
subProject
)

Initialize a subproject.

public boolean

Returns:

"keep-going" mode
isKeepGoingMode
()

Return the keep-going mode.

public void
log(final String
The text to log. Should not be null.
message
)

Write a message to the log with the default log level of MSG_INFO .

public void
log(final String
The text to log. Should not be null.
message
,
final int
The log priority level to use.
msgLevel
)

Write a project level message to the log with the given log level.

public void
log(final String
The text to log. Should not be null.
message
,
final Throwable
The exception causing this log, may be null.
throwable
,
final int
The log priority level to use.
msgLevel
)

Write a project level message to the log with the given log level.

public void
log(final Task
The task to use in the log. Must not be null.
task
,
final String
The text to log. Should not be null.
message
,
final int
The log priority level to use.
msgLevel
)

Write a task level message to the log with the given log level.

public void
log(final Task
The task to use in the log. Must not be null.
task
,
final String
The text to log. Should not be null.
message
,
final Throwable
The exception causing this log, may be null.
throwable
,
final int
The log priority level to use.
msgLevel
)

Write a task level message to the log with the given log level.

public void
log(final Target
The target to use in the log. Must not be null.
target
,
final String
The text to log. Should not be null.
message
,
final int
The log priority level to use.
msgLevel
)

Write a target level message to the log with the given log level.

public void
log(final Target
The target to use in the log. Must not be null.
target
,
final String
The text to log. Should not be null.
message
,
final Throwable
The exception causing this log, may be null.
throwable
,
final int
The log priority level to use.
msgLevel
)

Write a target level message to the log with the given log level.

private static BuildException

Returns:

a BuildException detailing the specified circular dependency.
makeCircularException
(final String
The dependency to stop at. Must not be null.
end
,
final Stack<String>
A stack of dependencies. Must not be null.
stk
)

Build an appropriate exception detailing a specified circular dependency.

public void
registerThreadTask(final Thread
the thread on which the task is registered.
thread
,
final Task
the task to be registered.
task
)

Register a task as the current task for a thread.

public void
removeBuildListener(final BuildListener
The listener to remove from the list. Should not be null.
listener
)

Remove a build listener from the list.

public String

Returns:

the given string with embedded property names replaced by values, or null if the given string is null.
replaceProperties
(final String
The string to be scanned for property references. May be null.
value
)

Replace ${} style constructions in the given value with the string value of the corresponding data types.

public File

Returns:

the resolved File.
resolveFile
(final String
The name of the file to resolve. Must not be null.
fileName
,
final File
The directory respective to which relative file names are resolved. May be null, in which case the current directory is used.
rootDir
)

Deprecated since 1.4.x
Return the canonical form of a filename.
public File

Returns:

the resolved File.
resolveFile
(final String
The name of the file to resolve. Must not be null.
fileName
)

Return the canonical form of a filename.

private void
setAntLib()

Set a property to the location of ant.jar.

public void
setBasedir(final String
The project base directory. Must not be null.
baseD
)

Set the base directory for the project, checking that the given filename exists and is a directory.

public void
setBaseDir(File
The project base directory. Must not be null.
baseDir
)

Set the base directory for the project, checking that the given file exists and is a directory.

public void
setCoreLoader(final ClassLoader
The classloader to use for the project. May be null.
coreLoader
)

Set the core classloader for the project.

public void
setDefault(final String
The name of the default target for this project. May be null, indicating that there is no default target.
defaultTarget
)

Set the default target of the project.

public void
setDefaultInputStream(final InputStream
the default input stream to use when input is requested.
defaultInputStream
)

Set the default System input stream.

public void
setDefaultTarget(final String
The name of the default target for this project. May be null, indicating that there is no default target.
defaultTarget
)

Deprecated since 1.5.x. Use setDefault.
Set the default target of the project.
public void
setDescription(final String
The description of the project. May be null.
description
)

Set the project description.

public void
setExecutor(final Executor
the Executor to use.
e
)

Set the Executor instance for this Project.

public void
setFileLastModified(final File
The file to set the last modified time on. Must not be null.
file
,
final long
the required modification time.
time
)

Deprecated since 1.4.x
Call File.setLastModified(long time) on Java above 1.1, and logs a warning on Java 1.1.
public void
setInheritedProperty(final String
The name of property to set. Must not be null.
name
,
final String
The new value of the property. Must not be null.
value
)

Set a user property, which cannot be overwritten by set/unset property calls.

public void
setInputHandler(final InputHandler
the InputHandler instance to use for gathering input.
handler
)

Set the input handler.

public void
setJavaVersionProperty()

Set the ant.java.version property and tests for unsupported JVM versions.

public void
setKeepGoingMode(final boolean
"keep-going" mode
keepGoingMode
)

Set "keep-going" mode.

public void
setName(final String
The name of the project. Must not be null.
name
)

Set the name of the project, also setting the user property ant.project.name.

public void
setNewProperty(final String
The name of property to set. Must not be null.
name
,
final String
The new value of the property. Must not be null.
value
)

Set a property if no value currently exists.

public final void
setProjectReference(final Object
the object to invoke setProject(this) on.
obj
)

Set a reference to this Project on the parameterized object.

public void
setProperty(final String
The name of property to set. Must not be null.
name
,
final String
The new value of the property. Must not be null.
value
)

Set a property.

private void
setPropertyInternal(final String
The name of the property. Must not be null.
name
,
final String
The property value. Must not be null.
value
)

Set a property unless it is already defined as a user property (in which case the method returns silently).

public void
setSystemProperties()

Add all system properties which aren't already defined as user properties to the project properties.

public void
setUserProperty(final String
The name of property to set. Must not be null.
name
,
final String
The new value of the property. Must not be null.
value
)

Set a user property, which cannot be overwritten by set/unset property calls.

public static boolean

Returns:

true if the given string is "on", "true" or "yes", or false otherwise.
toBoolean
(final String
The string to convert to a boolean value.
s
)

Return the boolean equivalent of a string, which is considered true if either "on", "true", or "yes" is found, ignoring case.

public final Vector<Target>

Returns:

a Vector of ALL Target objects in sorted order.
topoSort
(final String
The name of the root target. The sort is created in such a way that the sequence of Targets up to the root target is the minimum possible such sequence. Must not be null.
root
,
final Hashtable<String, Target>
A Hashtable mapping names to Targets. Must not be null.
targetTable
)

Topologically sort a set of targets.

public final Vector<Target>

Returns:

a Vector of Target objects in sorted order.
topoSort
(final String
The name of the root target. The sort is created in such a way that the sequence of Targets up to the root target is the minimum possible such sequence. Must not be null.
root
,
final Hashtable<String, Target>
A Hashtable mapping names to Targets. Must not be null.
targetTable
,
final boolean
boolean indicating whether to return all targets, or the execution sequence only.
returnAll
)

Topologically sort a set of targets.

public final Vector<Target>

Returns:

a Vector of Target objects in sorted order.
topoSort
(final String[]
String[] containing the names of the root targets. The sort is created in such a way that the ordered sequence of Targets is the minimum possible such sequence to the specified root targets. Must not be null.
roots
,
final Hashtable<String, Target>
A map of names to targets (String to Target). Must not be null.
targetTable
,
final boolean
boolean indicating whether to return all targets, or the execution sequence only.
returnAll
)

Topologically sort a set of targets.

public static String

Returns:

the native version of the specified path or an empty string if the path is null or empty.
translatePath
(final String
The path to be translated. May be null.
toProcess
)

Deprecated since 1.7 Use FileUtils.translatePath instead.
Translate a path into its native (platform specific) format.
private void
tsort(final String
The current target to inspect. Must not be null.
root
,
final Hashtable<String, Target>
A mapping from names to targets (String to Target). Must not be null.
targetTable
,
final Hashtable<String, String>
A mapping from target names to states (String to String). The states in question are "VISITING" and "VISITED". Must not be null.
state
,
final Stack<String>
A stack of targets which are currently being visited. Must not be null.
visiting
,
final Vector<Target>
The list to add target names to. This will end up containing the complete list of dependencies in dependency order. Must not be null.
ret
)

Perform a single step in a recursive depth-first-search traversal of the target dependency tree.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait