Interface AnnotatedTypeVisitor<R,P>
- Type Parameters:
R- the return type of this visitor's methods. Use Void for visitors that do not need to return results.P- the type of the additional parameter to this visitor's methods. Use Void for visitors that do not need an additional parameter.
- All Known Implementing Classes:
AnnotatedTypeCombiner,AnnotatedTypeCopier,AnnotatedTypeCopierWithReplacement.Visitor,AnnotatedTypeReplacer,AnnotatedTypeScanner,BaseTypeValidator,DefaultAnnotatedTypeFormatter.FormattingVisitor,DefaultForTypeAnnotator,DefaultQualifierForUseTypeAnnotator,DoubleAnnotatedTypeScanner,HashcodeAtmVisitor,InitializationAnnotatedTypeFactory.CommitmentTypeAnnotator,IrrelevantTypeAnnotator,ListTypeAnnotator,MustCallTypeAnnotator,NullnessAnnotatedTypeFactory.NullnessTypeAnnotator,NullnessAnnotatedTypeFormatter.NullnessFormattingVisitor,PropagationTypeAnnotator,QualifierDefaults.DefaultApplierElement.DefaultApplierElementImpl,ReportVisitor.ReportTypeValidator,SimpleAnnotatedTypeScanner,SimpleAnnotatedTypeVisitor,TypeAnnotator,TypeVariableSubstitutor.Visitor,UnitsAnnotatedTypeFormatter.UnitsFormattingVisitor
public interface AnnotatedTypeVisitor<R,P>
A visitor of annotated types, in the style of the visitor design pattern.
Classes implementing this interface are used to operate on a type when the kind of type is unknown at compile time. When a visitor is passed to a type's accept method, the visitXYZ method most applicable to that type is invoked.
Classes implementing this interface may or may not throw a NullPointerException if the
additional parameter p is null; see documentation of the implementing class for details.
-
Method Summary
Modifier and TypeMethodDescriptionvisit(AnnotatedTypeMirror type) A convenience method equivalent tov.visit(t, null).visit(AnnotatedTypeMirror type, P p) Visits a type.Visits an array type.Visits a declared type.Visits an executable type.Visits an intersection type.Visits NoType type.Visits anulltype.Visits a primitive type.Visits a type variable.Visits an union type.Visits a wildcard type.
-
Method Details
-
visit
A convenience method equivalent tov.visit(t, null).- Parameters:
type- the type to visit- Returns:
- a visitor-specified result
-
visit
Visits a type.- Parameters:
type- the type to visitp- a visitor-specified parameter- Returns:
- a visitor-specified result
-
visitDeclared
Visits a declared type.- Parameters:
type- the type to visitp- a visitor-specified parameter- Returns:
- a visitor-specified result
-
visitIntersection
Visits an intersection type.- Parameters:
type- the type to visitp- a visitor-specified parameter- Returns:
- a visitor-specified result
-
visitUnion
Visits an union type.- Parameters:
type- the type to visitp- a visitor-specified parameter- Returns:
- a visitor-specified result
-
visitExecutable
Visits an executable type.- Parameters:
type- the type to visitp- a visitor-specified parameter- Returns:
- a visitor-specified result
-
visitArray
Visits an array type.- Parameters:
type- the type to visitp- a visitor-specified parameter- Returns:
- a visitor-specified result
-
visitTypeVariable
Visits a type variable.- Parameters:
type- the type to visitp- a visitor-specified parameter- Returns:
- a visitor-specified result
-
visitPrimitive
Visits a primitive type.- Parameters:
type- the type to visitp- a visitor-specified parameter- Returns:
- a visitor-specified result
-
visitNoType
Visits NoType type.- Parameters:
type- the type to visitp- a visitor-specified parameter- Returns:
- a visitor-specified result
-
visitNull
Visits anulltype.- Parameters:
type- the type to visitp- a visitor-specified parameter- Returns:
- a visitor-specified result
-
visitWildcard
Visits a wildcard type.- Parameters:
type- the type to visitp- a visitor-specified parameter- Returns:
- a visitor-specified result
-