public abstract class PathSpec extends Object implements Comparable<PathSpec>
Constructor and Description |
---|
PathSpec() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PathSpec other) |
boolean |
equals(Object obj) |
String |
getDeclaration()
The as-provided path spec.
|
PathSpecGroup |
getGroup() |
int |
getPathDepth()
Get the number of path elements that this path spec declares.
|
abstract String |
getPathInfo(String path)
Return the portion of the path that is after the path spec.
|
abstract String |
getPathMatch(String path)
Return the portion of the path that matches a path spec.
|
String |
getPrefix()
A simple prefix match for the pathspec or null
|
abstract String |
getRelativePath(String base,
String path)
Get the relative path.
|
String |
getSuffix()
A simple suffix match for the pathspec or null
|
int |
hashCode() |
abstract boolean |
matches(String path)
Test to see if the provided path matches this path spec
|
String |
toString() |
public int compareTo(PathSpec other)
compareTo
in interface Comparable<PathSpec>
public PathSpecGroup getGroup()
public int getPathDepth()
This is used to determine longest match logic.
public abstract String getPathInfo(String path)
path
- the path to match againstpublic abstract String getPathMatch(String path)
path
- the path to match againstpublic String getDeclaration()
public String getPrefix()
public String getSuffix()
public abstract String getRelativePath(String base, String path)
base
- the base the path is relative topath
- the additional pathpublic abstract boolean matches(String path)
path
- the path to testCopyright © 2010 - 2020 Adobe. All Rights Reserved