Add the Index class to access the annotation indexes

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add unit tests

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a Java 6-compliant annotation processor

This is loosely modeled after the way SezPoz does it, for the obvious
reasons: SezPoz' goals and the goals of this here annotation indexer are
almost the same.

Therefore, this developer learnt a lot from inspecting the source code
of SezPoz' Indexer6 class and then went on to re-implement the part that
inspects the AnnotationMirror instances here.

Since we are building an annotation processor here, we need to switch
off annotation processing during the compilation.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add an integration test for the annotation processor

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a helper for Eclipse

Eclipse is a bit challenged and challenging when it comes to following
the Java standard. For example, in the default mode Eclipse does not run
any annotation processors (as it would be mandated by the Java
specification).

To compensate for this, we simply run a custom annotation processor
whenever we encounter at Index.load() time to handle the case that there
might be some annotation index that is out-of-date.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
EclipseHelper: Support incremental annotation indexing

... which includes removing annotations that are now obsolete...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Verify that inner classes are handled correctly

Test both the directory indexer and the annotation processor (the latter
in the integration test).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Temporarily switch the unit tests to using SezPoz

... to generate legacy annotation indexes.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Copy SezPoz-generated annotations for use in the legacy tests

These were generated by "mvn test" and then copying
target/test-classes/META-INF to src/test/resources/legacy/.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Revert "Temporarily switch the unit tests to using SezPoz"

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Refactor the DirectoryIndexerTest to facilitate testing

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Implement a legacy index reader

Our primary concern is SciJava-common; To maintain backwards
compatibility, we want to support reading annotation indexes created by
SezPoz, just in case one class path component was not switched to the
new annotation indexer yet.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Index: read legacy annotation indexes transparently

We fall back to using legacy annotation indexes now in case no modern
annotation index was found.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>