public class ApiParser extends Object
| Constructor and Description |
|---|
ApiParser(Path dir)
Creates a new
ApiParser. |
ApiParser(Path dir,
Predicate<RouteMethod> filter)
Creates a new
ApiParser. |
| Modifier and Type | Method and Description |
|---|---|
Path |
export(Path outputBaseDir,
String application)
Parse application bytecode, build route methods from it and export all metadata to
.json. |
ApiParser |
modify(Predicate<RouteMethod> matcher,
Consumer<RouteMethod> customizer)
Modify one or more route method who matches the filter.
|
List<RouteMethod> |
parse(String application)
Parse application bytecode and build route methods from it.
|
List<RouteMethod> |
parseFully(Jooby application)
Parse application bytecode, build route methods from it and merge output with the given routes.
|
List<RouteMethod> |
parseFully(String application,
List<Route.Definition> routes)
Parse application bytecode, build route methods from it and merge output with the given routes.
|
ApiParser |
with(ClassLoader loader)
Set a class loader to use.
|
public ApiParser(Path dir, Predicate<RouteMethod> filter)
ApiParser.dir - Source code directory. Required for javadoc parser.filter - Route method filter.public List<RouteMethod> parseFully(Jooby application) throws Exception
application - Application to parse.Exception - If something goes wrong.public Path export(Path outputBaseDir, String application) throws Exception
.json.outputBaseDir - Output base directory. This method appends the java package of the given
application.application - Application to parse.Exception - If something goes wrong.public List<RouteMethod> parse(String application) throws Exception
application - Application to parse.Exception - If something goes wrong.public List<RouteMethod> parseFully(String application, List<Route.Definition> routes) throws Exception
application - Application to parse.routes - Application routes.Exception - If something goes wrong.public ApiParser with(ClassLoader loader)
loader - Class loader.public ApiParser modify(Predicate<RouteMethod> matcher, Consumer<RouteMethod> customizer)
matcher - Route matcher.customizer - Customizer.Copyright © 2021. All rights reserved.