org.scijava.annotations
Class DirectoryIndexer

java.lang.Object
  extended by org.scijava.annotations.AbstractIndexWriter
      extended by 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
DirectoryIndexer()
           
 
Method Summary
protected
<A extends Annotation>
void
add(A annotation, String className)
           
protected  void discoverAnnotations(File directory, String classNamePrefix, ClassLoader loader)
           
 void index(File directory)
           
protected  void write(File directory)
           
 
Methods inherited from class org.scijava.annotations.AbstractIndexWriter
adapt, adapt, add, foundAnnotations, merge, write, writeMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryIndexer

public DirectoryIndexer()
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


Copyright © 2009–2014 SciJava. All rights reserved.