Class JavaSourceParser


  • public class JavaSourceParser
    extends Object
    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 Detail

      • JavaSourceParser

        public JavaSourceParser()
    • Method Detail

      • reset

        public void reset()
      • getErrorMessage

        public String getErrorMessage()
        Contains the error message if parsing failed
      • getMethodSignatures

        public List<String> getMethodSignatures()
        Contains all the method signatures, such as: public String addUser(int userId, String name)
      • getParameterTypes

        public Map<String,​Map<String,​String>> getParameterTypes()
        Parameter types for every method The key is the method signature, the inner map has key = parameter name, value = parameter type
      • getParameterDocs

        public Map<String,​Map<String,​String>> 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

        public String getClassDoc()
        Documentation for the class (api description)
      • getMethodDocs

        public Map<String,​String> getMethodDocs()
        Documentation for every method The key is the method name, the value is the documentation