001//////////////////////////////////////////////////////////////////////////////// 002// checkstyle: Checks Java source code for adherence to a set of rules. 003// Copyright (C) 2001-2018 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 * @author Nathan Naze 028 */ 029public final class TagInfo { 030 031 /** 032 * Name of the tag ("link", "see", etc). 033 */ 034 private final String name; 035 036 /** 037 * Value of the tag. 038 */ 039 private final String value; 040 041 /** 042 * Position of the tag in the given comment. 043 */ 044 private final LineColumn position; 045 046 /** 047 * Constructor. 048 * 049 * @param name The name of the tag. 050 * @param value The value of the tag. 051 * @param position The position of the tag in the comment. 052 */ 053 public TagInfo(String name, String value, LineColumn position) { 054 this.name = name; 055 this.value = value; 056 this.position = position; 057 } 058 059 /** 060 * Return name of tag. 061 * @return Name of the tag. 062 */ 063 public String getName() { 064 return name; 065 } 066 067 /** 068 * Return value of tag. 069 * @return Value of the tag. 070 */ 071 public String getValue() { 072 return value; 073 } 074 075 /** 076 * Return position of tag. 077 * @return Value of the tag. 078 */ 079 public LineColumn getPosition() { 080 return position; 081 } 082 083} 084