001////////////////////////////////////////////////////////////////////////////////
002// checkstyle: Checks Java source code for adherence to a set of rules.
003// Copyright (C) 2001-2017 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     * Node type.
033     * @return node type.
034     * @see JavadocTokenTypes
035     */
036    int getType();
037
038    /**
039     * Node text.
040     * @return node text
041     */
042    String getText();
043
044    /**
045     * Node line number.
046     * @return node line number
047     */
048    int getLineNumber();
049
050    /**
051     * Node column number.
052     * @return node column number.
053     */
054    int getColumnNumber();
055
056    /**
057     * Array of children.
058     * @return array of children
059     */
060    DetailNode[] getChildren();
061
062    /**
063     * Parent node.
064     * @return parent node.
065     */
066    DetailNode getParent();
067
068    /**
069     * Node index among parent's children.
070     * @return index
071     */
072    int getIndex();
073}