X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Fgraph%2FDependencyVisitor.java;fp=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Fgraph%2FDependencyVisitor.java;h=d4ba2135b6fca6d11fbe467fc82785e72ba46de7;hb=825d60c5348dbe3f5be25b0bccf7bdebfe694219;hp=0000000000000000000000000000000000000000;hpb=5e991fff5cba01858dcc5747a27e637325bc5c8e;p=gpl%2Fargeo-jcr.git diff --git a/org.argeo.slc.repo/src/org/eclipse/aether/graph/DependencyVisitor.java b/org.argeo.slc.repo/src/org/eclipse/aether/graph/DependencyVisitor.java new file mode 100644 index 0000000..d4ba213 --- /dev/null +++ b/org.argeo.slc.repo/src/org/eclipse/aether/graph/DependencyVisitor.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * 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; + +/** + * A visitor for nodes of the dependency graph. + * + * @see DependencyNode#accept(DependencyVisitor) + */ +public interface DependencyVisitor +{ + + /** + * Notifies the visitor of a node visit before its children have been processed. + * + * @param node The dependency node being visited, must not be {@code null}. + * @return {@code true} to visit child nodes of the specified node as well, {@code false} to skip children. + */ + boolean visitEnter( DependencyNode node ); + + /** + * Notifies the visitor of a node visit after its children have been processed. Note that this method is always + * invoked regardless whether any children have actually been visited. + * + * @param node The dependency node being visited, must not be {@code null}. + * @return {@code true} to visit siblings nodes of the specified node as well, {@code false} to skip siblings. + */ + boolean visitLeave( DependencyNode node ); + +}