Class AptReaderSource

  • All Implemented Interfaces:
    AptSource

    public class AptReaderSource
    extends java.lang.Object
    implements AptSource
    Reader for apt source documents.
    Version:
    $Id$
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int lineNumber
      lineNumber.
      private java.lang.String name
      The name, e.g.
      private java.io.LineNumberReader reader
      A reader.
    • Constructor Summary

      Constructors 
      Constructor Description
      AptReaderSource​(java.io.Reader in)
      Constructor: initialize reader.
      AptReaderSource​(java.io.Reader in, java.lang.String name)
      Constructor: initialize reader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes the reader associated with this AptReaderSource.
      int getLineNumber()
      Gets the current line number while parsing the document.
      java.lang.String getName()
      Returns the name the apt source document.
      java.lang.String getNextLine()
      Returns a line of the apt source document.
      • Methods inherited from class java.lang.Object

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

      • reader

        private java.io.LineNumberReader reader
        A reader.
      • lineNumber

        private int lineNumber
        lineNumber.
      • name

        private java.lang.String name
        The name, e.g. the filename.
    • Constructor Detail

      • AptReaderSource

        public AptReaderSource​(java.io.Reader in)
        Constructor: initialize reader.
        Parameters:
        in - the reader.
      • AptReaderSource

        public AptReaderSource​(java.io.Reader in,
                               java.lang.String name)
        Constructor: initialize reader.
        Parameters:
        in - the reader.
        name - the name of the source
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name the apt source document.
        Specified by:
        getName in interface AptSource
        Returns:
        the name the apt source document.
      • getLineNumber

        public int getLineNumber()
        Gets the current line number while parsing the document.
        Specified by:
        getLineNumber in interface AptSource
        Returns:
        the line number.
      • close

        public void close()
        Closes the reader associated with this AptReaderSource.