org.exolab.javasource

Class JDocDescriptor

public final class JDocDescriptor extends Object

A descriptor for a JavaDoc comment.

Version: $Revision: 6324 $ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $

Author: Keith Visco

Field Summary
static shortAUTHOR
The author descriptor.
static StringDEFAULT_VERSION
The default version string, broken into parts so CVS does not expand it.
static shortEXCEPTION
The exception descriptor (exception).
static shortPARAM
The param descriptor (param).
static shortREFERENCE
The reference descriptor (see).
static shortRETURN
The return descriptor (return).
static shortVERSION
the version descriptor (version).
Method Summary
protected shortcompareTo(JDocDescriptor jdd)
Compares the type of this JDocDescriptor with the given descriptor.
static JDocDescriptorcreateAuthorDesc()
Creates a new, empty @author JavaDoc descriptor.
static JDocDescriptorcreateAuthorDesc(String name)
Creates a new @author JavaDoc descriptor with the provided author name string.
static JDocDescriptorcreateExceptionDesc()
Creates a new, empty @exception JavaDoc descriptor.
static JDocDescriptorcreateExceptionDesc(String name, String desc)
Creates a new @exception JavaDoc descriptor with a given exception name and a description of when the exception is thrown.
static JDocDescriptorcreateParamDesc()
Creates a new, empty @param JavaDoc descriptor.
static JDocDescriptorcreateParamDesc(String name, String desc)
Creates a new @param JavaDoc descriptor with the given parameter name and description.
static JDocDescriptorcreateReferenceDesc()
Creates a new, empty @reference JavaDoc descriptor.
static JDocDescriptorcreateReferenceDesc(String name)
Creates a new @reference JavaDoc descriptor with the provided reference string.
static JDocDescriptorcreateReturnDesc()
Creates a new, empty @return JavaDoc descriptor.
static JDocDescriptorcreateReturnDesc(String desc)
Creates a new @return JavaDoc descriptor with the provided description of what is returned.
static JDocDescriptorcreateVersionDesc()
Creates a new, empty @version JavaDoc descriptor.
static JDocDescriptorcreateVersionDesc(String version)
Creates a new @version JavaDoc descriptor with the provided version string.
StringgetDescription()
Returns the description String.
StringgetName()
Returns the name of the object being described.
shortgetType()
Returns the type of this JDocDescriptor.
voidsetDescription(String desc)
Sets the description String for this descriptor.
voidsetName(String name)
Sets the name value of the JavaDoc field.
StringtoString()
Returns the String representation of this JDocDescriptor.

Field Detail

AUTHOR

public static final short AUTHOR
The author descriptor.

DEFAULT_VERSION

public static final String DEFAULT_VERSION
The default version string, broken into parts so CVS does not expand it.

EXCEPTION

public static final short EXCEPTION
The exception descriptor (exception).

PARAM

public static final short PARAM
The param descriptor (param).

REFERENCE

public static final short REFERENCE
The reference descriptor (see).

RETURN

public static final short RETURN
The return descriptor (return).

VERSION

public static final short VERSION
the version descriptor (version).

Method Detail

compareTo

protected short compareTo(JDocDescriptor jdd)
Compares the type of this JDocDescriptor with the given descriptor. Enables sorting of descriptors.

Parameters: jdd a JDocDescriptor to be compared to this one

Returns: 0 if the two descriptor types are equal, 1 if the type of this descriptor is greater than the given descriptor, or -1 if the type of this descriptor is less than the given descriptor

createAuthorDesc

public static JDocDescriptor createAuthorDesc()
Creates a new, empty @author JavaDoc descriptor.

Returns: the new JDocDescriptor.

createAuthorDesc

public static JDocDescriptor createAuthorDesc(String name)
Creates a new @author JavaDoc descriptor with the provided author name string.

Parameters: name the author name string

Returns: the new JDocDescriptor

createExceptionDesc

public static JDocDescriptor createExceptionDesc()
Creates a new, empty @exception JavaDoc descriptor.

Returns: the new JDocDescriptor.

createExceptionDesc

public static JDocDescriptor createExceptionDesc(String name, String desc)
Creates a new @exception JavaDoc descriptor with a given exception name and a description of when the exception is thrown.

Parameters: name the exception name desc the description of when the exception is thrown

Returns: the new JDocDescriptor.

createParamDesc

public static JDocDescriptor createParamDesc()
Creates a new, empty @param JavaDoc descriptor.

Returns: the new JDocDescriptor.

createParamDesc

public static JDocDescriptor createParamDesc(String name, String desc)
Creates a new @param JavaDoc descriptor with the given parameter name and description.

Parameters: name the param name desc the param description string

Returns: the new JDocDescriptor.

createReferenceDesc

public static JDocDescriptor createReferenceDesc()
Creates a new, empty @reference JavaDoc descriptor.

Returns: the new JDocDescriptor.

createReferenceDesc

public static JDocDescriptor createReferenceDesc(String name)
Creates a new @reference JavaDoc descriptor with the provided reference string.

Parameters: name the reference name string

Returns: the new JDocDescriptor.

createReturnDesc

public static JDocDescriptor createReturnDesc()
Creates a new, empty @return JavaDoc descriptor.

Returns: the new JDocDescriptor.

createReturnDesc

public static JDocDescriptor createReturnDesc(String desc)
Creates a new @return JavaDoc descriptor with the provided description of what is returned.

Parameters: desc the return description

Returns: the new JDocDescriptor.

createVersionDesc

public static JDocDescriptor createVersionDesc()
Creates a new, empty @version JavaDoc descriptor.

Returns: the new JDocDescriptor.

createVersionDesc

public static JDocDescriptor createVersionDesc(String version)
Creates a new @version JavaDoc descriptor with the provided version string.

Parameters: version the version string

Returns: the new JDocDescriptor.

getDescription

public String getDescription()
Returns the description String.

Returns: the description string.

getName

public String getName()
Returns the name of the object being described. This is valid for the following fields:

Returns: the name of the object being described. This

getType

public short getType()
Returns the type of this JDocDescriptor.

Returns: the type of this JDocDescriptor.

setDescription

public void setDescription(String desc)
Sets the description String for this descriptor.

Parameters: desc the description of the object being described

setName

public void setName(String name)
Sets the name value of the JavaDoc field. This is only valid for the following fields:

Parameters: name the name value of the JavaDoc field

toString

public String toString()
Returns the String representation of this JDocDescriptor.

Returns: the String representation of this JDocDescriptor.

Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com