Class DefaultAnnotationFormatter
java.lang.Object
org.checkerframework.framework.util.DefaultAnnotationFormatter
- All Implemented Interfaces:
AnnotationFormatter
- Direct Known Subclasses:
UnitsAnnotatedTypeFormatter.UnitsAnnotationFormatter
A utility for converting AnnotationMirrors to Strings. It omits full package names.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the string representation of a single AnnotationMirror, without showing full package names.formatAnnotationString
(Collection<? extends 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
Returns true if, by default, anno should not be printed.
-
Constructor Details
-
DefaultAnnotationFormatter
public DefaultAnnotationFormatter()
-
-
Method Details
-
isInvisibleQualified
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:
-
formatAnnotationString
@SideEffectFree public String formatAnnotationString(Collection<? extends 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 interfaceAnnotationFormatter
- Parameters:
annos
- a collection of annotations to printprintInvisible
- whether or not to print "invisible" annotation mirrors- Returns:
- the list of annotations converted to a String
- See Also:
-
formatAnnotationMirror
Returns the string representation of a single AnnotationMirror, without showing full package names.- Specified by:
formatAnnotationMirror
in interfaceAnnotationFormatter
- Parameters:
anno
- the annotation mirror to convert- Returns:
- the string representation of a single AnnotationMirror, without showing full package names
-