Applies the exclude filter to the found annotations.

@param allAnnotations
all annotations
@return the filtered annotations if there is a filter defined
771842
private Set<FileAnnotation> applyExcludeFilter(final Set<FileAnnotation> allAnnotations) {
        Set<FileAnnotation> includedAnnotations;
        if (includePatterns.isEmpty()) {
            includedAnnotations = allAnnotations;
        }
        else {
            includedAnnotations = Sets.newHashSet();
            for (FileAnnotation annotation : allAnnotations) {
                for (Pattern include : includePatterns) {
                    if (include.matcher(annotation.getFileName()).matches()) {
                        includedAnnotations.add(annotation);
                    }
                }
            }
        }
        if (excludePatterns.isEmpty()) {
            return includedAnnotations;
        }
        else {
            Set<FileAnnotation> excludedAnnotations = Sets.newHashSet(includedAnnotations);
            for (FileAnnotation annotation : includedAnnotations) {
                for (Pattern exclude : excludePatterns) {
                    if (exclude.matcher(annotation.getFileName()).matches()) {
                        excludedAnnotations.remove(annotation);
                    }
                }
            }
            return excludedAnnotations;
        }
    }
830382
public static Predicate<Class<?>> isAnnotatedWith(Class<? extends Annotation>... annotations) {
        return clazz -> {
            for (Class<? extends Annotation> annotation : annotations) {
                if (clazz.isAnnotationPresent(annotation)) {
                    return true;
                }
            }
            return false;
        };
    }
571720
public boolean containsRequiredAnnotations(Collection<Class<? extends Annotation>> requiredAnnotations) {
        if (annotatedType instanceof BackedAnnotatedType<?>) {
            return containsAnnotation((BackedAnnotatedType<?>) annotatedType, requiredAnnotations);
        } else if (annotatedType instanceof UnbackedAnnotatedType<?>) {
            return containsAnnotation((UnbackedAnnotatedType<?>) annotatedType, requiredAnnotations);
        } else {
            throw new IllegalArgumentException("Unknown SlimAnnotatedType implementation: " + annotatedType.getClass().toString());
        }
    }
382297
def remove_annotations(self, remove_sequence):
        
        return self._apply_to_annotations(lambda alist: tuple(oa for oa in alist if oa not in remove_sequence))
716656
public List<String> getAnnotations() {
        AnnotationBuilder result = new AnnotationBuilder();
        result.add(getNotNullAnnotation());
        return result.getAnnotations();
    }
679067
protected final FilterArtifacts getFilters(ArtifactsFilter... additionalFilters) {
		FilterArtifacts filters = new FilterArtifacts();
		for (ArtifactsFilter additionalFilter : additionalFilters) {
			filters.addFilter(additionalFilter);
		}
		filters.addFilter(
				new MatchingGroupIdFilter(cleanFilterConfig(this.excludeGroupIds)));
		if (this.includes != null && !this.includes.isEmpty()) {
			filters.addFilter(new IncludeFilter(this.includes));
		}
		if (this.excludes != null && !this.excludes.isEmpty()) {
			filters.addFilter(new ExcludeFilter(this.excludes));
		}
		return filters;
	}
537038
@Override
    public boolean isDeclaredAnnotationWithin(Collection<String> annotationNames) {
        if (declaredAnnotations != null) {
            for (AnnotationInfo annotation : declaredAnnotations) {
                if (annotationNames.contains(annotation.getAnnotationClassName())) {
                    return true;
                }
            }
        }

        return false;
    }
1041727
public static List<Method> getPublicMethods(Class<?> clazz, Method... excludeMethods) {
		final HashSet<Method> excludeMethodSet = CollectionUtil.newHashSet(excludeMethods);
		return getPublicMethods(clazz, new Filter<Method>() {
			@Override
			public boolean accept(Method method) {
				return false == excludeMethodSet.contains(method);
			}
		});
	}
442870
public CmsRelationFilter filterNotDefinedInContent() {

        CmsRelationFilter filter = (CmsRelationFilter)clone();
        if (filter.m_types.isEmpty()) {
            filter.m_types.addAll(CmsRelationType.getAllNotDefinedInContent());
        } else {
            filter.m_types = new HashSet<CmsRelationType>(CmsRelationType.filterNotDefinedInContent(filter.m_types));
        }
        return filter;
    }
