Class Processor

All Implemented Interfaces:
Processor
Direct Known Subclasses:
ConfigProcessor, CounterProcessor

public abstract class Processor extends AbstractProcessor
abstract processor
  • Constructor Details

    • Processor

      public Processor()
  • Method Details

    • getSupportedSourceVersion

      public SourceVersion getSupportedSourceVersion()
      Specified by:
      getSupportedSourceVersion in interface Processor
      Overrides:
      getSupportedSourceVersion in class AbstractProcessor
    • init

      public void init(ProcessingEnvironment processingEnv)
      Specified by:
      init in interface Processor
      Overrides:
      init in class AbstractProcessor
    • getEnabledPropertyName

      protected abstract String getEnabledPropertyName()
      Get enabled property name.
      Returns:
      enabled property name.
    • getPrintNotesPropertyName

      protected abstract String getPrintNotesPropertyName()
      Get print notes property name.
      Returns:
      print notes property name.
    • getFailOnErrorPropertyName

      protected abstract String getFailOnErrorPropertyName()
      Get fail on error property name.
      Returns:
      fail on error property name.
    • doProcess

      protected abstract void doProcess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
      Process annotations.
      Parameters:
      annotations - to be processed.
      roundEnv - environment info.
    • process

      public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
      Specified by:
      process in interface Processor
      Specified by:
      process in class AbstractProcessor
    • getDocComment

      protected String getDocComment(Element element)
      Get doc comment.
      Parameters:
      element - element.
      Returns:
      comment.
    • error

      protected void error(String errMsg)
      On error hook.
      Parameters:
      errMsg - string.
    • error

      protected void error(String errMsg, Element element)
      Error hook with extra context.
      Parameters:
      errMsg - message.
      element - element.
    • note

      protected void note(String msg)
      Add a note.
      Parameters:
      msg - note.
    • note

      protected void note(String msg, Element element)
      Add note to an element.
      Parameters:
      msg - note.
      element - element.