Package org.revapi.simple
Class SimpleDifferenceTransform<T extends Element<T>>
- java.lang.Object
-
- org.revapi.simple.SimpleConfigurable
-
- org.revapi.simple.SimpleDifferenceTransform<T>
-
- All Implemented Interfaces:
AutoCloseable
,Configurable
,DifferenceTransform<T>
@Deprecated public abstract class SimpleDifferenceTransform<T extends Element<T>> extends SimpleConfigurable implements DifferenceTransform<T>
Deprecated.useBaseDifferenceTransform
instead- Since:
- 0.4.0
- Author:
- Lukas Krejci
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.revapi.DifferenceTransform
DifferenceTransform.TraversalTracker<E extends Element<E>>
-
-
Constructor Summary
Constructors Constructor Description SimpleDifferenceTransform()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Pattern[]
getDifferenceCodePatterns()
Deprecated.Difference
transform(T oldElement, T newElement, Difference difference)
Deprecated.Returns a transformed version of the difference.-
Methods inherited from class org.revapi.simple.SimpleConfigurable
close, getJSONSchema, initialize
-
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
-
Methods inherited from interface org.revapi.configuration.Configurable
getExtensionId, getJSONSchema, initialize
-
Methods inherited from interface org.revapi.DifferenceTransform
endTraversal, startTraversal, tryTransform
-
-
-
-
Method Detail
-
getDifferenceCodePatterns
@Nonnull public Pattern[] getDifferenceCodePatterns()
Deprecated.- Specified by:
getDifferenceCodePatterns
in interfaceDifferenceTransform<T extends Element<T>>
- Returns:
- The list of regexes to match the difference codes this transform can handle.
-
transform
@Nullable public Difference transform(@Nullable T oldElement, @Nullable T newElement, @Nonnull Difference difference)
Deprecated.Description copied from interface:DifferenceTransform
Returns a transformed version of the difference. If this method returns null, the difference is discarded and not reported. Therefore, if you don't want to transform a difference, just return it.The code of the supplied difference will match at least one of the regexes returned from the
DifferenceTransform.getDifferenceCodePatterns()
method.- Specified by:
transform
in interfaceDifferenceTransform<T extends Element<T>>
- Parameters:
oldElement
- the old differing elementnewElement
- the new differing elementdifference
- the difference description- Returns:
- the transformed difference or the passed in difference if no transformation necessary or null if the difference should be discarded
-
-