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.api; 021 022/** 023 * DetailNode is used to construct tree during parsing Javadoc comments. 024 * Contains array of children, parent node and other useful fields. 025 * 026 * @author Baratali Izmailov 027 * @see com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocNodeImpl 028 * @see com.puppycrawl.tools.checkstyle.checks.javadoc.AbstractJavadocCheck 029 */ 030public interface DetailNode { 031 032 /** 033 * Node type. 034 * @return node type. 035 * @see JavadocTokenTypes 036 */ 037 int getType(); 038 039 /** 040 * Node text. 041 * @return node text 042 */ 043 String getText(); 044 045 /** 046 * Node line number. 047 * @return node line number 048 */ 049 int getLineNumber(); 050 051 /** 052 * Node column number. 053 * @return node column number. 054 */ 055 int getColumnNumber(); 056 057 /** 058 * Array of children. 059 * @return array of children 060 */ 061 DetailNode[] getChildren(); 062 063 /** 064 * Parent node. 065 * @return parent node. 066 */ 067 DetailNode getParent(); 068 069 /** 070 * Node index among parent's children. 071 * @return index 072 */ 073 int getIndex(); 074 075}