Class ComponentProcessor

java.lang.Object
javax.annotation.processing.AbstractProcessor
me.gilbva.shrike.utils.ClassListPropertyFile
me.gilbva.shrike.processor.ComponentProcessor
All Implemented Interfaces:
javax.annotation.processing.Processor

@SupportedAnnotationTypes("me.gilbva.shrike.annotations.Component")
@SupportedSourceVersion(RELEASE_11)
public class ComponentProcessor
extends ClassListPropertyFile
Annotations processor for the Component annotation.
Author:
Gilberto Vento
  • Field Summary

    Fields inherited from class javax.annotation.processing.AbstractProcessor

    processingEnv
  • Constructor Summary

    Constructors 
    Constructor Description
    ComponentProcessor()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getFileName()
    Gets the name for the file that will be written by this annotation processor.
    void processElement​(javax.lang.model.element.Element element)
    This method will be called for each component class found by this processor.

    Methods inherited from class me.gilbva.shrike.utils.ClassListPropertyFile

    appendProperty, init, process

    Methods inherited from class javax.annotation.processing.AbstractProcessor

    getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, isInitialized

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getFileName

      public java.lang.String getFileName()
      Description copied from class: ClassListPropertyFile
      Gets the name for the file that will be written by this annotation processor.
      Specified by:
      getFileName in class ClassListPropertyFile
      Returns:
      The name of the file for this annotation processor.
    • processElement

      public void processElement​(javax.lang.model.element.Element element) throws java.io.IOException
      Description copied from class: ClassListPropertyFile
      This method will be called for each component class found by this processor. the implementation of this method must call the appendClass method to write the component reference to de file.
      Specified by:
      processElement in class ClassListPropertyFile
      Parameters:
      element - The element representing the current component class.
      Throws:
      java.io.IOException - If the component cannot be written to the file.