Class JavaDocData
- java.lang.Object
-
- org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.JavaDocData
-
public class JavaDocData extends java.lang.Object
Simplified structure containing comments and tags read from a JavaDoc comment block.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
comment
static java.lang.String
NO_COMMENT
Substitution value for when no JavaDoc comment text was found within a JavaDoc comment block.private java.util.SortedMap<java.lang.String,java.lang.String>
tag2ValueMap
-
Constructor Summary
Constructors Constructor Description JavaDocData(java.lang.String comment, java.util.List<com.thoughtworks.qdox.model.DocletTag> tags)
Creates a JavaDocData for a particular entry with the supplied JavaDoc comment and List of DocletTags.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getComment()
Retrieves the comment/text in the JavaDoc structure, minus the names and values of any given JavaDoc tags.java.util.SortedMap<java.lang.String,java.lang.String>
getTag2ValueMap()
Retrieves the names and values of all JavaDoc tags found.java.lang.String
toString()
-
-
-
Field Detail
-
NO_COMMENT
public static final java.lang.String NO_COMMENT
Substitution value for when no JavaDoc comment text was found within a JavaDoc comment block.- See Also:
- Constant Field Values
-
comment
private java.lang.String comment
-
tag2ValueMap
private java.util.SortedMap<java.lang.String,java.lang.String> tag2ValueMap
-
-
Constructor Detail
-
JavaDocData
public JavaDocData(java.lang.String comment, java.util.List<com.thoughtworks.qdox.model.DocletTag> tags)
Creates a JavaDocData for a particular entry with the supplied JavaDoc comment and List of DocletTags.- Parameters:
comment
- The actual comment in the JavaDoc. Null values are replaced with the valueNO_COMMENT
, to ensure that thegetComment()
method does not return null values.tags
- The DocletTags of the JavaDoc entry. Can be null or empty.
-
-
Method Detail
-
getComment
public java.lang.String getComment()
Retrieves the comment/text in the JavaDoc structure, minus the names and values of any given JavaDoc tags.- Returns:
- the comment/text in the JavaDoc structure, or
NO_COMMENT
if no JavaDoc was provided. Never returns anull
value.
-
getTag2ValueMap
public java.util.SortedMap<java.lang.String,java.lang.String> getTag2ValueMap()
Retrieves the names and values of all JavaDoc tags found. If two tags were found (such as two@author
tags, the value contains all found- Returns:
- A non-null Map relating the names of all supplied JavaDoc Tags to their value(s).
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-