Class AnnotatedTypeCopierWithReplacement.Visitor

java.lang.Object
org.checkerframework.framework.type.AnnotatedTypeCopier
org.checkerframework.framework.type.AnnotatedTypeCopierWithReplacement.Visitor
All Implemented Interfaces:
AnnotatedTypeVisitor<AnnotatedTypeMirror,IdentityHashMap<AnnotatedTypeMirror,AnnotatedTypeMirror>>
Enclosing class:
AnnotatedTypeCopierWithReplacement

protected static class AnnotatedTypeCopierWithReplacement.Visitor extends AnnotatedTypeCopier
AnnotatedTypeCopier maintains a mapping of typeVisited => copyOfTypeVisited When a reference, typeVisited, is encountered again, it will use the recorded reference, copyOfTypeVisited, instead of generating a new copy of typeVisited. Visitor pre-populates this mapping so that references are replaced not by their copies but by those in the replacementMap provided in the constructor.

All types NOT in the replacement map are duplicated as per AnnotatedTypeCopier.visit