Class AnnotationSource


  • public class AnnotationSource
    extends java.lang.Object
    Static methods for annotation-related source-code generation.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AnnotationSource()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addSource​(SourceBuilder code, javax.lang.model.element.AnnotationMirror annotation)
      Adds a source-code representation of annotation to .
      private static boolean hasSingleValueWithDefaultKey​(javax.lang.model.element.AnnotationMirror annotation)
      Returns true if annotation has a single element named "value", letting us drop the 'value=' prefix in the source code.
      • Methods inherited from class java.lang.Object

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

      • AnnotationSource

        private AnnotationSource()
    • Method Detail

      • addSource

        public static void addSource​(SourceBuilder code,
                                     javax.lang.model.element.AnnotationMirror annotation)
        Adds a source-code representation of annotation to .
      • hasSingleValueWithDefaultKey

        private static boolean hasSingleValueWithDefaultKey​(javax.lang.model.element.AnnotationMirror annotation)
        Returns true if annotation has a single element named "value", letting us drop the 'value=' prefix in the source code.