com.sun.tools.javac.file
Class RelativePath
java.lang.Object
com.sun.tools.javac.file.RelativePath
- All Implemented Interfaces:
- java.lang.Comparable<RelativePath>
- Direct Known Subclasses:
- RelativePath.RelativeDirectory, RelativePath.RelativeFile
public abstract class RelativePath
- extends java.lang.Object
- implements java.lang.Comparable<RelativePath>
Used to represent a platform-neutral path within a platform-specific
container, such as a directory or zip file.
Internally, the file separator is always '/'.
|
Nested Class Summary |
static class |
RelativePath.RelativeDirectory
Used to represent a platform-neutral subdirectory within a platform-specific
container, such as a directory or zip file. |
static class |
RelativePath.RelativeFile
Used to represent a platform-neutral file within a platform-specific
container, such as a directory or zip file. |
|
Field Summary |
protected java.lang.String |
path
|
|
Constructor Summary |
protected |
RelativePath(java.lang.String p)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
path
protected final java.lang.String path
RelativePath
protected RelativePath(java.lang.String p)
- Parameters:
p - must use '/' as an internal separator
dirname
public abstract RelativePath.RelativeDirectory dirname()
basename
public abstract java.lang.String basename()
getFile
public java.io.File getFile(java.io.File directory)
compareTo
public int compareTo(RelativePath other)
- Specified by:
compareTo in interface java.lang.Comparable<RelativePath>
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getPath
public java.lang.String getPath()