src/share/classes/com/sun/source/doctree/DocTreeVisitor.java

Print this page


   1 /*
   2  * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  37  * <p> Classes implementing this interface may or may not throw a
  38  * {@code NullPointerException} if the additional parameter {@code p}
  39  * is {@code null}; see documentation of the implementing class for
  40  * details.
  41  *
  42  * <p> <b>WARNING:</b> It is possible that methods will be added to
  43  * this interface to accommodate new, currently unknown, doc comment
  44  * structures added to future versions of the Java&trade; programming
  45  * language.  Therefore, visitor classes directly implementing this
  46  * interface may be source incompatible with future versions of the
  47  * platform.
  48  *
  49  * @param <R> the return type of this visitor's methods.  Use {@link
  50  *            Void} for visitors that do not need to return results.
  51  * @param <P> the type of the additional parameter to this visitor's
  52  *            methods.  Use {@code Void} for visitors that do not need an
  53  *            additional parameter.
  54  *
  55  * @since 1.8
  56  */

  57 public interface DocTreeVisitor<R,P> {
  58     R visitAttribute(AttributeTree node, P p);
  59     R visitAuthor(AuthorTree node, P p);
  60     R visitComment(CommentTree node, P p);
  61     R visitDeprecated(DeprecatedTree node, P p);
  62     R visitDocComment(DocCommentTree node, P p);
  63     R visitDocRoot(DocRootTree node, P p);
  64     R visitEndElement(EndElementTree node, P p);
  65     R visitEntity(EntityTree node, P p);
  66     R visitErroneous(ErroneousTree node, P p);
  67     R visitIdentifier(IdentifierTree node, P p);
  68     R visitInheritDoc(InheritDocTree node, P p);
  69     R visitLink(LinkTree node, P p);
  70     R visitLiteral(LiteralTree node, P p);
  71     R visitParam(ParamTree node, P p);
  72     R visitReference(ReferenceTree node, P p);
  73     R visitReturn(ReturnTree node, P p);
  74     R visitSee(SeeTree node, P p);
  75     R visitSerial(SerialTree node, P p);
  76     R visitSerialData(SerialDataTree node, P p);
   1 /*
   2  * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  37  * <p> Classes implementing this interface may or may not throw a
  38  * {@code NullPointerException} if the additional parameter {@code p}
  39  * is {@code null}; see documentation of the implementing class for
  40  * details.
  41  *
  42  * <p> <b>WARNING:</b> It is possible that methods will be added to
  43  * this interface to accommodate new, currently unknown, doc comment
  44  * structures added to future versions of the Java&trade; programming
  45  * language.  Therefore, visitor classes directly implementing this
  46  * interface may be source incompatible with future versions of the
  47  * platform.
  48  *
  49  * @param <R> the return type of this visitor's methods.  Use {@link
  50  *            Void} for visitors that do not need to return results.
  51  * @param <P> the type of the additional parameter to this visitor's
  52  *            methods.  Use {@code Void} for visitors that do not need an
  53  *            additional parameter.
  54  *
  55  * @since 1.8
  56  */
  57 @jdk.Supported
  58 public interface DocTreeVisitor<R,P> {
  59     R visitAttribute(AttributeTree node, P p);
  60     R visitAuthor(AuthorTree node, P p);
  61     R visitComment(CommentTree node, P p);
  62     R visitDeprecated(DeprecatedTree node, P p);
  63     R visitDocComment(DocCommentTree node, P p);
  64     R visitDocRoot(DocRootTree node, P p);
  65     R visitEndElement(EndElementTree node, P p);
  66     R visitEntity(EntityTree node, P p);
  67     R visitErroneous(ErroneousTree node, P p);
  68     R visitIdentifier(IdentifierTree node, P p);
  69     R visitInheritDoc(InheritDocTree node, P p);
  70     R visitLink(LinkTree node, P p);
  71     R visitLiteral(LiteralTree node, P p);
  72     R visitParam(ParamTree node, P p);
  73     R visitReference(ReferenceTree node, P p);
  74     R visitReturn(ReturnTree node, P p);
  75     R visitSee(SeeTree node, P p);
  76     R visitSerial(SerialTree node, P p);
  77     R visitSerialData(SerialDataTree node, P p);