Class JDocDescriptor
java.lang.Object
org.codehaus.modello.plugin.java.javasource.JDocDescriptor
A descriptor for a JavaDoc comment
- Version:
- $Revision$ $Date$
- Author:
- Keith Visco
-
Field Summary
Modifier and TypeFieldDescriptionstatic final short
The author descriptorstatic final String
The default version stringstatic final short
The exception descriptor (exception)static final short
The param descriptor (param)static final short
The reference descriptor (see)static final short
The return descriptor (return)static final short
the version descriptor (version) -
Method Summary
Modifier and TypeMethodDescriptionprotected short
compareTo
(JDocDescriptor jdd) Compares the type of this JDocDescriptor with the given descriptor.static JDocDescriptor
Creates a new author descriptorstatic JDocDescriptor
createAuthorDesc
(String name) Creates a new author descriptorstatic JDocDescriptor
Creates a new exception descriptorstatic JDocDescriptor
createExceptionDesc
(String name, String desc) Creates a new exception descriptorstatic JDocDescriptor
Creates a new param descriptorstatic JDocDescriptor
createParamDesc
(String name, String desc) Creates a new param descriptorstatic JDocDescriptor
Creates a new reference descriptorstatic JDocDescriptor
createReferenceDesc
(String name) Creates a new reference descriptorstatic JDocDescriptor
Creates a new return descriptorstatic JDocDescriptor
createReturnDesc
(String desc) Creates a new return descriptorstatic JDocDescriptor
Creates a new version descriptorstatic JDocDescriptor
createVersionDesc
(String version) Creates a new version descriptorReturns the description String for this descriptorgetName()
Returns the name of the object being described.short
getType()
Returns the type of this JDocDescriptorvoid
setDescription
(String desc) Sets the description String for this descriptorvoid
Sets the name value of the JavaDoc field.toString()
Returns the String representation of this JDocDescriptor
-
Field Details
-
DEFAULT_VERSION
The default version string- See Also:
-
PARAM
public static final short PARAMThe param descriptor (param)- See Also:
-
EXCEPTION
public static final short EXCEPTIONThe exception descriptor (exception)- See Also:
-
RETURN
public static final short RETURNThe return descriptor (return)- See Also:
-
AUTHOR
public static final short AUTHORThe author descriptor- See Also:
-
VERSION
public static final short VERSIONthe version descriptor (version)- See Also:
-
REFERENCE
public static final short REFERENCEThe reference descriptor (see)- See Also:
-
-
Method Details
-
compareTo
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
Creates a new author descriptor- Returns:
- the new JDocDescriptor
-
createAuthorDesc
Creates a new author descriptor- Parameters:
name
- the author name string- Returns:
- the new JDocDescriptor
-
createExceptionDesc
Creates a new exception descriptor- Returns:
- the new JDocDescriptor
-
createExceptionDesc
Creates a new exception descriptor- Parameters:
name
- the exception namedesc
- the description of when the exception is called- Returns:
- the new JDocDescriptor
-
createParamDesc
Creates a new param descriptor- Returns:
- the new JDocDescriptor
-
createParamDesc
Creates a new param descriptor- Parameters:
name
- the param namedesc
- the param description string- Returns:
- the new JDocDescriptor
-
createReferenceDesc
Creates a new reference descriptor- Returns:
- the new JDocDescriptor
-
createReferenceDesc
Creates a new reference descriptor- Parameters:
name
- the reference name string- Returns:
- the new JDocDescriptor
-
createReturnDesc
Creates a new return descriptor- Returns:
- the new JDocDescriptor
-
createReturnDesc
Creates a new return descriptor- Parameters:
desc
- the return description- Returns:
- the new JDocDescriptor
-
createVersionDesc
Creates a new version descriptor- Returns:
- the new JDocDescriptor
-
createVersionDesc
Creates a new version descriptor- Parameters:
version
- the version string- Returns:
- the new JDocDescriptor
-
getDescription
Returns the description String for this descriptor- Returns:
- the description string for this descriptor
-
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
Sets the description String for this descriptor- Parameters:
desc
- the description of the object being described
-
setName
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
Returns the String representation of this JDocDescriptor
-