public interface JarExtractor extends org.revapi.configuration.Configurable
This is mainly meant for extracting the files from for example WAR files, etc, where the classes are nested within a more complex directory structure.
This interface is a normal Revapi extension that further extends
revapi-java. As such it is also
configurable. The configuration can be placed under
revapi.java.extract root using the extension id of the
implementation. E.g. in XML:
<revapi.java> <extract> <my.extractor.extension.id> ... config is here ... </my.extractor.extension.id> </extract> </revapi.java>
|Modifier and Type||Method and Description|
Tries to transform the data of the archive such that it looks like a simple jar file to the analyzer.
Optional<InputStream> extract(org.revapi.Archive archive)
This method can theoretically base the transformation decisions on other metadata present on the provided archive instance, but that is considered dangerous because it limits the reusability of the transformer between different invocation types of Revapi (CLI vs Maven, etc, which may or may not use the same implementation of the archive).
If the transformation is not possible the corresponding archive is supplied to the analysis in full.
Note that the returned stream, if any, MUST be independent of the provided
method need not close the
archive- the archive to analyze
Copyright © 2014-2020 Lukas Krejci. All Rights Reserved.