Class UnitsAnnotatedTypeFormatter.UnitsAnnotationFormatter
java.lang.Object
org.checkerframework.javacutil.DefaultAnnotationFormatter
org.checkerframework.checker.units.UnitsAnnotatedTypeFormatter.UnitsAnnotationFormatter
- All Implemented Interfaces:
AnnotationFormatter
- Enclosing class:
UnitsAnnotatedTypeFormatter
protected static class UnitsAnnotatedTypeFormatter.UnitsAnnotationFormatter
extends DefaultAnnotationFormatter
Formats the error printout of any units qualifier that uses Prefix.one.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BaseTypeCheckerThe checker that uses this formatter.protected final ElementsThe element utilities. -
Constructor Summary
ConstructorsConstructorDescriptionUnitsAnnotationFormatter(BaseTypeChecker checker) Creates a UnitsAnnotationFormatter. -
Method Summary
Modifier and TypeMethodDescriptionformatAnnotationString(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.Methods inherited from class org.checkerframework.javacutil.DefaultAnnotationFormatter
formatAnnotationMirror, formatAnnotationMirror, formatAnnotationMirrorArg, isInvisibleQualified
-
Field Details
-
checker
The checker that uses this formatter. -
elements
The element utilities.
-
-
Constructor Details
-
UnitsAnnotationFormatter
Creates a UnitsAnnotationFormatter.- Parameters:
checker- the checker that uses this formatter
-
-
Method Details
-
formatAnnotationString
public String formatAnnotationString(Collection<? extends AnnotationMirror> annos, boolean printInvisible) Description copied from class:DefaultAnnotationFormatterCreates 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- Overrides:
formatAnnotationStringin classDefaultAnnotationFormatter- Parameters:
annos- a collection of annotations to printprintInvisible- if true, print "invisible" annotation mirrors- Returns:
- the list of annotations converted to a String
- See Also:
-