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