Package com.thoughtworks.paranamer
Class JavadocParanamer
- java.lang.Object
-
- com.thoughtworks.paranamer.JavadocParanamer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classJavadocParanamer.DirJavadocProviderprotected static interfaceJavadocParanamer.JavadocProviderprotected static classJavadocParanamer.UrlJavadocProviderprotected static classJavadocParanamer.ZipJavadocProvider
-
Field Summary
-
Fields inherited from interface com.thoughtworks.paranamer.Paranamer
EMPTY_NAMES
-
-
Constructor Summary
Constructors Constructor Description JavadocParanamer(File archiveOrDirectory)JavadocParanamer(URL url)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static StringgetCanonicalName(Class<?> klass)protected static StringgetJavadocFilename(Member member)String[]lookupParameterNames(AccessibleObject accessible)Lookup the parameter names of a given method.String[]lookupParameterNames(AccessibleObject accessible, boolean throwExceptionIfMissing)Lookup the parameter names of a given method.protected static StringstreamToString(InputStream input)protected static InputStreamurlToStream(URL url)
-
-
-
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 orpackage-listcannot be found.IOException
-
JavadocParanamer
public JavadocParanamer(URL url) throws IOException
- Parameters:
url- base URL of the JavaDocs- Throws:
FileNotFoundException- if the url does not have a/package-listIOException
-
-
Method Detail
-
lookupParameterNames
public String[] lookupParameterNames(AccessibleObject accessible)
Description copied from interface:ParanamerLookup the parameter names of a given method.- Specified by:
lookupParameterNamesin interfaceParanamer- Parameters:
accessible- theMethodorConstructorfor which the parameter names are looked up.- Returns:
- A list of the parameter names.
-
lookupParameterNames
public String[] lookupParameterNames(AccessibleObject accessible, boolean throwExceptionIfMissing)
Description copied from interface:ParanamerLookup the parameter names of a given method.- Specified by:
lookupParameterNamesin interfaceParanamer- Parameters:
accessible- theMethodorConstructorfor 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.
-
streamToString
protected static String streamToString(InputStream input) throws IOException
- Throws:
IOException
-
urlToStream
protected static InputStream urlToStream(URL url) throws IOException
- Throws:
IOException
-
-