Class AbstractSisuIndex

  • Direct Known Subclasses:
    SisuIndex, SisuIndexAPT6

    abstract class AbstractSisuIndex
    extends java.lang.Object
    Skeleton class that generates a qualified class index.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<java.lang.Object,​java.util.Set<java.lang.String>> index  
      (package private) static java.lang.String INDEX_FOLDER  
      (package private) static java.lang.String NAMED  
      (package private) static java.lang.String QUALIFIER  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addClassToIndex​(java.lang.Object anno, java.lang.Object clazz)
      Adds a new annotated class entry to the index.
      protected void flushIndex()
      Writes the current index as a series of tables.
      protected abstract java.io.Reader getReader​(java.lang.String path)
      Creates a new reader for the given input path.
      protected abstract java.io.Writer getWriter​(java.lang.String path)
      Creates a new writer for the given output path.
      protected abstract void info​(java.lang.String message)
      Reports an informational message.
      private java.util.Set<java.lang.String> readTable​(java.lang.Object name)
      Reads the given index table from disk to memory.
      protected abstract void warn​(java.lang.String message)
      Reports a warning message.
      private void writeTable​(java.lang.Object name, java.util.Set<java.lang.String> table)
      Writes the given index table from memory to disk.
      • Methods inherited from class java.lang.Object

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

      • index

        private final java.util.Map<java.lang.Object,​java.util.Set<java.lang.String>> index
    • Constructor Detail

      • AbstractSisuIndex

        AbstractSisuIndex()
    • Method Detail

      • addClassToIndex

        protected final void addClassToIndex​(java.lang.Object anno,
                                             java.lang.Object clazz)
        Adds a new annotated class entry to the index.
        Parameters:
        anno - The annotation name
        clazz - The class name
      • flushIndex

        protected final void flushIndex()
        Writes the current index as a series of tables.
      • info

        protected abstract void info​(java.lang.String message)
        Reports an informational message.
        Parameters:
        message - The message
      • warn

        protected abstract void warn​(java.lang.String message)
        Reports a warning message.
        Parameters:
        message - The message
      • getReader

        protected abstract java.io.Reader getReader​(java.lang.String path)
                                             throws java.io.IOException
        Creates a new reader for the given input path.
        Parameters:
        path - The input path
        Returns:
        The relevant reader
        Throws:
        java.io.IOException
      • getWriter

        protected abstract java.io.Writer getWriter​(java.lang.String path)
                                             throws java.io.IOException
        Creates a new writer for the given output path.
        Parameters:
        path - The output path
        Returns:
        The relevant writer
        Throws:
        java.io.IOException
      • readTable

        private java.util.Set<java.lang.String> readTable​(java.lang.Object name)
        Reads the given index table from disk to memory.
        Parameters:
        name - The table name
        Returns:
        Table elements
      • writeTable

        private void writeTable​(java.lang.Object name,
                                java.util.Set<java.lang.String> table)
        Writes the given index table from memory to disk.
        Parameters:
        name - The table name
        table - The elements