Class AnnotatedTypeCopierWithReplacement
- java.lang.Object
-
- org.checkerframework.framework.type.AnnotatedTypeCopierWithReplacement
-
public class AnnotatedTypeCopierWithReplacement extends java.lang.Object
Duplicates annotated types and replaces components according to a replacement map.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AnnotatedTypeCopierWithReplacement.Visitor
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.
-
Constructor Summary
Constructors Constructor Description AnnotatedTypeCopierWithReplacement()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AnnotatedTypeMirror
replace(AnnotatedTypeMirror type, java.util.IdentityHashMap<? extends AnnotatedTypeMirror,? extends AnnotatedTypeMirror> replacementMap)
Return a copy of type after making the specified replacements.
-
-
-
Method Detail
-
replace
public static AnnotatedTypeMirror replace(AnnotatedTypeMirror type, java.util.IdentityHashMap<? extends AnnotatedTypeMirror,? extends AnnotatedTypeMirror> replacementMap)
Return a copy of type after making the specified replacements.- Parameters:
type
- the type that will be copied with replaced componentsreplacementMap
- a mapping of referenceToReplace => referenceOfReplacement- Returns:
- a duplicate of type in which every reference that was a key in replacementMap has been replaced by its corresponding value
-
-