Package org.exolab.javasource
Class JDocDescriptor
- java.lang.Object
-
- org.exolab.javasource.JDocDescriptor
-
public final class JDocDescriptor extends java.lang.ObjectA descriptor for a JavaDoc comment.- Version:
- $Revision: 7918 $ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
- Author:
- Keith Visco
-
-
Field Summary
Fields Modifier and Type Field Description static shortAUTHORThe author descriptor.static java.lang.StringDEFAULT_VERSIONThe default version string, broken into parts so CVS does not expand it.static shortEXCEPTIONThe exception descriptor (exception).static shortPARAMThe param descriptor (param).static shortREFERENCEThe reference descriptor (see).static shortRETURNThe return descriptor (return).static shortVERSIONThe version descriptor (version).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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(java.lang.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(java.lang.String name, java.lang.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(java.lang.String name, java.lang.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(java.lang.String name)Creates a new @reference JavaDoc descriptor with the provided reference string.static JDocDescriptorcreateReturnDesc()Creates a new, empty @return JavaDoc descriptor.static JDocDescriptorcreateReturnDesc(java.lang.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(java.lang.String version)Creates a new @version JavaDoc descriptor with the provided version string.java.lang.StringgetDescription()Returns the description String.java.lang.StringgetName()Returns the name of the object being described.shortgetType()Returns the type of this JDocDescriptor.voidsetDescription(java.lang.String desc)Sets the description String for this descriptor.voidsetName(java.lang.String name)Sets the name value of the JavaDoc field.java.lang.StringtoString()
-
-
-
Field Detail
-
DEFAULT_VERSION
public static final java.lang.String DEFAULT_VERSION
The default version string, broken into parts so CVS does not expand it.- See Also:
- Constant Field Values
-
PARAM
public static final short PARAM
The param descriptor (param).- See Also:
- Constant Field Values
-
EXCEPTION
public static final short EXCEPTION
The exception descriptor (exception).- See Also:
- Constant Field Values
-
RETURN
public static final short RETURN
The return descriptor (return).- See Also:
- Constant Field Values
-
AUTHOR
public static final short AUTHOR
The author descriptor.- See Also:
- Constant Field Values
-
VERSION
public static final short VERSION
The version descriptor (version).- See Also:
- Constant Field Values
-
REFERENCE
public static final short REFERENCE
The reference descriptor (see).- See Also:
- Constant Field Values
-
-
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(java.lang.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(java.lang.String name, java.lang.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(java.lang.String name, java.lang.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(java.lang.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(java.lang.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(java.lang.String version)
Creates a new @version JavaDoc descriptor with the provided version string.- Parameters:
version- The version string.- Returns:
- The new JDocDescriptor.
-
getDescription
public java.lang.String getDescription()
Returns the description String.- Returns:
- The description string.
-
getName
public java.lang.String getName()
Returns the name of the object being described. This is valid for the following fields:- author
- exception
- param
- see
- Returns:
- The name of the object being described.
-
getType
public short getType()
Returns the type of this JDocDescriptor.- Returns:
- The type of this JDocDescriptor.
-
setDescription
public void setDescription(java.lang.String desc)
Sets the description String for this descriptor.- Parameters:
desc- The description of the object being described.
-
setName
public void setName(java.lang.String name)
Sets the name value of the JavaDoc field. This is only valid for the following fields:- author
- exception
- param
- see
- Parameters:
name- The name value of the JavaDoc field.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-