public class PathPrefixSet extends Object
Constructor and Description |
---|
PathPrefixSet() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(PathPrefix prefix) |
int |
getSize() |
boolean |
includesDirectory(String dirPath)
Determines whether or not a directory might have resources that could be
included.
|
PathPrefix |
includesResource(String resourceAbstractPathName)
Determines whether or not a given resource should be allowed by this path
prefix set and the corresponding filters.
|
PathPrefix |
includesResource(String resourceAbstractPathName,
String[] parts)
Implementation of
includesDirectory(String) . |
String |
toString() |
Collection<PathPrefix> |
values() |
public boolean add(PathPrefix prefix)
prefix
- the prefix to addtrue
if the prefix was not already in the set;
otherwise, it merged with one having the same prefix, which has
the effect of expanding the filter (the merge works as
union(includes - skips) - union(excludes)
)public int getSize()
public boolean includesDirectory(String dirPath)
ClassPathEntry
subclasses to avoid descending into directory
hierarchies that could not possibly contain resources that would be
included by includesResource(String)
dirPath
- must be a valid abstract directory name (must not be an
empty string)public PathPrefix includesResource(String resourceAbstractPathName)
resourceAbstractPathName
- PathPrefix
if the resource matches some
specified prefix and any associated filters don't exclude it.
Otherwise, returns null. So it returns null if either no prefixes
match or the most specific prefix excludes the resource.public PathPrefix includesResource(String resourceAbstractPathName, String[] parts)
includesDirectory(String)
.public Collection<PathPrefix> values()
Copyright © 2018. All rights reserved.