View Javadoc
1   /*
2    * This file is part of dependency-check-core.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   *
16   * Copyright (c) 2023 Jeremy Long. All Rights Reserved.
17   */
18  package org.owasp.dependencycheck.dependency;
19  
20  import java.io.Serializable;
21  
22  /**
23   * POJO to store a reference to the "included by" node in a dependency tree;
24   * where included by is the root node that caused a dependency to be included.
25   *
26   * @author Jeremy Long
27   */
28  public class IncludedByReference implements Serializable {
29  
30      /**
31       * The serial version UID for serialization.
32       */
33      private static final long serialVersionUID = 4339975160204621746L;
34  
35      /**
36       * The reference.
37       */
38      private final String reference;
39      /**
40       * The reference's type.
41       */
42      private final String type;
43  
44      /**
45       * Constructs a new reference.
46       *
47       * @param reference the reference
48       * @param type the reference's type
49       */
50      public IncludedByReference(String reference, String type) {
51          this.reference = reference;
52          this.type = type;
53      }
54  
55      /**
56       * Get the value of reference.
57       *
58       * @return the value of reference
59       */
60      public String getReference() {
61          return reference;
62      }
63  
64      /**
65       * Get the value of type.
66       *
67       * @return the value of type
68       */
69      public String getType() {
70          return type;
71      }
72  
73  }