1   ////////////////////////////////////////////////////////////////////////////////
2   // checkstyle: Checks Java source code for adherence to a set of rules.
3   // Copyright (C) 2001-2019 the original author or authors.
4   //
5   // This library is free software; you can redistribute it and/or
6   // modify it under the terms of the GNU Lesser General Public
7   // License as published by the Free Software Foundation; either
8   // version 2.1 of the License, or (at your option) any later version.
9   //
10  // This library is distributed in the hope that it will be useful,
11  // but WITHOUT ANY WARRANTY; without even the implied warranty of
12  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  // Lesser General Public License for more details.
14  //
15  // You should have received a copy of the GNU Lesser General Public
16  // License along with this library; if not, write to the Free Software
17  // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  ////////////////////////////////////////////////////////////////////////////////
19  
20  package com.puppycrawl.tools.checkstyle.checks.javadoc.utils;
21  
22  import com.puppycrawl.tools.checkstyle.api.LineColumn;
23  
24  /**
25   * Value object for storing data about a parsed tag.
26   *
27   */
28  public final class TagInfo {
29  
30      /**
31       * Name of the tag ("link", "see", etc).
32       */
33      private final String name;
34  
35      /**
36       * Value of the tag.
37       */
38      private final String value;
39  
40      /**
41       * Position of the tag in the given comment.
42       */
43      private final LineColumn position;
44  
45      /**
46       * Constructor.
47       *
48       * @param name The name of the tag.
49       * @param value The value of the tag.
50       * @param position The position of the tag in the comment.
51       */
52      public TagInfo(String name, String value, LineColumn position) {
53          this.name = name;
54          this.value = value;
55          this.position = position;
56      }
57  
58      /**
59       * Return name of tag.
60       * @return Name of the tag.
61       */
62      public String getName() {
63          return name;
64      }
65  
66      /**
67       * Return value of tag.
68       * @return Value of the tag.
69       */
70      public String getValue() {
71          return value;
72      }
73  
74      /**
75       * Return position of tag.
76       * @return Value of the tag.
77       */
78      public LineColumn getPosition() {
79          return position;
80      }
81  
82  }
83