001package org.eclipse.aether.collection; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022import java.util.List; 023 024import org.eclipse.aether.RepositorySystemSession; 025import org.eclipse.aether.artifact.Artifact; 026import org.eclipse.aether.graph.Dependency; 027 028/** 029 * A context used during dependency collection to update the dependency manager, selector and traverser. 030 * 031 * @see DependencyManager#deriveChildManager(DependencyCollectionContext) 032 * @see DependencyTraverser#deriveChildTraverser(DependencyCollectionContext) 033 * @see DependencySelector#deriveChildSelector(DependencyCollectionContext) 034 * @see VersionFilter#deriveChildFilter(DependencyCollectionContext) 035 * @noimplement This interface is not intended to be implemented by clients. 036 * @noextend This interface is not intended to be extended by clients. 037 */ 038public interface DependencyCollectionContext 039{ 040 041 /** 042 * Gets the repository system session during which the dependency collection happens. 043 * 044 * @return The repository system session, never {@code null}. 045 */ 046 RepositorySystemSession getSession(); 047 048 /** 049 * Gets the artifact whose children are to be processed next during dependency collection. For all nodes but the 050 * root, this is simply shorthand for {@code getDependency().getArtifact()}. In case of the root node however, 051 * {@link #getDependency()} might be {@code null} while the node still has an artifact which serves as its label and 052 * is not to be resolved. 053 * 054 * @return The artifact whose children are going to be processed or {@code null} in case of the root node without 055 * dependency and label. 056 */ 057 Artifact getArtifact(); 058 059 /** 060 * Gets the dependency whose children are to be processed next during dependency collection. 061 * 062 * @return The dependency whose children are going to be processed or {@code null} in case of the root node without 063 * dependency. 064 */ 065 Dependency getDependency(); 066 067 /** 068 * Gets the dependency management information that was contributed by the artifact descriptor of the current 069 * dependency. 070 * 071 * @return The dependency management information, never {@code null}. 072 */ 073 List<Dependency> getManagedDependencies(); 074 075}