private static Set<String> getSuppressed(List<CustomAnnotation> annos) { Set<String> filters = null; for (CustomAnnotation ca : annos) { String name = ca.getAnnotationType().getSimpleName(); if (!(name.startsWith("Suppress") && name.endsWith("Warning"))) continue; for (AnnotationParameter par : ca.getParameters()) { if (par.getMember().equals("value")) { AnnotationElement ae = par.getValue(); AnnotationElement[] elements = ae instanceof ArrayAnnotationElement ? ((ArrayAnnotationElement) ae) .getElements() : new AnnotationElement[] { ae }; for (AnnotationElement child : elements) { if (child instanceof ConstantAnnotationElement) { Object value = ((ConstantAnnotationElement) child).getConstantValue(); if (value instanceof String) { if (filters == null) filters = new HashSet<>(); filters.add((String) value); } } } } } } return filters == null ? Collections.emptySet() : filters; }
return new ArrayAnnotationElement(elements);
final AstNodeCollection<Expression> elements = initializer.getElements(); for (final AnnotationElement e : arrayElement.getElements()) { elements.add(createAnnotationElement(e));
return new ArrayAnnotationElement(elements);
final AstNodeCollection<Expression> elements = initializer.getElements(); for (final AnnotationElement e : arrayElement.getElements()) { elements.add(createAnnotationElement(e));
return new ArrayAnnotationElement(elements);
final AstNodeCollection<Expression> elements = initializer.getElements(); for (final AnnotationElement e : arrayElement.getElements()) { elements.add(createAnnotationElement(e));
return new ArrayAnnotationElement(elements);
return new ArrayAnnotationElement(elements);
return new ArrayAnnotationElement(elements);