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 class
JavadocParanamer.DirJavadocProvider
protected static interface
JavadocParanamer.JavadocProvider
protected static class
JavadocParanamer.UrlJavadocProvider
protected static class
JavadocParanamer.ZipJavadocProvider
-
Field Summary
-
Fields inherited from interface com.thoughtworks.paranamer.Paranamer
EMPTY_NAMES
-
-
Constructor Summary
Constructors Constructor Description JavadocParanamer(java.io.File archiveOrDirectory)
JavadocParanamer(java.net.URL url)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.lang.String
getCanonicalName(java.lang.Class<?> klass)
protected static java.lang.String
getJavadocFilename(java.lang.reflect.Member member)
java.lang.String[]
lookupParameterNames(java.lang.reflect.AccessibleObject accessible)
Lookup the parameter names of a given method.java.lang.String[]
lookupParameterNames(java.lang.reflect.AccessibleObject accessible, boolean throwExceptionIfMissing)
Lookup the parameter names of a given method.protected static java.lang.String
streamToString(java.io.InputStream input)
protected static java.io.InputStream
urlToStream(java.net.URL url)
-
-
-
Constructor Detail
-
JavadocParanamer
public JavadocParanamer(java.io.File archiveOrDirectory) throws java.io.IOException
- Parameters:
archiveOrDirectory
- either a zip archive or base directory of Javadocs.- Throws:
java.io.FileNotFoundException
- if the parameter orpackage-list
cannot be found.java.io.IOException
-
JavadocParanamer
public JavadocParanamer(java.net.URL url) throws java.io.IOException
- Parameters:
url
- base URL of the JavaDocs- Throws:
java.io.FileNotFoundException
- if the url does not have a/package-list
java.io.IOException
-
-
Method Detail
-
lookupParameterNames
public java.lang.String[] lookupParameterNames(java.lang.reflect.AccessibleObject accessible)
Description copied from interface:Paranamer
Lookup the parameter names of a given method.- Specified by:
lookupParameterNames
in interfaceParanamer
- Parameters:
accessible
- theMethod
orConstructor
for which the parameter names are looked up.- Returns:
- A list of the parameter names.
-
lookupParameterNames
public java.lang.String[] lookupParameterNames(java.lang.reflect.AccessibleObject accessible, boolean throwExceptionIfMissing)
Description copied from interface:Paranamer
Lookup the parameter names of a given method.- Specified by:
lookupParameterNames
in interfaceParanamer
- Parameters:
accessible
- theMethod
orConstructor
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 java.lang.String getJavadocFilename(java.lang.reflect.Member member)
-
getCanonicalName
protected static java.lang.String getCanonicalName(java.lang.Class<?> klass)
-
streamToString
protected static java.lang.String streamToString(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
urlToStream
protected static java.io.InputStream urlToStream(java.net.URL url) throws java.io.IOException
- Throws:
java.io.IOException
-
-