Class JDocDescriptor
- java.lang.Object
-
- org.codehaus.modello.plugin.java.javasource.JDocDescriptor
-
public class JDocDescriptor extends java.lang.ObjectA descriptor for a JavaDoc comment- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static shortAUTHORThe author descriptorstatic java.lang.StringDEFAULT_VERSIONThe default version stringprivate java.lang.Stringdescriptionstatic shortEXCEPTIONThe exception descriptor (exception)private java.lang.Stringnamestatic shortPARAMThe param descriptor (param)static shortREFERENCEThe reference descriptor (see)static shortRETURNThe return descriptor (return)private shorttypestatic shortVERSIONthe version descriptor (version)
-
Constructor Summary
Constructors Modifier Constructor Description privateJDocDescriptor(short type)Creates a new JDocDescriptorprivateJDocDescriptor(short type, java.lang.String name, java.lang.String desc)Creates a new JDocDescriptor
-
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 author descriptorstatic JDocDescriptorcreateAuthorDesc(java.lang.String name)Creates a new author descriptorstatic JDocDescriptorcreateExceptionDesc()Creates a new exception descriptorstatic JDocDescriptorcreateExceptionDesc(java.lang.String name, java.lang.String desc)Creates a new exception descriptorstatic JDocDescriptorcreateParamDesc()Creates a new param descriptorstatic JDocDescriptorcreateParamDesc(java.lang.String name, java.lang.String desc)Creates a new param descriptorstatic JDocDescriptorcreateReferenceDesc()Creates a new reference descriptorstatic JDocDescriptorcreateReferenceDesc(java.lang.String name)Creates a new reference descriptorstatic JDocDescriptorcreateReturnDesc()Creates a new return descriptorstatic JDocDescriptorcreateReturnDesc(java.lang.String desc)Creates a new return descriptorstatic JDocDescriptorcreateVersionDesc()Creates a new version descriptorstatic JDocDescriptorcreateVersionDesc(java.lang.String version)Creates a new version descriptorjava.lang.StringgetDescription()Returns the description String for this descriptorjava.lang.StringgetName()Returns the name of the object being described.shortgetType()Returns the type of this JDocDescriptorvoidsetDescription(java.lang.String desc)Sets the description String for this descriptorvoidsetName(java.lang.String name)Sets the name value of the JavaDoc field.java.lang.StringtoString()Returns the String representation of this JDocDescriptor
-
-
-
Field Detail
-
DEFAULT_VERSION
public static final java.lang.String DEFAULT_VERSION
The default version string- 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
-
description
private java.lang.String description
-
name
private java.lang.String name
-
type
private short type
-
-
Constructor Detail
-
JDocDescriptor
private JDocDescriptor(short type)
Creates a new JDocDescriptor
-
JDocDescriptor
private JDocDescriptor(short type, java.lang.String name, java.lang.String desc)Creates a new JDocDescriptor- Parameters:
name- the name string for this descriptordesc- the description string for this descriptor
-
-
Method Detail
-
compareTo
protected short compareTo(JDocDescriptor jdd)
Compares the type of this JDocDescriptor with the given descriptor. Enables sorting of descriptors.- Parameters:
jdd- the javadoc descriptor- 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 author descriptor- Returns:
- the new JDocDescriptor
-
createAuthorDesc
public static JDocDescriptor createAuthorDesc(java.lang.String name)
Creates a new author descriptor- Parameters:
name- the author name string- Returns:
- the new JDocDescriptor
-
createExceptionDesc
public static JDocDescriptor createExceptionDesc()
Creates a new exception descriptor- Returns:
- the new JDocDescriptor
-
createExceptionDesc
public static JDocDescriptor createExceptionDesc(java.lang.String name, java.lang.String desc)
Creates a new exception descriptor- Parameters:
name- the exception namedesc- the description of when the exception is called- Returns:
- the new JDocDescriptor
-
createParamDesc
public static JDocDescriptor createParamDesc()
Creates a new param descriptor- Returns:
- the new JDocDescriptor
-
createParamDesc
public static JDocDescriptor createParamDesc(java.lang.String name, java.lang.String desc)
Creates a new param descriptor- Parameters:
name- the param namedesc- the param description string- Returns:
- the new JDocDescriptor
-
createReferenceDesc
public static JDocDescriptor createReferenceDesc()
Creates a new reference descriptor- Returns:
- the new JDocDescriptor
-
createReferenceDesc
public static JDocDescriptor createReferenceDesc(java.lang.String name)
Creates a new reference descriptor- Parameters:
name- the reference name string- Returns:
- the new JDocDescriptor
-
createReturnDesc
public static JDocDescriptor createReturnDesc()
Creates a new return descriptor- Returns:
- the new JDocDescriptor
-
createReturnDesc
public static JDocDescriptor createReturnDesc(java.lang.String desc)
Creates a new return descriptor- Parameters:
desc- the return description- Returns:
- the new JDocDescriptor
-
createVersionDesc
public static JDocDescriptor createVersionDesc()
Creates a new version descriptor- Returns:
- the new JDocDescriptor
-
createVersionDesc
public static JDocDescriptor createVersionDesc(java.lang.String version)
Creates a new version descriptor- Parameters:
version- the version string- Returns:
- the new JDocDescriptor
-
getDescription
public java.lang.String getDescription()
Returns the description String for this descriptor- Returns:
- the description string for this descriptor
-
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. This
-
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()
Returns the String representation of this JDocDescriptor- Overrides:
toStringin classjava.lang.Object- Returns:
- the String representation of this JDocDescriptor
-
-