libjava/ChangeLog:
[official-gcc.git] / libjava / classpath / tools / gnu / classpath / tools / gjdoc / InheritDocTagImpl.java
blob773c5fd3b4469ff0f9dbf2d30e64804b8a01cd48
1 /* gnu.classpath.tools.gjdoc.InheritDocTagImpl
2 Copyright (C) 2004 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA. */
21 package gnu.classpath.tools.gjdoc;
23 import com.sun.javadoc.*;
24 import java.util.*;
25 import java.text.*;
27 /**
28 * Represents the <code>inheritDoc</code> tag.
30 public class InheritDocTagImpl
31 extends AbstractTagImpl
33 private ClassDocImpl contextClass;
34 private MemberDocImpl contextMember;
35 private AbstractTagImpl contextTag;
37 public InheritDocTagImpl(ClassDocImpl contextClass,
38 MemberDocImpl contextMember,
39 AbstractTagImpl contextTag)
41 super("");
42 this.contextClass = contextClass;
43 this.contextMember = contextMember;
44 this.contextTag = contextTag;
47 public String kind() {
48 return "@inheritDoc";
51 public String name() {
52 return "@inheritDoc";
55 private TagContainer inheritedDoc;
56 private boolean inheritedDocInitialized = false;
58 private TagContainer getInheritedDoc()
60 if (!inheritedDocInitialized) {
61 inheritedDoc = DocImpl.findInheritedDoc(contextClass, contextMember, contextTag);
62 inheritedDocInitialized = true;
64 return inheritedDoc;
67 public Tag[] firstSentenceTags() {
68 TagContainer _inheritedDoc = getInheritedDoc();
69 if (_inheritedDoc != null) {
70 return _inheritedDoc.firstSentenceTags();
72 else {
73 return null;
77 public Tag[] inlineTags() {
78 TagContainer _inheritedDoc = getInheritedDoc();
79 if (_inheritedDoc != null) {
80 return _inheritedDoc.inlineTags();
82 else {
83 return null;