IncludedByReference.java

  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. import java.io.Serializable;

  20. /**
  21.  * POJO to store a reference to the "included by" node in a dependency tree;
  22.  * where included by is the root node that caused a dependency to be included.
  23.  *
  24.  * @author Jeremy Long
  25.  */
  26. public class IncludedByReference implements Serializable {

  27.     /**
  28.      * The serial version UID for serialization.
  29.      */
  30.     private static final long serialVersionUID = 4339975160204621746L;

  31.     /**
  32.      * The reference.
  33.      */
  34.     private final String reference;
  35.     /**
  36.      * The reference's type.
  37.      */
  38.     private final String type;

  39.     /**
  40.      * Constructs a new reference.
  41.      *
  42.      * @param reference the reference
  43.      * @param type the reference's type
  44.      */
  45.     public IncludedByReference(String reference, String type) {
  46.         this.reference = reference;
  47.         this.type = type;
  48.     }

  49.     /**
  50.      * Get the value of reference.
  51.      *
  52.      * @return the value of reference
  53.      */
  54.     public String getReference() {
  55.         return reference;
  56.     }

  57.     /**
  58.      * Get the value of type.
  59.      *
  60.      * @return the value of type
  61.      */
  62.     public String getType() {
  63.         return type;
  64.     }

  65. }