protected static class DefaultAnnotatedTypeFormatter.FormattingVisitor extends Object implements AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
Modifier and Type | Field and Description |
---|---|
protected AnnotationFormatter |
annoFormatter
The object responsible for converting annotations to strings
|
protected boolean |
currentPrintInvisibleSetting
For a given call to format, this setting specifies whether or not to printInvisibles.
|
protected boolean |
currentPrintVerboseGenerics
Prints type variables in a less ambiguous manner using [] to delimit them.
|
protected boolean |
defaultInvisiblesSetting
Represents whether or not invisible annotations should be printed if the client of this
class does not use the printInvisibleAnnos parameter
|
protected boolean |
defaultPrintVerboseGenerics
Default value of currentPrintVerboseGenerics
|
Constructor and Description |
---|
FormattingVisitor(AnnotationFormatter annoFormatter,
boolean printVerboseGenerics,
boolean defaultInvisiblesSetting) |
protected final AnnotationFormatter annoFormatter
protected final boolean defaultInvisiblesSetting
protected boolean currentPrintInvisibleSetting
protected final boolean defaultPrintVerboseGenerics
protected boolean currentPrintVerboseGenerics
public FormattingVisitor(AnnotationFormatter annoFormatter, boolean printVerboseGenerics, boolean defaultInvisiblesSetting)
protected void setVerboseSettings(boolean printVerbose)
protected void resetPrintVerboseSettings()
@SideEffectFree protected void printBound(String keyWord, AnnotatedTypeMirror field, Set<AnnotatedTypeMirror> visiting, StringBuilder sb)
@SideEffectFree public String visit(AnnotatedTypeMirror type)
AnnotatedTypeVisitor
v.visit(t, null)
.visit
in interface AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
type
- the type to visitpublic String visit(AnnotatedTypeMirror type, Set<AnnotatedTypeMirror> annotatedTypeVariables)
AnnotatedTypeVisitor
visit
in interface AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
type
- the type to visitannotatedTypeVariables
- a visitor-specified parameterpublic String visitDeclared(AnnotatedTypeMirror.AnnotatedDeclaredType type, Set<AnnotatedTypeMirror> visiting)
AnnotatedTypeVisitor
visitDeclared
in interface AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
type
- the type to visitvisiting
- a visitor-specified parameterpublic String visitIntersection(AnnotatedTypeMirror.AnnotatedIntersectionType type, Set<AnnotatedTypeMirror> visiting)
AnnotatedTypeVisitor
visitIntersection
in interface AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
type
- the type to visitvisiting
- a visitor-specified parameterpublic String visitUnion(AnnotatedTypeMirror.AnnotatedUnionType type, Set<AnnotatedTypeMirror> visiting)
AnnotatedTypeVisitor
visitUnion
in interface AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
type
- the type to visitvisiting
- a visitor-specified parameterpublic String visitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType type, Set<AnnotatedTypeMirror> visiting)
AnnotatedTypeVisitor
visitExecutable
in interface AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
type
- the type to visitvisiting
- a visitor-specified parameterpublic String visitArray(AnnotatedTypeMirror.AnnotatedArrayType type, Set<AnnotatedTypeMirror> visiting)
AnnotatedTypeVisitor
visitArray
in interface AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
type
- the type to visitvisiting
- a visitor-specified parameterpublic String visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable type, Set<AnnotatedTypeMirror> visiting)
AnnotatedTypeVisitor
visitTypeVariable
in interface AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
type
- the type to visitvisiting
- a visitor-specified parameter@SideEffectFree public String visitPrimitive(AnnotatedTypeMirror.AnnotatedPrimitiveType type, Set<AnnotatedTypeMirror> visiting)
AnnotatedTypeVisitor
visitPrimitive
in interface AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
type
- the type to visitvisiting
- a visitor-specified parameter@SideEffectFree public String visitNoType(AnnotatedTypeMirror.AnnotatedNoType type, Set<AnnotatedTypeMirror> visiting)
AnnotatedTypeVisitor
visitNoType
in interface AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
type
- the type to visitvisiting
- a visitor-specified parameter@SideEffectFree public String visitNull(AnnotatedTypeMirror.AnnotatedNullType type, Set<AnnotatedTypeMirror> visiting)
AnnotatedTypeVisitor
null
type.visitNull
in interface AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
type
- the type to visitvisiting
- a visitor-specified parameterpublic String visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType type, Set<AnnotatedTypeMirror> visiting)
AnnotatedTypeVisitor
visitWildcard
in interface AnnotatedTypeVisitor<String,Set<AnnotatedTypeMirror>>
type
- the type to visitvisiting
- a visitor-specified parameter@SideEffectFree protected String formatFlatType(AnnotatedTypeMirror flatType)