public abstract class ZipArchiveAnalyzer<F extends BaseElementForest<E>,E extends BaseElement<E>> extends BaseEagerLoadingArchiveAnalyzer<F,E>
This implementation is only useful for API analyzers that process the files in the ZIP archives one-by-one in some manner. E.g. they might be looking for some concrete files in the zip or can compose the API from looking at the individual files. For analyzers that need to process the files as a whole, this might not be the ideal superclass to inherit from.
This implementation ignores the
supplementary archives of the API.
|Constructor and Description|
|Modifier and Type||Method and Description|
Scans the archive and returns the elements within.
Creates elements out of the provided data.
discoverElements, discoverRoots, preAnalyze
addTo, analyze, getApi, getApiAnalyzer, newElementForest, postAnalyze, prune
public ZipArchiveAnalyzer(ApiAnalyzer<E> apiAnalyzer, API api, List<Pattern> matchPatterns)
apiAnalyzer- the api analyzer for which this archive analyzer is created
api- the API this analyzer analyzes
matchPatterns- the match patterns for files looked for in the zip file
protected abstract Set<E> createElements(Archive a, @Nullable ZipEntry entry, InputStream data) throws IOException
ZipArchiveAnalyzerbase implementation. If the returned elements contain any sub-elements, they need to be added as children though.
a- the archive containing the entry
entry- the zip file entry, can be null if parsing data of the whole file (in case it is not a ZIP file)
data- the data of the entry
Copyright © 2014-2021 Lukas Krejci. All Rights Reserved.