/** * {@inheritDoc} */ public TypeList asTypeList() { List<TypeDescription> annotationTypes = new ArrayList<TypeDescription>(size()); for (AnnotationDescription annotation : this) { annotationTypes.add(annotation.getAnnotationType()); } return new TypeList.Explicit(annotationTypes); }
/** * {@inheritDoc} */ public AnnotationList inherited(Set<? extends TypeDescription> ignoredTypes) { List<AnnotationDescription> inherited = new ArrayList<AnnotationDescription>(size()); for (AnnotationDescription annotation : this) { if (!ignoredTypes.contains(annotation.getAnnotationType()) && annotation.isInherited()) { inherited.add(annotation); } } return wrap(inherited); }
/** * {@inheritDoc} */ public AnnotationList visibility(ElementMatcher<? super RetentionPolicy> matcher) { List<AnnotationDescription> annotationDescriptions = new ArrayList<AnnotationDescription>(size()); for (AnnotationDescription annotation : this) { if (matcher.matches(annotation.getRetention())) { annotationDescriptions.add(annotation); } } return wrap(annotationDescriptions); }