Package org.eclipse.sisu.space
Class AbstractSisuIndex
- java.lang.Object
-
- org.eclipse.sisu.space.AbstractSisuIndex
-
- Direct Known Subclasses:
SisuIndex,SisuIndexAPT6
abstract class AbstractSisuIndex extends java.lang.ObjectSkeleton 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.StringINDEX_FOLDER(package private) static java.lang.StringNAMED(package private) static java.lang.StringQUALIFIER
-
Constructor Summary
Constructors Constructor Description AbstractSisuIndex()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddClassToIndex(java.lang.Object anno, java.lang.Object clazz)Adds a new annotated class entry to the index.protected voidflushIndex()Writes the current index as a series of tables.protected abstract java.io.ReadergetReader(java.lang.String path)Creates a new reader for the given input path.protected abstract java.io.WritergetWriter(java.lang.String path)Creates a new writer for the given output path.protected abstract voidinfo(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 voidwarn(java.lang.String message)Reports a warning message.private voidwriteTable(java.lang.Object name, java.util.Set<java.lang.String> table)Writes the given index table from memory to disk.
-
-
-
Field Detail
-
INDEX_FOLDER
static final java.lang.String INDEX_FOLDER
- See Also:
- Constant Field Values
-
QUALIFIER
static final java.lang.String QUALIFIER
- See Also:
- Constant Field Values
-
NAMED
static final java.lang.String NAMED
- See Also:
- Constant Field Values
-
index
private final java.util.Map<java.lang.Object,java.util.Set<java.lang.String>> index
-
-
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 nameclazz- 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.IOExceptionCreates 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.IOExceptionCreates 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 nametable- The elements
-
-