mjc

org.multijava.mjdoc.mjdoc_142
Class MjThrowsTag

java.lang.Object
  extended byorg.multijava.mjdoc.mjdoc_142.MjTag
      extended byorg.multijava.mjdoc.mjdoc_142.MjThrowsTag
All Implemented Interfaces:
com.sun.javadoc.Tag, com.sun.javadoc.ThrowsTag

public class MjThrowsTag
extends MjTag
implements com.sun.javadoc.ThrowsTag

This class represents a 'throws' tag in a javadoc comment, which has an exception name and a description; the description itself is composed of a sequence of text and inline tags.

Author:
David R. Cok

Field Summary
private  String comment
          A holder for the text of the description (but ordinarily you will want to use the sequence of tags provided by inlineTags() ).
private  MjClassDoc exception
          Cached value of the class of the exception.
static String KIND
          A constant defining the 'kind' of this tag, as defined for Tag.
static String KIND2
          An alternate tagname, a synonym for 'throws'.
private static MjClassDoc mjRuntimeError
          The MjClassDoc object for java.lang.Error .
private static MjClassDoc mjRuntimeException
          The MjClassDoc object for java.lang.RuntimeException .
private  String name
          A holder for the name of the class of the exception.
private  String tagname
          A holder for the name of the tag (@throws or @exception).
 
Fields inherited from class org.multijava.mjdoc.mjdoc_142.MjTag
fstags, owner, position, tags
 
Constructor Summary
MjThrowsTag(com.sun.javadoc.Doc owner, String tagname, String t, com.sun.javadoc.SourcePosition pos)
          A constructor for the tag object; the argument is the String that follows '@throws'; it will be parsed into an exception name and the inline tags constituting the description.
 
Method Summary
 com.sun.javadoc.ClassDoc exception()
          Returns the exception referenced in the tag as a MjClassDoc object.
 String exceptionComment()
          Returns the unparsed comment text; ordinarily you will want to use the inlineTags() .
 String exceptionName()
          Returns the fully-qualified class name of the exception given in the javadoc comment.
 String kind()
          Returns the 'kind' of this tag, as required by the Tag interface.
 String name()
          Returns the actual name (@throws or @exception) used for the tag.
(package private) static boolean unchecked(MjClassDoc exception)
          Returns true if the argument represents an unchecked Java Throwable class, that is one that need not be declared in the throws-list of a method declaration.
 
Methods inherited from class org.multijava.mjdoc.mjdoc_142.MjTag
containingClass, create, firstSentenceTags, holder, inlineTags, inlineTags, position, resolveReference, text, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.javadoc.Tag
firstSentenceTags, holder, inlineTags, position, text, toString
 

Field Detail

KIND

public static final String KIND
A constant defining the 'kind' of this tag, as defined for Tag.


KIND2

public static final String KIND2
An alternate tagname, a synonym for 'throws'.


tagname

private String tagname
A holder for the name of the tag (@throws or @exception).


exception

private MjClassDoc exception
Cached value of the class of the exception.


name

private String name
A holder for the name of the class of the exception.


comment

private String comment
A holder for the text of the description (but ordinarily you will want to use the sequence of tags provided by inlineTags() ).


mjRuntimeException

private static MjClassDoc mjRuntimeException
The MjClassDoc object for java.lang.RuntimeException .


mjRuntimeError

private static MjClassDoc mjRuntimeError
The MjClassDoc object for java.lang.Error .

Constructor Detail

MjThrowsTag

public MjThrowsTag(com.sun.javadoc.Doc owner,
                   String tagname,
                   String t,
                   com.sun.javadoc.SourcePosition pos)
A constructor for the tag object; the argument is the String that follows '@throws'; it will be parsed into an exception name and the inline tags constituting the description.

Method Detail

kind

public String kind()
Returns the 'kind' of this tag, as required by the Tag interface.

Specified by:
kind in interface com.sun.javadoc.Tag

name

public String name()
Returns the actual name (@throws or @exception) used for the tag.

Specified by:
name in interface com.sun.javadoc.Tag
Overrides:
name in class MjTag

unchecked

static boolean unchecked(MjClassDoc exception)
Returns true if the argument represents an unchecked Java Throwable class, that is one that need not be declared in the throws-list of a method declaration.


exception

public com.sun.javadoc.ClassDoc exception()
Returns the exception referenced in the tag as a MjClassDoc object.

Specified by:
exception in interface com.sun.javadoc.ThrowsTag

exceptionComment

public String exceptionComment()
Returns the unparsed comment text; ordinarily you will want to use the inlineTags() .

Specified by:
exceptionComment in interface com.sun.javadoc.ThrowsTag

exceptionName

public String exceptionName()
Returns the fully-qualified class name of the exception given in the javadoc comment.

Specified by:
exceptionName in interface com.sun.javadoc.ThrowsTag

mjc

mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.