Class DefaultAnnotatedTypeFormatter
java.lang.Object
org.checkerframework.framework.type.DefaultAnnotatedTypeFormatter
- All Implemented Interfaces:
AnnotatedTypeFormatter
- Direct Known Subclasses:
NullnessAnnotatedTypeFormatter
,UnitsAnnotatedTypeFormatter
An AnnotatedTypeFormatter used by default by all AnnotatedTypeFactory (and therefore all
annotated types).
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
A scanning visitor that prints the entire AnnotatedTypeMirror passed to visit. -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionConstructs a DefaultAnnotatedTypeFormatter that does not print invisible annotations by default.DefaultAnnotatedTypeFormatter
(boolean printVerboseGenerics, boolean defaultPrintInvisibleAnnos) protected
Used by subclasses and other constructors to specify the underlying implementation of this DefaultAnnotatedTypeFormatter.DefaultAnnotatedTypeFormatter
(AnnotationFormatter formatter, boolean printVerboseGenerics, boolean defaultPrintInvisibleAnnos) -
Method Summary
Modifier and TypeMethodDescriptionformat
(AnnotatedTypeMirror type) Formats type into a String.format
(AnnotatedTypeMirror type, boolean printVerbose) Formats type into a String.
-
Field Details
-
formattingVisitor
-
-
Constructor Details
-
DefaultAnnotatedTypeFormatter
public DefaultAnnotatedTypeFormatter()Constructs a DefaultAnnotatedTypeFormatter that does not print invisible annotations by default. -
DefaultAnnotatedTypeFormatter
public DefaultAnnotatedTypeFormatter(boolean printVerboseGenerics, boolean defaultPrintInvisibleAnnos) - Parameters:
printVerboseGenerics
- for type parameters, their uses, and wildcards, print more informationdefaultPrintInvisibleAnnos
- whether or not this AnnotatedTypeFormatter should print invisible annotations
-
DefaultAnnotatedTypeFormatter
public DefaultAnnotatedTypeFormatter(AnnotationFormatter formatter, boolean printVerboseGenerics, boolean defaultPrintInvisibleAnnos) - Parameters:
formatter
- an object that converts annotation mirrors to stringsprintVerboseGenerics
- for type parameters, their uses, and wildcards, print more informationdefaultPrintInvisibleAnnos
- whether or not this AnnotatedTypeFormatter should print invisible annotations
-
DefaultAnnotatedTypeFormatter
Used by subclasses and other constructors to specify the underlying implementation of this DefaultAnnotatedTypeFormatter.
-
-
Method Details
-
format
Description copied from interface:AnnotatedTypeFormatter
Formats type into a String. Uses an implementation specific default for printing "invisible annotations"- Specified by:
format
in interfaceAnnotatedTypeFormatter
- Parameters:
type
- the type to be converted- Returns:
- a string representation of type
- See Also:
-
format
Description copied from interface:AnnotatedTypeFormatter
Formats type into a String.- Specified by:
format
in interfaceAnnotatedTypeFormatter
- Parameters:
type
- the type to be convertedprintVerbose
- whether or not to print verbosely- Returns:
- a string representation of type
- See Also:
-