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 SummaryConstructors
- 
Method SummaryModifier 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- 
DefaultAnnotationFormatterpublic DefaultAnnotationFormatter()
 
- 
- 
Method Details- 
isInvisibleQualifiedReturns 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 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:
 
- 
formatAnnotationMirrorReturns the string representation of a single AnnotationMirror, without showing full package names.- Specified by:
- formatAnnotationMirrorin interface- AnnotationFormatter
- Parameters:
- anno- the annotation mirror to convert
- Returns:
- the string representation of a single AnnotationMirror, without showing full package names
 
- 
formatAnnotationMirrorA helper method to output a single AnnotationMirror, without showing full package names.
- 
formatAnnotationMirrorArg
 
-