Class TypeVariableSubstitutor.Visitor
- java.lang.Object
-
- org.checkerframework.framework.type.AnnotatedTypeCopier
-
- org.checkerframework.framework.type.TypeVariableSubstitutor.Visitor
-
- All Implemented Interfaces:
AnnotatedTypeVisitor<AnnotatedTypeMirror,java.util.IdentityHashMap<AnnotatedTypeMirror,AnnotatedTypeMirror>>
- Enclosing class:
- TypeVariableSubstitutor
protected class TypeVariableSubstitutor.Visitor extends AnnotatedTypeCopier
Visitor that makes the substitution. This is an inner class so that its methods cannot be called by clients ofTypeVariableSubstitutor
.
-
-
Field Summary
-
Fields inherited from class org.checkerframework.framework.type.AnnotatedTypeCopier
copyAnnotations, visitingExecutableTypeParam
-
-
Constructor Summary
Constructors Constructor Description Visitor(java.util.Map<javax.lang.model.type.TypeVariable,AnnotatedTypeMirror> typeParamToArg, boolean copyArgument)
Creates the Visitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T extends AnnotatedTypeMirror>
TmakeCopy(T original)
Returns a copy of the given type.AnnotatedTypeMirror
visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable original, java.util.IdentityHashMap<AnnotatedTypeMirror,AnnotatedTypeMirror> originalToCopy)
Visits a type variable.-
Methods inherited from class org.checkerframework.framework.type.AnnotatedTypeCopier
makeOrReturnCopy, maybeCopyPrimaryAnnotations, visit, visit, visitArray, visitDeclared, visitExecutable, visitIntersection, visitNoType, visitNull, visitPrimitive, visitUnion, visitWildcard
-
-
-
-
Constructor Detail
-
Visitor
public Visitor(java.util.Map<javax.lang.model.type.TypeVariable,AnnotatedTypeMirror> typeParamToArg, boolean copyArgument)
Creates the Visitor.- Parameters:
typeParamToArg
- mapping from TypeVariable to the AnnotatedTypeMirror that will replace itcopyArgument
- whether or not a copy of type argument should be substituted
-
-
Method Detail
-
makeCopy
protected <T extends AnnotatedTypeMirror> T makeCopy(T original)
Description copied from class:AnnotatedTypeCopier
Returns a copy of the given type.- Overrides:
makeCopy
in classAnnotatedTypeCopier
- Type Parameters:
T
- the type of the AnnotatedTypeMirror to copy- Parameters:
original
- an AnnotatedTypeMirror (more specifically, aT
)- Returns:
- a copy of the given AnnotatedTypeMirror
-
visitTypeVariable
public AnnotatedTypeMirror visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable original, java.util.IdentityHashMap<AnnotatedTypeMirror,AnnotatedTypeMirror> originalToCopy)
Description copied from interface:AnnotatedTypeVisitor
Visits a type variable.- Specified by:
visitTypeVariable
in interfaceAnnotatedTypeVisitor<AnnotatedTypeMirror,java.util.IdentityHashMap<AnnotatedTypeMirror,AnnotatedTypeMirror>>
- Overrides:
visitTypeVariable
in classAnnotatedTypeCopier
- Parameters:
original
- the type to visitoriginalToCopy
- a visitor-specified parameter- Returns:
- a visitor-specified result
-
-