fix: repeatable annotation support fix

This commit is contained in:
zaaarf 2023-03-15 12:07:45 +01:00
parent c46106beba
commit 38dd9ae869
No known key found for this signature in database
GPG key ID: 82240E075E31FA4C
2 changed files with 1 additions and 2 deletions

View file

@ -23,7 +23,6 @@ import javax.tools.StandardLocation;
import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.stream.Collectors;

View file

@ -31,7 +31,7 @@ public class ASTUtils {
public static List<ExecutableElement> findAnnotatedMethods(TypeElement cl, Class<? extends Annotation> ann) {
return cl.getEnclosedElements()
.stream()
.filter(e -> e.getAnnotation(ann) != null)
.filter(e -> e.getAnnotationsByType(ann).length != 0)
.map(e -> (ExecutableElement) e)
.collect(Collectors.toList());
}