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.AnalysisContextanalysisContext
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDifferenceReferringTransform(String extensionId)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidendTraversal(org.revapi.DifferenceTransform.TraversalTracker<?> tracker)Pattern[]getDifferenceCodePatterns()StringgetExtensionId()protected com.fasterxml.jackson.databind.JsonNodegetRecipesConfigurationAndInitialize()voidinitialize(org.revapi.AnalysisContext analysisContext)protected abstract DifferenceMatchRecipenewRecipe(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.TransformationResulttryTransform(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:
getExtensionIdin 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:
initializein 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)
-
-