From 55fe94a93ef48464529ba2f9292239deb5d87812 Mon Sep 17 00:00:00 2001 From: Andrei Arlou Date: Sun, 22 Sep 2019 10:50:38 +0300 Subject: [PATCH] #1914 Remove unused method Type.isAnnotatedWith (#1915) --- .../ap/internal/model/common/Type.java | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/processor/src/main/java/org/mapstruct/ap/internal/model/common/Type.java b/processor/src/main/java/org/mapstruct/ap/internal/model/common/Type.java index 9aa996e7e..c21906f68 100644 --- a/processor/src/main/java/org/mapstruct/ap/internal/model/common/Type.java +++ b/processor/src/main/java/org/mapstruct/ap/internal/model/common/Type.java @@ -14,12 +14,10 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Stream; -import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.Modifier; -import javax.lang.model.element.Name; import javax.lang.model.element.TypeElement; import javax.lang.model.element.VariableElement; import javax.lang.model.type.DeclaredType; @@ -380,24 +378,6 @@ public class Type extends ModelElement implements Comparable { return this.qualifiedName.equals( fqn ); } - /** - * @param annotationTypeName the fully qualified name of the annotation type - * - * @return true, if the type is annotated with an annotation of the specified type (super-types are not inspected) - */ - public boolean isAnnotatedWith(String annotationTypeName) { - List annotationMirrors = typeElement.getAnnotationMirrors(); - - for ( AnnotationMirror mirror : annotationMirrors ) { - Name mirrorAnnotationName = ( (TypeElement) mirror.getAnnotationType().asElement() ).getQualifiedName(); - if ( mirrorAnnotationName.contentEquals( annotationTypeName ) ) { - return true; - } - } - - return false; - } - public Type erasure() { return new Type( typeUtils,