public abstract class CompositeFileCollection extends AbstractFileCollection implements FileCollectionContainer
FileCollection which contains the union of the given source collections. Maintains file
ordering.FileCollection.AntType| Constructor and Description |
|---|
CompositeFileCollection() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAsResourceCollection(Object builder,
String nodeName) |
protected void |
addDependencies(TaskDependencyResolveContext context)
Allows subclasses to add additional dependencies
|
boolean |
contains(File file)
Determines whether this collection contains the given file.
|
FileCollection |
filter(Spec<? super File> filterSpec)
Restricts the contents of this collection to those files which match the given criteria.
|
FileTree |
getAsFileTree()
Converts this collection to a
FileTree. |
protected Collection<DirectoryFileTree> |
getAsFileTrees()
Returns this collection as a set of
DirectoryFileTree instances. |
TaskDependency |
getBuildDependencies()
Returns a dependency which contains the tasks which build this artifact.
|
Set<File> |
getFiles()
Returns the contents of this collection as a Set.
|
protected List<? extends FileCollection> |
getSourceCollections() |
boolean |
isEmpty()
Returns true if this collection is empty.
|
abstract void |
resolve(FileCollectionResolveContext context)
Adds the contents of this container to the given context.
|
add, addAsFileSet, addAsMatchingTask, addToAntBuilder, addToAntBuilder, asType, filter, getAsPath, getCapDisplayName, getDisplayName, getSingleFile, iterator, minus, plus, stopExecutionIfEmpty, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDisplayNamepublic Set<File> getFiles()
FileCollectiongetFiles in interface FileCollectiongetFiles in interface MinimalFileSetpublic boolean contains(File file)
FileCollectiongetFiles().contains(file).contains in interface FileCollectioncontains in class AbstractFileCollectionfile - The file to check for.public boolean isEmpty()
FileCollectiongetFiles().isEmpty().isEmpty in interface FileCollectionisEmpty in class AbstractFileCollectionprotected void addAsResourceCollection(Object builder, String nodeName)
addAsResourceCollection in class AbstractFileCollectionprotected Collection<DirectoryFileTree> getAsFileTrees()
AbstractFileCollectionDirectoryFileTree instances.getAsFileTrees in class AbstractFileCollectionpublic FileTree getAsFileTree()
FileCollectionFileTree. Generally, for each file in this collection, the resulting file
tree will contain the source file at the root of the tree. For each directory in this collection, the resulting
file tree will contain all the files under the source directory.getAsFileTree in interface FileCollectiongetAsFileTree in class AbstractFileCollectionFileTree. Never returns null.public FileCollection filter(Spec<? super File> filterSpec)
FileCollectionRestricts the contents of this collection to those files which match the given criteria. The filtered collection is live, so that it reflects any changes to this collection.
filter in interface FileCollectionfilter in class AbstractFileCollectionfilterSpec - The criteria to use to select the contents of the filtered collection.public TaskDependency getBuildDependencies()
BuildableBuildable implementations
must ensure that the returned dependency object is live, so that it tracks changes to the dependencies of this
buildable.getBuildDependencies in interface BuildablegetBuildDependencies in class AbstractFileCollectionprotected void addDependencies(TaskDependencyResolveContext context)
context - The context to add dependencies to.protected List<? extends FileCollection> getSourceCollections()
public abstract void resolve(FileCollectionResolveContext context)
FileCollectionContainerresolve in interface FileCollectionContainerCopyright © 2013. All rights reserved