Package org.revapi.base
Class BaseDifferenceAnalyzer<E extends Element<E>>
- java.lang.Object
-
- org.revapi.base.BaseDifferenceAnalyzer<E>
-
- Type Parameters:
E- the parent type of all elements produced by this API analyzer
- All Implemented Interfaces:
AutoCloseable,DifferenceAnalyzer<E>
public abstract class BaseDifferenceAnalyzer<E extends Element<E>> extends Object implements DifferenceAnalyzer<E>
A convenience base class for difference analyzers analyzers.
-
-
Constructor Summary
Constructors Constructor Description BaseDifferenceAnalyzer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanisDescendRequired(E oldElement, E newElement)This default implementation returnstrueonly if both elements are non-null.voidopen()Called right before the analysis starts.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.revapi.DifferenceAnalyzer
beginAnalysis, endAnalysis
-
-
-
-
Method Detail
-
open
public void open()
Description copied from interface:DifferenceAnalyzerCalled right before the analysis starts. Can be used to "warm up" the analyzer. The correspondingAutoCloseable.close()method is provided through theAutoCloseablesuper interface.- Specified by:
openin interfaceDifferenceAnalyzer<E extends Element<E>>
-
isDescendRequired
public boolean isDescendRequired(@Nullable E oldElement, @Nullable E newElement)
This default implementation returnstrueonly if both elements are non-null.- Specified by:
isDescendRequiredin interfaceDifferenceAnalyzer<E extends Element<E>>- Parameters:
oldElement- the element from the old archivesnewElement- the element from the new archives- Returns:
- true if both elements are not null, false otherwise
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-