NaturalDocs::Parser::JavaDoc

A package for translating JavaDoc topics into Natural Docs.

Supported tags

  • @param
  • @author
  • @deprecated
  • @code, @literal (doesn’t change font)
  • @exception, @throws (doesn’t link to class)
  • @link, @linkplain (doesn’t change font)
  • @return, @returns
  • @see
  • @since
  • @value (shown as link instead of replacement)
  • @version

Stripped tags

  • @inheritDoc
  • @serial, @serialField, @serialData
  • All other block level tags.

Unsupported tags

These will appear literally in the output because I cannot handle them easily.

  • @docRoot
  • Any other tags not mentioned

Supported HTML

  • p
  • b, i, u
  • pre
  • a href
  • ol, ul, li (ol gets converted to ul)
  • gt, lt, amp, quot, nbsp entities

Stripped HTML

  • code
  • HTML comments

Unsupported HTML

These will appear literally in the output because I cannot handle them easily.

  • Any tags with additional properties other than a href.  (ex.  <p class=Something>)
  • Any other tags not mentioned

Reference

http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html

Summary
NaturalDocs::Parser::JavaDocA package for translating JavaDoc topics into Natural Docs.
Variables
blockTagsAn existence hash of the all-lowercase JavaDoc block tags, not including the @.
inlineTagsAn existence hash of the all-lowercase JavaDoc inline tags, not including the @.
Functions
IsMineExamines the comment and returns whether it is definitely JavaDoc content, i.e.
ParseCommentParses the JavaDoc-syntax comment and adds it to the parsed topic list.
FormatTextTranslates any inline tags or HTML codes to NDMarkup and returns it.
ConvertAmpChars
ConvertLink
MakeURLLink
MakeEMailLink

Variables

blockTags

my %blockTags

An existence hash of the all-lowercase JavaDoc block tags, not including the @.

inlineTags

my %inlineTags

An existence hash of the all-lowercase JavaDoc inline tags, not including the @.

Functions

IsMine

sub IsMine #(string[] commentLines,
bool isJavaDoc)

Examines the comment and returns whether it is definitely JavaDoc content, i.e. is owned by this package.

Parameters

commentLinesAn arrayref of the comment lines.  Must have been run through NaturalDocs::Parser->CleanComment().
isJavaDocWhether the comment is JavaDoc styled.  This doesn’t necessarily mean it has JavaDoc content.

Returns

Whether the comment is definitely JavaDoc content.

ParseComment

sub ParseComment #(string[] commentLines,
bool isJavaDoc,
int lineNumber,
ParsedTopics[] *parsedTopics)

Parses the JavaDoc-syntax comment and adds it to the parsed topic list.

Parameters

commentLinesAn arrayref of the comment lines.  Must have been run through NaturalDocs::Parser->CleanComment()The original memory will be changed.
isJavaDocWhether the comment is JavaDoc styled.  This doesn’t necessarily mean it has JavaDoc content.
lineNumberThe line number of the first of the comment lines.
parsedTopicsA reference to the array where any new NaturalDocs::Parser::ParsedTopics should be placed.

Returns

The number of parsed topics added to the array, which in this case will always be one.

FormatText

sub FormatText #(string text,
bool inParagraph)

Translates any inline tags or HTML codes to NDMarkup and returns it.

ConvertAmpChars

sub ConvertAmpChars #(text)

ConvertLink

sub ConvertLink #(text)

MakeURLLink

sub MakeURLLink #(target,
text)

MakeEMailLink

sub MakeEMailLink #(target,
text)
my %blockTags
An existence hash of the all-lowercase JavaDoc block tags, not including the @.
my %inlineTags
An existence hash of the all-lowercase JavaDoc inline tags, not including the @.
sub IsMine #(string[] commentLines,
bool isJavaDoc)
Examines the comment and returns whether it is definitely JavaDoc content, i.e.
sub ParseComment #(string[] commentLines,
bool isJavaDoc,
int lineNumber,
ParsedTopics[] *parsedTopics)
Parses the JavaDoc-syntax comment and adds it to the parsed topic list.
sub FormatText #(string text,
bool inParagraph)
Translates any inline tags or HTML codes to NDMarkup and returns it.
A markup format used by the parser, both internally and in NaturalDocs::Parser::ParsedTopic objects.
sub ConvertAmpChars #(text)
sub ConvertLink #(text)
sub MakeURLLink #(target,
text)
sub MakeEMailLink #(target,
text)
sub CleanComment #(commentLines)
Removes any extraneous formatting and whitespace from the comment.
A class for parsed topics of source files.
Close