org.codehaus.commons.compiler.util.resource.ResourceFinder that provides access to resource stored as
byte arrays in a java.util.Map .
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Resource | Returns: The resource that was previously associated with the fileName, ornullAdds another |
| public Resource | Returns: The resource that was previously associated with the fileName, ornullThe text to store (in platform default encoding) data)
|
| public Resource | Returns: The resource that was previously associated with the fileName, ornullAdds another |
| public final Resource | findResource(final String
Designates the resource; typically structured by slashes ("/") like
" resourceName)com/foo/pkg/Bar.class"Implements abstract org. Resource object.
|
| public Iterable | list(final String
E.g. resourceNamePrefix, final boolean recurse)"" or "java/lang/"Implements abstract org. |
| public Collection | |
| public final void | setLastModified(long
The return value of lastModified)Resource#lastModified() for the next resources added
|
| lastModified | back to summary |
|---|---|
| private long lastModified | |
| map | back to summary |
|---|---|
| private final Map<String, Resource> map | |
| MapResourceFinder | back to summary |
|---|---|
| public MapResourceFinder() | |
| MapResourceFinder | back to summary |
|---|---|
| public MapResourceFinder(Map<String, byte[]> map) | |
| addResource | back to summary |
|---|---|
| public Resource addResource(final String fileName, final byte[] data) Adds another | |
| addResource | back to summary |
|---|---|
| public Resource addResource(String fileName, String data) | |
| addResource | back to summary |
|---|---|
| public Resource addResource(final Resource resource) Adds another
| |
| findResource | back to summary |
|---|---|
| public final Resource findResource(final String resourceName) Implements abstract org. Doc from org. Finds a resource by name and return it as a | |
| list | back to summary |
|---|---|
| public Iterable Implements abstract org. Doc from org. Returns all resources who's names start with a given string. Only resources with a content are included, no "special entries" of any kind, e.g. directories.
If the prefix string ends with "/", you will get a proper directory listing (recurse
resourceFinder.list("dir/", true) =>
dir/
dir/afile
dir/bfile
dir/adir/
dir/adir/file
dir/bdir/
dir/bdir/file
Otherwise, you will get a strange subset of a directory listing, resp. directory tree, as follows:
resourceFinder.list("dir/a", true) =>
dir/afile
dir/adir/
dir/adir/file
| |
| resources | back to summary |
|---|---|
public Collection
| |
| setLastModified | back to summary |
|---|---|
public final void setLastModified(long lastModified)
| |