boolean (AnnotationExprent typeAnnotationExpr) { Type type = getType(); if (type == null) return false; // when there is no type reference no collision is possible Set<AnnotationExprent> typeAnnotations = TargetInfo.EmptyTarget.extract(getPossibleTypeAnnotationCollisions(type)) .stream() .map(typeAnnotation-> typeAnnotation.getAnnotationExpr()) .collect(Collectors.toUnmodifiableSet()); return typeAnnotations.contains(typeAnnotationExpr); }