public abstract class AbstractIndexWriter extends Object
The file names are the names of the annotations, and the serialized data describe the class which was annotated together with the specific annotation fields.
Modifier and Type | Class and Description |
---|---|
static interface |
AbstractIndexWriter.StreamFactory |
Constructor and Description |
---|
AbstractIndexWriter() |
Modifier and Type | Method and Description |
---|---|
protected <A extends Annotation> |
adapt(A annotation) |
protected Object |
adapt(Object o) |
protected void |
add(Map<String,Object> annotationValues,
String annotationName,
String className) |
protected boolean |
foundAnnotations() |
protected void |
merge(String annotationName,
AbstractIndexWriter.StreamFactory factory)
Merges an existing annotation index into the currently-generated one.
|
protected void |
write(AbstractIndexWriter.StreamFactory factory) |
protected void |
writeMap(PrintStream out,
Object... pairs) |
protected boolean foundAnnotations()
protected void add(Map<String,Object> annotationValues, String annotationName, String className)
protected void write(AbstractIndexWriter.StreamFactory factory) throws IOException
IOException
protected void merge(String annotationName, AbstractIndexWriter.StreamFactory factory) throws IOException
This method is used to read previously-indexed annotations and reconcile them with the newly-generated ones just.
annotationName
- the name of the annotation for which the index
contains the annotated classesfactory
- the factory to generate input and output streams given an
annotation nameIOException
protected <A extends Annotation> Map<String,Object> adapt(A annotation)
protected void writeMap(PrintStream out, Object... pairs) throws IOException
IOException
Copyright © 2015–2022 SciJava. All rights reserved.