Class AtlCodeReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Readable

    public class AtlCodeReader
    extends SingleCharReader
    Reads from a document either forwards or backwards. May be configured to skip comments and strings.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int EOF  
      • Fields inherited from class java.io.Reader

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      AtlCodeReader()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      void configureBackwardReader​(org.eclipse.jface.text.IDocument document, int offset, boolean skipComments, boolean skipStrings)  
      void configureForwardReader​(org.eclipse.jface.text.IDocument document, int offset, int length, boolean skipComments, boolean skipStrings)  
      int getOffset()
      Returns the offset of the last read character.
      int read()  
      • Methods inherited from class java.io.Reader

        mark, markSupported, nullReader, read, read, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • AtlCodeReader

        public AtlCodeReader()
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class java.io.Reader
        Throws:
        java.io.IOException
        See Also:
        Reader.close()
      • configureBackwardReader

        public void configureBackwardReader​(org.eclipse.jface.text.IDocument document,
                                            int offset,
                                            boolean skipComments,
                                            boolean skipStrings)
      • configureForwardReader

        public void configureForwardReader​(org.eclipse.jface.text.IDocument document,
                                           int offset,
                                           int length,
                                           boolean skipComments,
                                           boolean skipStrings)
      • getOffset

        public int getOffset()
        Returns the offset of the last read character. Should only be called after read has been called.
      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.Reader
        Throws:
        java.io.IOException