Class ServiceProcessor

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

    @SupportedAnnotationTypes("org.jvnet.hk2.annotations.Service")
    @SupportedOptions("org.glassfish.hk2.metadata.location")
    public class ServiceProcessor
    extends javax.annotation.processing.AbstractProcessor
    The entry point for service @Service annotations
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static class  ServiceProcessor.DescriptorComparitor
      This is a comparator making things that don't really compare, compare.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.TreeSet<DescriptorImpl> allDescriptors  
      private static java.lang.String LOCATION_DEFAULT  
      private static java.lang.String LOCATION_OPTION  
      private java.util.ArrayList<javax.lang.model.element.Element> originators  
      • Fields inherited from class javax.annotation.processing.AbstractProcessor

        processingEnv
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void createFile()  
      javax.lang.model.SourceVersion getSupportedSourceVersion()
      Gets rid of warnings and this code should work with all source versions
      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, init, isInitialized
      • Methods inherited from class java.lang.Object

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

      • LOCATION_DEFAULT

        private static final java.lang.String LOCATION_DEFAULT
        See Also:
        Constant Field Values
      • allDescriptors

        private final java.util.TreeSet<DescriptorImpl> allDescriptors
      • originators

        private final java.util.ArrayList<javax.lang.model.element.Element> originators
    • Constructor Detail

      • ServiceProcessor

        public ServiceProcessor()
    • Method Detail

      • 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
      • getSupportedSourceVersion

        public javax.lang.model.SourceVersion getSupportedSourceVersion()
        Gets rid of warnings and this code should work with all source versions
        Specified by:
        getSupportedSourceVersion in interface javax.annotation.processing.Processor
        Overrides:
        getSupportedSourceVersion in class javax.annotation.processing.AbstractProcessor
      • createFile

        private void createFile()
                         throws java.io.IOException
        Throws:
        java.io.IOException