Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/i-al-istannen/htmljavadocparser
A parser API for html javadoc.
https://github.com/i-al-istannen/htmljavadocparser
Last synced: 1 day ago
JSON representation
A parser API for html javadoc.
- Host: GitHub
- URL: https://github.com/i-al-istannen/htmljavadocparser
- Owner: I-Al-Istannen
- Created: 2019-04-02T14:06:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-09-01T23:04:48.000Z (about 2 years ago)
- Last Synced: 2023-03-07T03:52:08.118Z (over 1 year ago)
- Language: Java
- Size: 94.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## About
This repo contains a small API that allows you interact and query a html-based Javadoc in a similar way to Java reflection.## Usage
The starting point is the `JavadocApi`.
You can then search for types or packages via the index the `JavadocApi` will return you.#### A small example to get the return type of the `ofEntries` method of `Map`:
```java
JavadocClass string = (JavadocClass) javadocApi.getIndex()
.getTypeForFullNameOrError("java.util.Map");
string.getMethods().stream()
.filter(m -> m.getSimpleName().equals("ofEntries"))
.findFirst()
.ifPresent(invocable -> System.out.println(invocable.getReturnType()));// Prints:
JInterface{java.util.Map}
```## Caveats
* Generic type parsing is implemented, but apart from the `getGenericType` methods the only information you will receive is the *name* of the type.
This means that `toArray(T[] ts)` will only tell you the parameter is of type `T[]`
but won't provide any more information about `T`.
* I am fairly certain I have missed quite a few aspects of the HTML Javadoc format, so I'd expect it to randomly not like input## Dependencies
* JSoup