Package org.checkerframework.javacutil
Class DefaultAnnotationFormatter
java.lang.Object
org.checkerframework.javacutil.DefaultAnnotationFormatter
- All Implemented Interfaces:
 AnnotationFormatter
- Direct Known Subclasses:
 UnitsAnnotatedTypeFormatter.UnitsAnnotationFormatter
A utility for converting AnnotationMirrors to Strings. It omits full package names.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionReturns the string representation of a single AnnotationMirror, without showing full package names.protected voidA helper method to output a single AnnotationMirror, without showing full package names.protected voidformatAnnotationString(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 booleanReturns 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- an annotation to check for printability/invisibility- 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:
 formatAnnotationStringin 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:
 formatAnnotationMirrorin interfaceAnnotationFormatter- Parameters:
 anno- the annotation mirror to convert- Returns:
 - the string representation of a single AnnotationMirror, without showing full package names
 
 - 
formatAnnotationMirror
A helper method to output a single AnnotationMirror, without showing full package names. - 
formatAnnotationMirrorArg
 
 -