35318
@SuppressWarnings("unchecked")
    private void bindAnnotatedFilters() {

        String appsPackages = null;
        if (System.getProperties().containsKey(IO_JOYNR_APPS_PACKAGES)) {
            logger.info("Using property {} from system properties", IO_JOYNR_APPS_PACKAGES);
            appsPackages = System.getProperty(IO_JOYNR_APPS_PACKAGES);
        } else {
            Properties servletProperties = PropertyLoader.loadProperties("servlet.properties");
            if (servletProperties.containsKey(IO_JOYNR_APPS_PACKAGES)) {
                appsPackages = servletProperties.getProperty(IO_JOYNR_APPS_PACKAGES);
            }
        }

        if (appsPackages != null) {
            String[] packageNames = appsPackages.split(";");
            logger.info("Searching packages for @WebFilter annotation: {}", Arrays.toString(packageNames));

            PackageNamesScanner scanner = new PackageNamesScanner(packageNames);
            AnnotationScannerListener sl = new AnnotationScannerListener(WebFilter.class);
            scanner.scan(sl);

            for (Class<?> webFilterAnnotatedClass : sl.getAnnotatedClasses()) {

                if (Filter.class.isAssignableFrom(webFilterAnnotatedClass)) {
                    bind(webFilterAnnotatedClass).in(Singleton.class);
                    filter("/*").through((Class<? extends Filter>) webFilterAnnotatedClass);
                    logger.info("Adding filter {} for '/*'", webFilterAnnotatedClass.getName());
                }

            }
        }
    }
972636
public final List<NarArtifact> getNarArtifacts() throws MojoExecutionException {
    final List<NarArtifact> narDependencies = new LinkedList<>();

    FilterArtifacts filter = new FilterArtifacts();

    filter.addFilter(new GroupIdFilter(cleanToBeTokenizedString(this.includeGroupIds),
        cleanToBeTokenizedString(this.excludeGroupIds)));

    filter.addFilter(new ArtifactIdFilter(cleanToBeTokenizedString(this.includeArtifactIds),
        cleanToBeTokenizedString(this.excludeArtifactIds)));

    filter.addFilter(getArtifactScopeFilter());

    @SuppressWarnings("unchecked")
    Set<Artifact> artifacts = getMavenProject().getArtifacts();

    // perform filtering
    try {
      artifacts = filter.filter(artifacts);
    } catch (ArtifactFilterException e) {
      throw new MojoExecutionException(e.getMessage(), e);
    }

    for (final Object element : artifacts) {
      final Artifact dependency = (Artifact) element;

      if ("nar".equalsIgnoreCase(dependency.getType())) {
        getLog().debug("Examining artifact for NarInfo: " + dependency);

        final NarInfo narInfo = getNarInfo(dependency);
        if (narInfo != null) {
          getLog().debug("    - added as NarDependency");
          narDependencies.add(new NarArtifact(dependency, narInfo));
        }
      }
    }
    getLog().debug("Dependencies contained " + narDependencies.size() + " NAR artifacts.");
    return narDependencies;
  }
1321945
public java.util.List<AssociationFilter> getAssociationFilterList() {
        if (associationFilterList == null) {
            associationFilterList = new com.amazonaws.internal.SdkInternalList<AssociationFilter>();
        }
        return associationFilterList;
    }
1178433
public void registerFilters() {
        if (Clz.classExists("org.n3r.eql.eqler.annotations.Eqler")) {
            addExcludeFilter(new AnnotationTypeFilter(Eqler.class));
            addExcludeFilter(new AnnotationTypeFilter(EqlerConfig.class));
        }

        addIncludeFilter((metadataReader, metadataReaderFactory) -> {
            val metadata = metadataReader.getClassMetadata();
            if (!metadata.isInterface()) return false;

            val className = metadata.getClassName();
            val clazz = Clz.forName(className);
            return Anns.isFastWestCacheAnnotated(clazz);
        });

    }
393159
public static Set<Annotation> getAllAnnotations(final Class<?> cls) {
		List<Class<?>> allTypes = ClassUtil.getAllSuperclasses(cls);
		allTypes.addAll(ClassUtil.getAllInterfaces(cls));
		allTypes.add(cls);

		Set<Annotation> anns = new HashSet<Annotation>();
		for (Class<?> type : allTypes) {
			anns.addAll(Arrays.asList(type.getDeclaredAnnotations()));
		}

		Set<Annotation> superAnnotations = new HashSet<Annotation>();
		for (Annotation ann : anns) {
			getSuperAnnotations(ann.annotationType(), superAnnotations);
		}

		anns.addAll(superAnnotations);

		return anns;
	}
968362
public static Set<Annotation> buildQualifiers(Set<Annotation> annotations) {
        Set<Annotation> qualifiers = new HashSet<Annotation>(annotations);
        if (annotations.isEmpty()) {
            qualifiers.add(DefaultLiteral.INSTANCE);
        }
        qualifiers.add(AnyLiteral.INSTANCE);
        return qualifiers;
    }
1251148
public Set<Method> getMethodsWithAnyParamAnnotated(Annotation annotation) {
        return filter(getMethodsWithAnyParamAnnotated(annotation.annotationType()), withAnyParameterAnnotation(annotation));
    }
1017057
public static List<Link> getLinks(final Collection<Annotation> annotations) {
        final List<Link> result = new ArrayList<>();
        result.addAll(extractLinks(annotations, io.qameta.allure.Link.class, ResultsUtils::createLink));
        result.addAll(extractLinks(annotations, io.qameta.allure.Issue.class, ResultsUtils::createLink));
        result.addAll(extractLinks(annotations, io.qameta.allure.TmsLink.class, ResultsUtils::createLink));
        return result;
    }