Interface AutoEntryProcessor

All Known Implementing Classes:
FactoryAutoEntryProcessor, ProvidesAutoEntryProcessor

@API(status=STABLE, since="3.0") public interface AutoEntryProcessor
A processor for a specific auto annotation. When, during an annotation processing round, an element with the supported annotation of this processor is found, this processor is invoked. It can, based on the given elements, emit information into the provided data output which can be used for deserialization in runtime.
Since:
3.0
  • Method Details

    • handledAnnotation

      @NotNull @NotNull Class<? extends Annotation> handledAnnotation()
      Get the annotation type that is handled by this auto entry processor.
      Returns:
      the annotation type that is handled by this auto entry processor.
    • emitEntries

      void emitEntries(@NotNull @NotNull DataOutput output, @NotNull @NotNull Collection<? extends Element> annotatedElements) throws IOException
      Called if elements annotated with the handled annotations are found in a processing round. Based on the elements the processor can write none, one or multiple entries into the given data output which will be available in runtime for deserialization.
      Parameters:
      output - the output to write serialized data about the annotated elements into.
      annotatedElements - the elements that are annotated with the handled annotation.
      Throws:
      IOException - if an I/O error occurs while serializing the information into the data output.