Package org.revapi
Interface ApiAnalyzer<E extends Element<E>>
-
- Type Parameters:
E
- the base type of elements analyzed by this analyzer
- All Superinterfaces:
AutoCloseable
,Configurable
- All Known Implementing Classes:
BaseApiAnalyzer
public interface ApiAnalyzer<E extends Element<E>> extends AutoCloseable, Configurable
An API analyzer is the main interface one has to implement to support checking some kind of API.The API analyzer is a kind of "hub" that, once configured, produces archive analyzers to crack open the API archives and generate an element tree from them. Later on during the analysis the API analyzer is asked to create a difference analyzer that will be responsible to check pairs of comparable elements, each coming from the different version of the API.
The
AutoCloseable.close()
is not called if there is no prior call toConfigurable.initialize(AnalysisContext)
. Do all your resource acquisition in initialize, not during the construction of the object.- Since:
- 0.1
- Author:
- Lukas Krejci
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ArchiveAnalyzer<E>
getArchiveAnalyzer(API api)
This method is called exactly twice during the API difference analysis.CorrespondenceComparatorDeducer<E>
getCorrespondenceDeducer()
The correspondence sorter to use when finalizing the comparison order of the elements in the element forest.DifferenceAnalyzer<E>
getDifferenceAnalyzer(ArchiveAnalyzer<E> oldArchive, ArchiveAnalyzer<E> newArchive)
This method is called exactly once during the API difference analysis and produces an element analyzer which will be used to compare the corresponding elements in the old and new archives.-
Methods inherited from interface java.lang.AutoCloseable
close
-
Methods inherited from interface org.revapi.configuration.Configurable
getExtensionId, getJSONSchema, initialize
-
-
-
-
Method Detail
-
getArchiveAnalyzer
ArchiveAnalyzer<E> getArchiveAnalyzer(API api)
This method is called exactly twice during the API difference analysis. The first time it is called to obtain an archive analyzer for the old version of the archives and the second time for the new version of the archives.- Parameters:
api
- the api to analyze- Returns:
- the analyzer for the supplied archives
-
getDifferenceAnalyzer
DifferenceAnalyzer<E> getDifferenceAnalyzer(ArchiveAnalyzer<E> oldArchive, ArchiveAnalyzer<E> newArchive)
This method is called exactly once during the API difference analysis and produces an element analyzer which will be used to compare the corresponding elements in the old and new archives.- Parameters:
oldArchive
- the analyzer used for the old archivesnewArchive
- the analyzer used for the new archives- Returns:
- an element analyzer
-
getCorrespondenceDeducer
CorrespondenceComparatorDeducer<E> getCorrespondenceDeducer()
The correspondence sorter to use when finalizing the comparison order of the elements in the element forest.- Returns:
- the correspondence sorter, never null
-
-