Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/chhorz/javadoc-parser
- Owner: chhorz
- License: other
- Created: 2018-02-27T16:53:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-08T17:02:15.000Z (7 months ago)
- Last Synced: 2024-04-08T21:18:03.659Z (7 months ago)
- Topics: java, javadoc
- Language: CSS
- Homepage:
- Size: 439 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
- Contributing: CONTRIBUTING.adoc
- License: LICENSE.txt
Awesome Lists containing this project
README
= Javadoc Parser
:author: Christian Horz
:icons: fontimage: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].