Class DefaultAnnotationFormatter

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String formatAnnotationMirror​(javax.lang.model.element.AnnotationMirror anno)
      Returns the string representation of a single AnnotationMirror, without showing full package names.
      java.lang.String formatAnnotationString​(java.util.Collection<? extends javax.lang.model.element.AnnotationMirror> annos, boolean printInvisible)
      Creates a String of each annotation in annos separated by a single space character and terminated by a space character, obeying the printInvisible parameter.
      static boolean isInvisibleQualified​(javax.lang.model.element.AnnotationMirror anno)
      Returns true if, by default, anno should not be printed.
      • Methods inherited from class java.lang.Object

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

      • DefaultAnnotationFormatter

        public DefaultAnnotationFormatter()
    • Method Detail

      • isInvisibleQualified

        public static boolean isInvisibleQualified​(javax.lang.model.element.AnnotationMirror anno)
        Returns true if, by default, anno should not be printed.
        Parameters:
        anno - the annotation mirror to test
        Returns:
        true if anno's declaration was qualified by InvisibleQualifier
        See Also:
        InvisibleQualifier
      • formatAnnotationString

        @SideEffectFree
        public java.lang.String formatAnnotationString​(java.util.Collection<? extends javax.lang.model.element.AnnotationMirror> annos,
                                                       boolean printInvisible)
        Creates a String of each annotation in annos separated by a single space character and terminated by a space character, obeying the printInvisible parameter.
        Specified by:
        formatAnnotationString in interface AnnotationFormatter
        Parameters:
        annos - a collection of annotations to print
        printInvisible - whether or not to print "invisible" annotation mirrors
        Returns:
        the list of annotations converted to a String
        See Also:
        InvisibleQualifier
      • formatAnnotationMirror

        @SideEffectFree
        public java.lang.String formatAnnotationMirror​(javax.lang.model.element.AnnotationMirror anno)
        Returns the string representation of a single AnnotationMirror, without showing full package names.
        Specified by:
        formatAnnotationMirror in interface AnnotationFormatter
        Parameters:
        anno - the annotation mirror to convert
        Returns:
        the string representation of a single AnnotationMirror, without showing full package names