Package com.linecorp.armeria.server.docs
Class DocStringExtractor
java.lang.Object
com.linecorp.armeria.server.docs.DocStringExtractor
A supporting base class for implementing the standard pattern of extracting docstrings
from arbitrary files in a particular classpath location.
-
Constructor Summary
ModifierConstructorDescriptionprotected
DocStringExtractor
(String defaultPath, String pathPropertyName) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
acceptFile
(String filename) Determine whether the file atfilename
should be processed by theDocStringExtractor
.getAllDocStrings
(ClassLoader classLoader) Extract all docstrings from files at the configured path, delegating togetDocStringsFromFiles(Map)
for actual processing.getDocStringsFromFiles
(Map<String, byte[]> files)
-
Constructor Details
-
DocStringExtractor
-
-
Method Details
-
getAllDocStrings
Extract all docstrings from files at the configured path, delegating togetDocStringsFromFiles(Map)
for actual processing. -
acceptFile
Determine whether the file atfilename
should be processed by theDocStringExtractor
. This will usually look at the file extension, but the default implementation can be used to check all files at a particular path. -
getDocStringsFromFiles
Extracts aMap
of docstrings from the givenMap
of path to file contents. The result will generally be used within aDocServicePlugin
for finding docstrings of items.
-