001package org.eclipse.aether.util.graph.transformer;
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
022/**
023 * A collection of keys used by the dependency graph transformers when exchanging information via the graph
024 * transformation context.
025 * 
026 * @see org.eclipse.aether.collection.DependencyGraphTransformationContext#get(Object)
027 */
028public final class TransformationContextKeys
029{
030
031    /**
032     * The key in the graph transformation context where a {@code Map<DependencyNode, Object>} is stored which maps
033     * dependency nodes to their conflict ids. All nodes that map to an equal conflict id belong to the same group of
034     * conflicting dependencies. Note that the map keys use reference equality.
035     * 
036     * @see ConflictMarker
037     */
038    public static final Object CONFLICT_IDS = "conflictIds";
039
040    /**
041     * The key in the graph transformation context where a {@code List<Object>} is stored that denotes a topological
042     * sorting of the conflict ids.
043     * 
044     * @see ConflictIdSorter
045     */
046    public static final Object SORTED_CONFLICT_IDS = "sortedConflictIds";
047
048    /**
049     * The key in the graph transformation context where a {@code Collection<Collection<Object>>} is stored that denotes
050     * cycles among conflict ids. Each element in the outer collection denotes one cycle, i.e. if the collection is
051     * empty, the conflict ids have no cyclic dependencies.
052     * 
053     * @see ConflictIdSorter
054     */
055    public static final Object CYCLIC_CONFLICT_IDS = "cyclicConflictIds";
056
057    /**
058     * The key in the graph transformation context where a {@code Map<String, Object>} is stored that can be used to
059     * include some runtime/performance stats in the debug log. If this map is not present, no stats should be recorded.
060     */
061    public static final Object STATS = "stats";
062
063    private TransformationContextKeys()
064    {
065        // hide constructor
066    }
067
068}