Interface Configurable

All Known Subinterfaces:
ApiAnalyzer<E>, DifferenceTransform<E>, ElementFilter, ElementMatcher, Reporter, TreeFilterProvider
All Known Implementing Classes:
BaseApiAnalyzer, BaseConfigurable, BaseDifferenceTransform, BaseElementMatcher, BaseReporter, BaseTreeFilterProvider, CollectingReporter, SimpleConfigurable, SimpleDifferenceTransform, SimpleElementFilter, SimpleReporter

public interface Configurable
A thing that can be configured from a JSON file.
Since:
0.1
Author:
Lukas Krejci
  • Method Summary

    Modifier and Type
    Method
    Description
    The identifier of this configurable extension in the configuration file.
    This method must not return null if getExtensionId() returns a non-null value.
    void
    initialize(AnalysisContext analysisContext)
    The instance can configure itself for the upcoming analysis from the supplied analysis context.
  • Method Details

    • getExtensionId

      String getExtensionId()
      The identifier of this configurable extension in the configuration file. This should be globally unique, but human readable, so a package name or something similar would be a good candidate. Core revapi extensions have the extension ids always starting with "revapi.".
      Returns:
      the unique identifier of this configurable extension
    • getJSONSchema

      @Nullable Reader getJSONSchema()
      This method must not return null if getExtensionId() returns a non-null value.
      Returns:
      a json schema to validate the configuration of this configurable against
    • initialize

      void initialize(@Nonnull AnalysisContext analysisContext)
      The instance can configure itself for the upcoming analysis from the supplied analysis context.

      The configuration contained in the supplied analysis context is solely the one provided for this configurable instance and conforms to its schema. Note that this method can be called multiple times, each time for a different analysis run.

      Parameters:
      analysisContext - the context of the upcoming analysis