Class AnnotatedTypeReplacer

All Implemented Interfaces:
AnnotatedTypeVisitor<Void,AnnotatedTypeMirror>

public class AnnotatedTypeReplacer extends DoubleAnnotatedTypeScanner<Void>
Replaces or adds all the annotations in the parameter with the annotations from the visited type. An annotation is replaced if the parameter type already has an annotation in the same hierarchy at the same location as the visited type.

Example use:


 AnnotatedTypeMirror visitType = ...;
 AnnotatedTypeMirror parameter = ...;
 visitType.accept(new AnnotatedTypeReplacer(), parameter);