Package org.apache.camel.maven
Class JavaSourceParser
java.lang.Object
org.apache.camel.maven.JavaSourceParser
Java source parser that are used for parsing the proxy API class.
Implementation note:
This parser uses Roaster and have some workarounds to work around some limitations in Roaster. The code is specially
complex in regards to resolve types from method signatures that use Java generics which can have both type variables
or reference to a class (either qualified or not). The type variables can also be bounded (T extends Foo) which
further complicate matters. The parser has been built with trial and errors to get it to function and work for the
current set of Camel API based components.
The parser was also designed to plugin and work with the old parsers that was based on javadoc harvesting. Therefore
how it functions and what information it returns is adapted to be as it was with the old parser.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDocumentation for the class (api description)Contains the error message if parsing failedDocumentation for every method The key is the method name, the value is the documentationContains all the method signatures, such as: public String addUser(int userId, String name)Documentation for every method and their arguments (parameters).Parameter types for every method The key is the method signature, the inner map has key = parameter name, value = parameter typevoidparse(InputStream in, String innerClass) voidvoidreset()
-
Constructor Details
-
JavaSourceParser
public JavaSourceParser()
-
-
Method Details
-
parse
- Throws:
IOException
-
parse
-
reset
public void reset() -
getErrorMessage
Contains the error message if parsing failed -
getMethodSignatures
Contains all the method signatures, such as: public String addUser(int userId, String name) -
getParameterTypes
Parameter types for every method The key is the method signature, the inner map has key = parameter name, value = parameter type -
getParameterDocs
Documentation for every method and their arguments (parameters). The key is the method name, the inner map has key = parameter name, value = documentation -
getClassDoc
Documentation for the class (api description) -
getMethodDocs
Documentation for every method The key is the method name, the value is the documentation
-