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 void
close()
boolean
isDescendRequired(E oldElement, E newElement)
This default implementation returnstrue
only if both elements are non-null.void
open()
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:DifferenceAnalyzer
Called right before the analysis starts. Can be used to "warm up" the analyzer. The correspondingAutoCloseable.close()
method is provided through theAutoCloseable
super interface.- Specified by:
open
in interfaceDifferenceAnalyzer<E extends Element<E>>
-
isDescendRequired
public boolean isDescendRequired(@Nullable E oldElement, @Nullable E newElement)
This default implementation returnstrue
only if both elements are non-null.- Specified by:
isDescendRequired
in 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:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-