X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Fgraph%2FDependencyFilter.java;fp=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Fgraph%2FDependencyFilter.java;h=c776ddc197719d5aee7103aed2c626e12f08a5a6;hb=825d60c5348dbe3f5be25b0bccf7bdebfe694219;hp=0000000000000000000000000000000000000000;hpb=5e991fff5cba01858dcc5747a27e637325bc5c8e;p=gpl%2Fargeo-jcr.git diff --git a/org.argeo.slc.repo/src/org/eclipse/aether/graph/DependencyFilter.java b/org.argeo.slc.repo/src/org/eclipse/aether/graph/DependencyFilter.java new file mode 100644 index 0000000..c776ddc --- /dev/null +++ b/org.argeo.slc.repo/src/org/eclipse/aether/graph/DependencyFilter.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright (c) 2010, 2011 Sonatype, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Sonatype, Inc. - initial API and implementation + *******************************************************************************/ +package org.eclipse.aether.graph; + +import java.util.List; + +/** + * A filter to include/exclude dependency nodes during other operations. + */ +public interface DependencyFilter +{ + + /** + * Indicates whether the specified dependency node shall be included or excluded. + * + * @param node The dependency node to filter, must not be {@code null}. + * @param parents The (read-only) chain of parent nodes that leads to the node to be filtered, must not be + * {@code null}. Iterating this (possibly empty) list walks up the dependency graph towards the root + * node, i.e. the immediate parent node (if any) is the first node in the list. The size of the list also + * denotes the zero-based depth of the filtered node. + * @return {@code true} to include the dependency node, {@code false} to exclude it. + */ + boolean accept( DependencyNode node, List parents ); + +}