Package org.scijava.annotations
Class DirectoryIndexer
- java.lang.Object
-
- org.scijava.annotations.AbstractIndexWriter
-
- org.scijava.annotations.DirectoryIndexer
-
- Direct Known Subclasses:
EclipseHelper
public class DirectoryIndexer extends AbstractIndexWriter
Indexes a directory of classes.The assumption is that the classes are tested at some stage before packaging. That will be the time when we can index the annotations, even if Eclipse decided not to run any annotation processor.
- Author:
- Johannes Schindelin
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.scijava.annotations.AbstractIndexWriter
AbstractIndexWriter.StreamFactory
-
-
Constructor Summary
Constructors Constructor Description DirectoryIndexer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <A extends Annotation>
voidadd(A annotation, String className)protected voiddiscoverAnnotations(File directory, String classNamePrefix, ClassLoader loader)voidindex(File directory)protected voidwrite(File directory)-
Methods inherited from class org.scijava.annotations.AbstractIndexWriter
adapt, adapt, add, foundAnnotations, merge, write, writeMap
-
-
-
-
Method Detail
-
index
public void index(File directory) throws IOException
- Throws:
IOException
-
discoverAnnotations
protected void discoverAnnotations(File directory, String classNamePrefix, ClassLoader loader) throws IOException
- Throws:
IOException
-
add
protected <A extends Annotation> void add(A annotation, String className)
-
write
protected void write(File directory) throws IOException
- Throws:
IOException
-
-