Class AnnotationOutput


  • final class AnnotationOutput
    extends java.lang.Object
    Handling of default values for annotation members.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AnnotationOutput()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void appendEscaped​(java.lang.StringBuilder sb, char c)  
      private static java.lang.StringBuilder appendQuoted​(java.lang.StringBuilder sb, char c)  
      private static java.lang.StringBuilder appendQuoted​(java.lang.StringBuilder sb, java.lang.String s)  
      (package private) static java.lang.String sourceFormForAnnotation​(javax.lang.model.element.AnnotationMirror annotationMirror)
      Returns a string representation of the given annotation mirror, suitable for inclusion in a Java source file to reproduce the annotation in source form.
      (package private) static java.lang.String sourceFormForInitializer​(javax.lang.model.element.AnnotationValue annotationValue, javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.String memberName, javax.lang.model.element.Element context)
      Returns a string representation of the given annotation value, suitable for inclusion in a Java source file as the initializer of a variable of the appropriate type.
      • Methods inherited from class java.lang.Object

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

      • AnnotationOutput

        private AnnotationOutput()
    • Method Detail

      • sourceFormForInitializer

        static java.lang.String sourceFormForInitializer​(javax.lang.model.element.AnnotationValue annotationValue,
                                                         javax.annotation.processing.ProcessingEnvironment processingEnv,
                                                         java.lang.String memberName,
                                                         javax.lang.model.element.Element context)
        Returns a string representation of the given annotation value, suitable for inclusion in a Java source file as the initializer of a variable of the appropriate type.
      • sourceFormForAnnotation

        static java.lang.String sourceFormForAnnotation​(javax.lang.model.element.AnnotationMirror annotationMirror)
        Returns a string representation of the given annotation mirror, suitable for inclusion in a Java source file to reproduce the annotation in source form.
      • appendQuoted

        private static java.lang.StringBuilder appendQuoted​(java.lang.StringBuilder sb,
                                                            java.lang.String s)
      • appendQuoted

        private static java.lang.StringBuilder appendQuoted​(java.lang.StringBuilder sb,
                                                            char c)
      • appendEscaped

        private static void appendEscaped​(java.lang.StringBuilder sb,
                                          char c)