Class JavadocParanamer

  • All Implemented Interfaces:
    Paranamer

    public class JavadocParanamer
    extends Object
    implements Paranamer
    Accesses Javadocs to extract parameter names. Supports:-
    • Javadoc in zip file
    • Javadoc in directory
    • Javadoc at remote URL
    Author:
    Samuel Halliday
    • Constructor Detail

      • JavadocParanamer

        public JavadocParanamer​(File archiveOrDirectory)
                         throws IOException
        Parameters:
        archiveOrDirectory - either a zip archive or base directory of Javadocs.
        Throws:
        FileNotFoundException - if the parameter or package-list cannot be found.
        IOException
    • Method Detail

      • lookupParameterNames

        public String[] lookupParameterNames​(AccessibleObject accessible,
                                             boolean throwExceptionIfMissing)
        Description copied from interface: Paranamer
        Lookup the parameter names of a given method.
        Specified by:
        lookupParameterNames in interface Paranamer
        Parameters:
        accessible - the Method or Constructor for which the parameter names are looked up.
        throwExceptionIfMissing - whether to throw an exception if no Paranamer data found (versus return null).
        Returns:
        A list of the parameter names.
      • getJavadocFilename

        protected static String getJavadocFilename​(Member member)
      • getCanonicalName

        protected static String getCanonicalName​(Class<?> klass)