Class TokenizedPath
java.lang.Object
org.apache.tools.ant.types.selectors.TokenizedPath
Container for a path that has been split into its components.
- Since:
- 1.8.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TokenizedPath
Instance that holds no tokens at all. -
Constructor Summary
ConstructorDescriptionTokenizedPath
(String path) Initialize the TokenizedPath by parsing it.TokenizedPath
(TokenizedPath parent, String child) Creates a new path as a child of another path. -
Method Summary
Modifier and TypeMethodDescriptionint
depth()
The depth (or length) of a path.boolean
true if the original paths are equal.Frombase
traverse the filesystem in order to find a file that matches the given name.int
hashCode()
boolean
Do we have to traverse a symlink when trying to reach path from basedir?Creates a TokenizedPattern from the same tokens that make up this path.toString()
-
Field Details
-
EMPTY_PATH
Instance that holds no tokens at all.
-
-
Constructor Details
-
TokenizedPath
Initialize the TokenizedPath by parsing it.- Parameters:
path
- The path to tokenize. Must not benull
.
-
TokenizedPath
Creates a new path as a child of another path.- Parameters:
parent
- the parent pathchild
- the child, must not contain the file separator
-
-
Method Details
-
toString
-
depth
public int depth()The depth (or length) of a path.- Returns:
- int
-
findFile
-
isSymlink
Do we have to traverse a symlink when trying to reach path from basedir?- Parameters:
base
- base File (dir).- Returns:
- boolean
-
equals
-
hashCode
-
toPattern
Creates a TokenizedPattern from the same tokens that make up this path.- Returns:
- TokenizedPattern
-