001/** 002 * Logback: the reliable, generic, fast and flexible logging framework. 003 * Copyright (C) 1999-2022, QOS.ch. All rights reserved. 004 * 005 * This program and the accompanying materials are dual-licensed under 006 * either the terms of the Eclipse Public License v1.0 as published by 007 * the Eclipse Foundation 008 * 009 * or (per the licensee's choosing) 010 * 011 * under the terms of the GNU Lesser General Public License version 2.1 012 * as published by the Free Software Foundation. 013 */ 014package ch.qos.logback.core.model.processor; 015 016import ch.qos.logback.core.model.Model; 017 018/** 019 * Defines the relation between a depender (of type Model) and a dependency name (String). 020 * 021 * Note that a depender may have multiple dependencies but 022 * {@link DependencyDefinition} applies to just one dependency relation. 023 * 024 * @author ceki 025 * 026 */ 027public class DependencyDefinition { 028 029 // OLD terminology: depender: a component of type Model which depends on a dependee 030 // NEW terminology: dependent: a component of type Model which depends on a dependency 031 Model depender; 032 // dependee or dependency: the string name of a component depended upon by the depender of type Model 033 String dependency; 034 035 public DependencyDefinition(Model depender, String dependency) { 036 this.depender = depender; 037 this.dependency = dependency; 038 039 040 } 041 042 public String getDependency() { 043 return dependency; 044 } 045 046 public Model getDepender() { 047 return depender; 048 } 049 050 051 @Override 052 public String toString() { 053 return "DependencyDefinition{" + 054 "depender=" + depender + 055 ", dependency='" + dependency + '\'' + 056 '}'; 057 } 058}