Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chhorz/javadoc-parser

Java library for parsing information from a structured Javadoc string.
https://github.com/chhorz/javadoc-parser

java javadoc

Last synced: 15 days ago
JSON representation

Java library for parsing information from a structured Javadoc string.

Awesome Lists containing this project

README

        

= Javadoc Parser
:author: Christian Horz
:icons: font

image:https://github.com/chhorz/javadoc-parser/actions/workflows/maven-ci.yml/badge.svg?branch=master["Java CI", link="https://github.com/chhorz/javadoc-parser/actions/workflows/maven-ci.yml"]
image:https://img.shields.io/maven-central/v/com.github.chhorz/javadoc-parser.svg?logo=apachemaven&label=Maven%20Central["Maven Central", link="https://search.maven.org/artifact/com.github.chhorz/javadoc-parser"]

== About
This library provides a parsing mechanism for *Javadoc* comments within java files.
An initial documentation of the Javadoc tool can be found on the pages of Oracle: link:http://www.oracle.com/technetwork/java/javase/documentation/index-jsp-135444.html[Javadoc Tool].

To get the parsing mechanism work properly the Javadoc comment has to follow a specific structure.
The structure should be as close as possible to the link:http://www.oracle.com/technetwork/articles/java/index-137868.html[Writers Guide] from Oracle.

== Usage
The project is available from maven central repository:

[source,xml]
----

com.github.chhorz
javadoc-parser
${javadoc-parser.version}

----

Information about the latest published version is available on the link:https://github.com/chhorz/javadoc-parser/releases[GitHub Releases] page.

=== Javadoc comment structure
_work in progress_

=== Parser configuration

.Parsing
[source,java]
----
JavaDocParser javaDocParser = JavaDocParserBuilder
.withStandardJavadocTags()
.withOutputType(OutputType.PLAIN)
.build();

JavaDoc javaDoc = javaDocParser.parse("Javadoc as String");
----

=== Retrieving data

.Getting data
[source,java]
----
List authorTags = javaDoc.getTags(AuthorTag.class);

AuthorTag firstAuthor = authorTags.get(0);

firstAuthor.getNameText();
----

== Snapshots
Snapshots are available from the Sonatype OSS Snapshots repository.
To configure the repository for your project to use the latest snapshot versions you have to add the following repository to your maven pom:
[source,xml]
----


ossrh
https://oss.sonatype.org/content/repositories/snapshots

----

== License
Javadoc Parser is open source software released under the link:http://www.apache.org/licenses/LICENSE-2.0.txt[Apache 2.0 license].