Class GenerateSqlObjectProcessor

  • All Implemented Interfaces:
    javax.annotation.processing.Processor

    @SupportedAnnotationTypes("org.jdbi.v3.sqlobject.GenerateSqlObject")
    public class GenerateSqlObjectProcessor
    extends javax.annotation.processing.AbstractProcessor
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.Set<javax.lang.model.element.ElementKind> ACCEPTABLE_ELEMENT_TYPES  
      private javax.lang.model.util.Elements elementUtils  
      private javax.annotation.processing.Filer filer  
      static java.lang.String GENERATE_SQL_OBJECT_ANNOTATION_NAME  
      private javax.annotation.processing.Messager messager  
      private javax.lang.model.util.Types typeUtils  
      • Fields inherited from class javax.annotation.processing.AbstractProcessor

        processingEnv
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private javax.lang.model.element.ExecutableElement forMethod​(java.lang.Class<?> klass, java.lang.String name)  
      private void generateSourceFile​(javax.lang.model.element.Element element)  
      private static java.lang.String getImplementationClassName​(javax.lang.model.element.TypeElement typeElement)  
      javax.lang.model.SourceVersion getSupportedSourceVersion()  
      void init​(javax.annotation.processing.ProcessingEnvironment processingEnv)  
      boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)  
      • Methods inherited from class javax.annotation.processing.AbstractProcessor

        getCompletions, getSupportedAnnotationTypes, getSupportedOptions, isInitialized
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • GENERATE_SQL_OBJECT_ANNOTATION_NAME

        public static final java.lang.String GENERATE_SQL_OBJECT_ANNOTATION_NAME
        See Also:
        Constant Field Values
      • ACCEPTABLE_ELEMENT_TYPES

        private static final java.util.Set<javax.lang.model.element.ElementKind> ACCEPTABLE_ELEMENT_TYPES
      • elementUtils

        private javax.lang.model.util.Elements elementUtils
      • typeUtils

        private javax.lang.model.util.Types typeUtils
      • filer

        private javax.annotation.processing.Filer filer
      • messager

        private javax.annotation.processing.Messager messager
    • Constructor Detail

      • GenerateSqlObjectProcessor

        public GenerateSqlObjectProcessor()
    • Method Detail

      • getSupportedSourceVersion

        public javax.lang.model.SourceVersion getSupportedSourceVersion()
        Specified by:
        getSupportedSourceVersion in interface javax.annotation.processing.Processor
        Overrides:
        getSupportedSourceVersion in class javax.annotation.processing.AbstractProcessor
      • init

        public void init​(javax.annotation.processing.ProcessingEnvironment processingEnv)
        Specified by:
        init in interface javax.annotation.processing.Processor
        Overrides:
        init in class javax.annotation.processing.AbstractProcessor
      • process

        public boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations,
                               javax.annotation.processing.RoundEnvironment roundEnv)
        Specified by:
        process in interface javax.annotation.processing.Processor
        Specified by:
        process in class javax.annotation.processing.AbstractProcessor
      • generateSourceFile

        private void generateSourceFile​(javax.lang.model.element.Element element)
      • forMethod

        private javax.lang.model.element.ExecutableElement forMethod​(java.lang.Class<?> klass,
                                                                     java.lang.String name)
      • getImplementationClassName

        private static java.lang.String getImplementationClassName​(javax.lang.model.element.TypeElement typeElement)