Class JavadocUtil.PathTokenizer

java.lang.Object
org.apache.maven.plugins.javadoc.JavadocUtil.PathTokenizer
Enclosing class:
JavadocUtil

private static class JavadocUtil.PathTokenizer extends Object
A Path tokenizer takes a path and returns the components that make up that path. The path can use path separators of either ':' or ';' and file separators of either '/' or '\'.
Version:
revision 439418 taken on 2009-09-12 from Ant Project (see http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/PathTokenizer.java)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
    Flag to indicate whether we are running on a platform with a DOS style filesystem
    private String
    A String which stores any path components which have been read ahead due to DOS filesystem compensation.
    A tokenizer to break the string up based on the ':' or ';' separators.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a path tokenizer for the specified path.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tests if there are more path elements available from this tokenizer's path.
    Returns the next path element from this tokenizer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • tokenizer

      private StringTokenizer tokenizer
      A tokenizer to break the string up based on the ':' or ';' separators.
    • lookahead

      private String lookahead
      A String which stores any path components which have been read ahead due to DOS filesystem compensation.
    • dosStyleFilesystem

      private boolean dosStyleFilesystem
      Flag to indicate whether we are running on a platform with a DOS style filesystem
  • Constructor Details

    • PathTokenizer

      PathTokenizer(String path)
      Constructs a path tokenizer for the specified path.
      Parameters:
      path - The path to tokenize. Must not be null.
  • Method Details

    • hasMoreTokens

      public boolean hasMoreTokens()
      Tests if there are more path elements available from this tokenizer's path. If this method returns true, then a subsequent call to nextToken will successfully return a token.
      Returns:
      true if and only if there is at least one token in the string after the current position; false otherwise.
    • nextToken

      public String nextToken() throws NoSuchElementException
      Returns the next path element from this tokenizer.
      Returns:
      the next path element from this tokenizer.
      Throws:
      NoSuchElementException - if there are no more elements in this tokenizer's path.