T- the type of the element expected in the
transformmethod. Note that you need to be careful about this type because the types of the elements passed to
transformdepend on the differences that the transform is interested in. Thus you may end up with
ClassCastExceptions if you're not careful. This type needs to be cast-able to the type of all possible elements that the handled differences can apply to. If in doubt, just use
Elementwhich is guaranteed to work.
public interface DifferenceTransform<T extends Element> extends AutoCloseable, Configurable
AutoCloseable.close() is not called if there is no prior call to
Configurable.initialize(AnalysisContext). Do all your
resource acquisition in initialize, not during the construction of the object.
|Modifier and Type||Method and Description|
Returns a transformed version of the difference.
getExtensionId, getJSONSchema, initialize
@Nonnull Pattern getDifferenceCodePatterns()
@Nullable Difference transform(@Nullable T oldElement, @Nullable T newElement, @Nonnull Difference difference)
The code of the supplied difference will match at least one of the regexes returned from the
oldElement- the old differing element
newElement- the new differing element
difference- the difference description
Copyright © 2014-2020 Lukas Krejci. All Rights Reserved.