saker.build Documentation TaskDoc JavaDoc Packages
public interface WildcardPath.ItemLister<T>
Interface for providing listing functionality for wildcard paths.
TThe object type the lister discovers.
Methods
public static ItemLister<extends BasicFileAttributes>
Creates an ItemLister for a given file provider.
public static ItemLister<extends BasicFileAttributes>
Creates an ItemLister for a given file provider.
public static ItemLister<extends BasicFileAttributes>
Creates an ItemLister for a given file provider, but without any root directories.
public static ItemLister<extends SakerFile>
forSakerFiles(NavigableMap<String, ? extends SakerDirectory> rootdirectories)
Creates an ItemLister for collecting SakerFiles with the given root directories.
public static ItemLister<extends SakerFile>
forSakerFiles(NavigableMap<String, ? extends SakerDirectory> rootdirectories, SakerDirectory workingdirectory)
Creates an ItemLister for collecting SakerFiles with the given root directories and working directory.
public static ItemLister<extends SakerFile>
forSakerFiles(SakerDirectory workingdirectory)
Creates an ItemLister for collecting SakerFiles in the specified working directory.
public static ItemLister<extends SakerFile>
Creates an ItemLister for collecting SakerFiles for a task.
public T
Gets the item at the given absolute path.
public T
Gets the root item for the specified root item name.
public Set<String>
Gets the names of the root items.
public T
Gets the working item for finding items with a relative path.
public SakerPath
The path of the working item.
public Map<String, ? extends T>
Lists all child items for a given parent.
public NavigableMap<SakerPath, ? extends T>
Lists all child items for a given parent, recursively.
public T
resolve(T item, String name)
Resolves a child item for a given parent.
Creates an ItemLister for a given file provider.

The created item lister will collect the file attributes of the files.

No working directory is used.

fpThe file provider.
The created item lister.
NullPointerExceptionIf the file provider is null.
Creates an ItemLister for a given file provider.

The created item lister will collect the file attributes of the files.

fpThe file provider.
workingdirThe working directory, or null to not use one.
The created item lister.
NullPointerExceptionIf the file provider is null.
Creates an ItemLister for a given file provider, but without any root directories.

The item lister will not use the root directories of the specified file provider, only the working directory.

The created item lister will collect the file attributes of the files.

fpThe file provider.
workingdirThe working directory.
The created item lister.
NullPointerExceptionIf any of the arguments are null.
saker.build 0.8.5
public static ItemLister<extends SakerFile> forSakerFiles(NavigableMap<String, ? extends SakerDirectory> rootdirectories) throws NullPointerException
Creates an ItemLister for collecting SakerFiles with the given root directories.

No working directory is used.

rootdirectoriesThe root directories.
The created item lister.
NullPointerExceptionIf the argument is null.
public static ItemLister<extends SakerFile> forSakerFiles(NavigableMap<String, ? extends SakerDirectory> rootdirectories, SakerDirectory workingdirectory) throws NullPointerException
Creates an ItemLister for collecting SakerFiles with the given root directories and working directory.
rootdirectoriesThe root directories or null to not use them.
workingdirectoryThe working directory, or null to not use one.
The created item lister.
NullPointerExceptionIf both arguments are null.
public static ItemLister<extends SakerFile> forSakerFiles(SakerDirectory workingdirectory) throws NullPointerException
Creates an ItemLister for collecting SakerFiles in the specified working directory.

No root directories are used.

workingdirectoryThe working directory.
The created item lister.
NullPointerExceptionIf the argument is null.
saker.build 0.8.5
public static ItemLister<extends SakerFile> forSakerFiles(TaskContext taskcontext)
Creates an ItemLister for collecting SakerFiles for a task.

The task working directory is used to resolve relative paths.

taskcontextThe task context.
The created item lister.
public abstract T getItem(SakerPath path)
Gets the item at the given absolute path.
pathThe absolute path to resolve the item at.
The item or null if not found.
public abstract T getRootItem(String name)
Gets the root item for the specified root item name.

The parameter root item name is one of the names returned by getRootItems().

nameThe root item name.
The root item, or null if not found.
public abstract Set<String> getRootItems()
Gets the names of the root items.

Root item names follow the rules of SakerPath root names.

An unmodifiable set of root items.
public abstract T getWorkingItem()
Gets the working item for finding items with a relative path.
The working item, or null if not available.
public abstract SakerPath getWorkingItemPath()
The path of the working item.
The path to the working item or null if there's no working item.
public abstract Map<String, ? extends T> listChildItems(T item)
Lists all child items for a given parent.
itemThe parent item.
An map of child items.
public abstract NavigableMap<SakerPath, ? extends T> listChildItemsRecursively(T item)
Lists all child items for a given parent, recursively.

All child items and their children should be inclided in the returned map. The result map keys should be relative to the parent item.

itemThe parent item.
The recursively listed child items.
public abstract T resolve(T item, String name)
Resolves a child item for a given parent.
itemThe parent item.
nameThe name of the child item to look for.
The child item, or null if not found.