Package org.revapi.base
Class BaseTreeFilterProvider
- java.lang.Object
-
- org.revapi.base.BaseConfigurable
-
- org.revapi.base.BaseTreeFilterProvider
-
- All Implemented Interfaces:
AutoCloseable
,Configurable
,TreeFilterProvider
public abstract class BaseTreeFilterProvider extends BaseConfigurable implements TreeFilterProvider
A convenience base class for tree filter providers.
-
-
Constructor Summary
Constructors Constructor Description BaseTreeFilterProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
<E extends Element<E>>
Optional<TreeFilter<E>>filterFor(ArchiveAnalyzer<E> archiveAnalyzer)
Creates a new filter specifically for use with the provided analyzer.-
Methods inherited from class org.revapi.base.BaseConfigurable
getJSONSchema, initialize
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.revapi.configuration.Configurable
getExtensionId, getJSONSchema, initialize
-
-
-
-
Method Detail
-
filterFor
public <E extends Element<E>> Optional<TreeFilter<E>> filterFor(ArchiveAnalyzer<E> archiveAnalyzer)
Description copied from interface:TreeFilterProvider
Creates a new filter specifically for use with the provided analyzer. Can return null if this forest filter cannot understand elements provided by the analyzer.- Specified by:
filterFor
in interfaceTreeFilterProvider
- Parameters:
archiveAnalyzer
- the archive analyzer to produce a new filter for- Returns:
- a new filter for given analyzer or empty if this forest filter is not compatible with the analyzer
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-