程序包 proguard

类 WordReader

  • 直接已知子类:
    ArgumentWordReader, LineWordReader

    public abstract class WordReader
    extends java.lang.Object
    An abstract reader of words, with the possibility to include other readers. Words are separated by spaces or broken off at delimiters. Words containing spaces or delimiters can be quoted with single or double quotes. Comments (everything starting with '#' on a single line) are ignored.
    • 构造器概要

      构造器 
      限定符 构造器 说明
      protected WordReader​(java.io.File baseDir)
      Creates a new WordReader with the given base directory.
      protected WordReader​(java.net.URL baseURL)
      Creates a new WordReader with the given base URL.
    • 方法概要

      所有方法 实例方法 抽象方法 具体方法 
      修饰符和类型 方法 说明
      void close()
      Closes the FileWordReader.
      java.io.File getBaseDir()
      Returns the base directory of this reader, if any.
      java.net.URL getBaseURL()
      Returns the base URL of this reader, if any.
      void includeWordReader​(WordReader newIncludeWordReader)
      Specifies to start reading words from the given WordReader.
      java.lang.String lastComments()
      Returns the comments collected before returning the last word.
      protected abstract java.lang.String lineLocationDescription()
      Returns a readable description of the current WordReader position.
      java.lang.String locationDescription()
      Constructs a readable description of the current position in this WordReader and its included WordReader objects.
      protected abstract java.lang.String nextLine()
      Reads a line from this WordReader, or from one of its active included WordReader objects.
      java.lang.String nextWord​(boolean isFileName, boolean expectSingleFile)
      Reads a word from this WordReader, or from one of its active included WordReader objects.
      void setBaseDir​(java.io.File baseDir)
      Sets the base directory of this reader.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • WordReader

        protected WordReader​(java.io.File baseDir)
        Creates a new WordReader with the given base directory.
      • WordReader

        protected WordReader​(java.net.URL baseURL)
        Creates a new WordReader with the given base URL.
    • 方法详细资料

      • setBaseDir

        public void setBaseDir​(java.io.File baseDir)
        Sets the base directory of this reader.
      • getBaseDir

        public java.io.File getBaseDir()
        Returns the base directory of this reader, if any.
      • getBaseURL

        public java.net.URL getBaseURL()
        Returns the base URL of this reader, if any.
      • includeWordReader

        public void includeWordReader​(WordReader newIncludeWordReader)
        Specifies to start reading words from the given WordReader. When it is exhausted, this WordReader will continue to provide its own words.
        参数:
        newIncludeWordReader - the WordReader that will start reading words.
      • nextWord

        public java.lang.String nextWord​(boolean isFileName,
                                         boolean expectSingleFile)
                                  throws java.io.IOException
        Reads a word from this WordReader, or from one of its active included WordReader objects.
        参数:
        isFileName - return a complete line (or argument), if the word isn't an option (it doesn't start with '-').
        expectSingleFile - if true, the remaining line is expected to be a single file name (excluding path separator), otherwise multiple files might be specified using the path separator.
        返回:
        the read word.
        抛出:
        java.io.IOException
      • lastComments

        public java.lang.String lastComments()
                                      throws java.io.IOException
        Returns the comments collected before returning the last word. Starts collecting new comments.
        返回:
        the collected comments, or null if there weren't any.
        抛出:
        java.io.IOException
      • locationDescription

        public java.lang.String locationDescription()
        Constructs a readable description of the current position in this WordReader and its included WordReader objects.
        返回:
        the description.
      • nextLine

        protected abstract java.lang.String nextLine()
                                              throws java.io.IOException
        Reads a line from this WordReader, or from one of its active included WordReader objects.
        返回:
        the read line.
        抛出:
        java.io.IOException
      • lineLocationDescription

        protected abstract java.lang.String lineLocationDescription()
        Returns a readable description of the current WordReader position.
        返回:
        the description.
      • close

        public void close()
                   throws java.io.IOException
        Closes the FileWordReader.
        抛出:
        java.io.IOException