001/////////////////////////////////////////////////////////////////////////////////////////////// 002// checkstyle: Checks Java source code and other text files for adherence to a set of rules. 003// Copyright (C) 2001-2025 the original author or authors. 004// 005// This library is free software; you can redistribute it and/or 006// modify it under the terms of the GNU Lesser General Public 007// License as published by the Free Software Foundation; either 008// version 2.1 of the License, or (at your option) any later version. 009// 010// This library is distributed in the hope that it will be useful, 011// but WITHOUT ANY WARRANTY; without even the implied warranty of 012// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013// Lesser General Public License for more details. 014// 015// You should have received a copy of the GNU Lesser General Public 016// License along with this library; if not, write to the Free Software 017// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 018/////////////////////////////////////////////////////////////////////////////////////////////// 019 020package com.puppycrawl.tools.checkstyle.checks.javadoc.utils; 021 022import com.puppycrawl.tools.checkstyle.api.LineColumn; 023 024/** 025 * Value object for storing data about a parsed tag. 026 * 027 */ 028public final class TagInfo { 029 030 /** 031 * Name of the tag ("link", "see", etc). 032 */ 033 private final String name; 034 035 /** 036 * Value of the tag. 037 */ 038 private final String value; 039 040 /** 041 * Position of the tag in the given comment. 042 */ 043 private final LineColumn position; 044 045 /** 046 * Constructor. 047 * 048 * @param name The name of the tag. 049 * @param value The value of the tag. 050 * @param position The position of the tag in the comment. 051 */ 052 public TagInfo(String name, String value, LineColumn position) { 053 this.name = name; 054 this.value = value; 055 this.position = position; 056 } 057 058 /** 059 * Return name of tag. 060 * 061 * @return Name of the tag. 062 */ 063 public String getName() { 064 return name; 065 } 066 067 /** 068 * Return value of tag. 069 * 070 * @return Value of the tag. 071 */ 072 public String getValue() { 073 return value; 074 } 075 076 /** 077 * Return position of tag. 078 * 079 * @return Value of the tag. 080 */ 081 public LineColumn getPosition() { 082 return position; 083 } 084 085} 086