com.sun.tools.javac.file
Class RelativePath.RelativeDirectory

java.lang.Object
  extended by com.sun.tools.javac.file.RelativePath
      extended by com.sun.tools.javac.file.RelativePath.RelativeDirectory
All Implemented Interfaces:
java.lang.Comparable<RelativePath>
Enclosing class:
RelativePath

public static class RelativePath.RelativeDirectory
extends RelativePath

Used to represent a platform-neutral subdirectory within a platform-specific container, such as a directory or zip file. Internally, the file separator is always '/', and if the path is not empty, it always ends in a '/' as well.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.tools.javac.file.RelativePath
RelativePath.RelativeDirectory, RelativePath.RelativeFile
 
Field Summary
 
Fields inherited from class com.sun.tools.javac.file.RelativePath
path
 
Constructor Summary
RelativePath.RelativeDirectory(RelativePath.RelativeDirectory d, java.lang.String p)
           
RelativePath.RelativeDirectory(java.lang.String p)
           
 
Method Summary
 java.lang.String basename()
           
(package private)  boolean contains(RelativePath other)
          Return true if this subdirectory "contains" the other path.
 RelativePath.RelativeDirectory dirname()
           
(package private) static RelativePath.RelativeDirectory forPackage(java.lang.CharSequence packageName)
           
 java.lang.String toString()
           
 
Methods inherited from class com.sun.tools.javac.file.RelativePath
compareTo, equals, getFile, getPath, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RelativePath.RelativeDirectory

public RelativePath.RelativeDirectory(java.lang.String p)
Parameters:
p - must use '/' as an internal separator

RelativePath.RelativeDirectory

public RelativePath.RelativeDirectory(RelativePath.RelativeDirectory d,
                                      java.lang.String p)
Parameters:
p - must use '/' as an internal separator
Method Detail

forPackage

static RelativePath.RelativeDirectory forPackage(java.lang.CharSequence packageName)

dirname

public RelativePath.RelativeDirectory dirname()
Specified by:
dirname in class RelativePath

basename

public java.lang.String basename()
Specified by:
basename in class RelativePath

contains

boolean contains(RelativePath other)
Return true if this subdirectory "contains" the other path. A subdirectory path does not contain itself.


toString

public java.lang.String toString()
Overrides:
toString in class RelativePath