Package org.revapi.basic
Class AbstractDifferenceReferringTransform<E extends org.revapi.Element<E>>
- java.lang.Object
-
- org.revapi.basic.AbstractDifferenceReferringTransform<E>
-
- All Implemented Interfaces:
AutoCloseable
,org.revapi.configuration.Configurable
,org.revapi.DifferenceTransform<E>
- Direct Known Subclasses:
DifferencesTransform
public abstract class AbstractDifferenceReferringTransform<E extends org.revapi.Element<E>> extends Object implements org.revapi.DifferenceTransform<E>
- Since:
- 0.1
- Author:
- Lukas Krejci
-
-
Field Summary
Fields Modifier and Type Field Description protected org.revapi.AnalysisContext
analysisContext
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDifferenceReferringTransform(String extensionId)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
endTraversal(org.revapi.DifferenceTransform.TraversalTracker<?> tracker)
Pattern[]
getDifferenceCodePatterns()
String
getExtensionId()
protected com.fasterxml.jackson.databind.JsonNode
getRecipesConfigurationAndInitialize()
void
initialize(org.revapi.AnalysisContext analysisContext)
protected abstract DifferenceMatchRecipe
newRecipe(com.fasterxml.jackson.databind.JsonNode configNode)
<X extends org.revapi.Element<X>>
Optional<org.revapi.DifferenceTransform.TraversalTracker<X>>startTraversal(org.revapi.ApiAnalyzer<X> apiAnalyzer, org.revapi.ArchiveAnalyzer<X> oldArchiveAnalyzer, org.revapi.ArchiveAnalyzer<X> newArchiveAnalyzer)
org.revapi.TransformationResult
tryTransform(E oldElement, E newElement, org.revapi.Difference difference)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
getExtensionId
@Nullable public String getExtensionId()
- Specified by:
getExtensionId
in interfaceorg.revapi.configuration.Configurable
-
getRecipesConfigurationAndInitialize
protected com.fasterxml.jackson.databind.JsonNode getRecipesConfigurationAndInitialize()
- Returns:
- a list node where the difference recipes are stored
-
newRecipe
protected abstract DifferenceMatchRecipe newRecipe(com.fasterxml.jackson.databind.JsonNode configNode) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
initialize
public final void initialize(@Nonnull org.revapi.AnalysisContext analysisContext)
- Specified by:
initialize
in interfaceorg.revapi.configuration.Configurable
-
tryTransform
public org.revapi.TransformationResult tryTransform(@Nullable E oldElement, @Nullable E newElement, org.revapi.Difference difference)
-
startTraversal
public <X extends org.revapi.Element<X>> Optional<org.revapi.DifferenceTransform.TraversalTracker<X>> startTraversal(org.revapi.ApiAnalyzer<X> apiAnalyzer, org.revapi.ArchiveAnalyzer<X> oldArchiveAnalyzer, org.revapi.ArchiveAnalyzer<X> newArchiveAnalyzer)
-
-