001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.eclipse.aether.internal.impl.collect; 020 021import java.util.List; 022 023import org.eclipse.aether.collection.CollectStepData; 024import org.eclipse.aether.graph.Dependency; 025import org.eclipse.aether.graph.DependencyNode; 026 027import static java.util.Objects.requireNonNull; 028 029/** 030 * Trace objects for dependency collection. 031 * 032 * @since 1.8.1 033 */ 034public final class CollectStepDataImpl implements CollectStepData { 035 private final String context; 036 037 private final List<DependencyNode> path; 038 039 private final Dependency node; 040 041 public CollectStepDataImpl(final String context, final List<DependencyNode> path, final Dependency node) { 042 this.context = requireNonNull(context); 043 this.path = requireNonNull(path); 044 this.node = requireNonNull(node); 045 } 046 047 @Override 048 public String getContext() { 049 return context; 050 } 051 052 @Override 053 public List<DependencyNode> getPath() { 054 return path; 055 } 056 057 @Override 058 public Dependency getNode() { 059 return node; 060 } 061}