Class AnnotatedTypeCopierWithReplacement
java.lang.Object
org.checkerframework.framework.type.AnnotatedTypeCopierWithReplacement
Duplicates annotated types and replaces components according to a replacement map.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic AnnotatedTypeMirror
replace
(AnnotatedTypeMirror type, IdentityHashMap<? extends AnnotatedTypeMirror, ? extends AnnotatedTypeMirror> replacementMap) Return a copy of type after making the specified replacements.
-
Constructor Details
-
AnnotatedTypeCopierWithReplacement
public AnnotatedTypeCopierWithReplacement()
-
-
Method Details
-
replace
public static AnnotatedTypeMirror replace(AnnotatedTypeMirror type, 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
-