DifferencesTransform
@Deprecated public class ClassificationTransform extends DifferencesTransform
The transform can be configured like so:
{
"revapi" : {
"reclassify" : [
{
"regex" : false,
"code" : "PROBLEM_CODE",
"old" : "FULL_REPRESENTATION_OF_THE_OLD_ELEMENT",
"new" : "FULL_REPRESENTATION_OF_THE_NEW_ELEMENT",
classify : {
"NEW_COMPATIBILITY_TYPE": "NEW_SEVERITY",
"NEW_COMPATIBILITY_TYPE_2": "NEW_SEVERITY_2",
}
},
...
]
}
}
The code
is mandatory (obviously). The old
and new
properties are optional and the rule will
match when all the specified properties of it match. If regex attribute is "true" (defaults to "false"), all the
code, old and new are understood as regexes (java regexes, not javascript ones).
The NEW_COMPATIBILITY_TYPE
corresponds to one of the names of the CompatibilityType
enum and the NEW_SEVERITY
corresponds to one of the names of the DifferenceSeverity
enum. The reclassified difference inherits its classification (i.e. the compatibility type + severity pairs) and
only redefines the ones explicitly defined in the configuration.
DifferencesTransform.DifferenceRecipe
analysisContext
Constructor and Description |
---|
ClassificationTransform()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
|
Reader |
getJSONSchema()
Deprecated.
|
protected org.jboss.dmr.ModelNode |
getRecipesConfigurationAndInitialize()
Deprecated.
|
protected DifferenceMatchRecipe |
newRecipe(org.jboss.dmr.ModelNode config)
Deprecated.
|
getDifferenceCodePatterns, getExtensionId, initialize, transform
@Nullable public Reader getJSONSchema()
getJSONSchema
in interface org.revapi.configuration.Configurable
getJSONSchema
in class DifferencesTransform
protected org.jboss.dmr.ModelNode getRecipesConfigurationAndInitialize()
getRecipesConfigurationAndInitialize
in class DifferencesTransform
@Nonnull protected DifferenceMatchRecipe newRecipe(org.jboss.dmr.ModelNode config)
newRecipe
in class DifferencesTransform
public void close()
close
in interface AutoCloseable
close
in class DifferencesTransform
Copyright © 2014-2020 Lukas Krejci. All Rights Reserved.