public class ConfigurableElementFilter extends Object implements org.revapi.ElementFilter
The configuration looks like follows:
{
"revapi" : {
"filter" : {
"elements" : {
"include" : ["REGEX_ON_ELEMENT_FULL_REPRESENTATIONS", "ANOTHER_REGEX_ON_ELEMENT_FULL_REPRESENTATIONS"],
"exclude" : ["REGEX_ON_ELEMENT_FULL_REPRESENTATIONS", "ANOTHER_REGEX_ON_ELEMENT_FULL_REPRESENTATIONS"]
},
"archives" : {
"include" : ["REGEX_ON_ARCHIVE_NAMES", "ANOTHER_REGEX_ON_ARCHIVE_NAMES"],
"exclude" : ["REGEX_ON_ARCHIVE_NAMES", "ANOTHER_REGEX_ON_ARCHIVE_NAMES"]
}
}
}
}
If no include or exclude filters are defined, everything is included. If at least 1 include filter is defined, only elements matching it are included. Out of the included elements, some may be further excluded by the exclude filters.
Constructor and Description |
---|
ConfigurableElementFilter() |
Modifier and Type | Method and Description |
---|---|
boolean |
applies(org.revapi.Element element) |
void |
close() |
String |
getExtensionId() |
Reader |
getJSONSchema() |
void |
initialize(org.revapi.AnalysisContext analysisContext) |
boolean |
shouldDescendInto(Object element) |
@Nullable public String getExtensionId()
getExtensionId
in interface org.revapi.configuration.Configurable
@Nullable public Reader getJSONSchema()
getJSONSchema
in interface org.revapi.configuration.Configurable
public void initialize(@Nonnull org.revapi.AnalysisContext analysisContext)
initialize
in interface org.revapi.configuration.Configurable
public boolean applies(@Nullable org.revapi.Element element)
applies
in interface org.revapi.query.Filter<org.revapi.Element>
public boolean shouldDescendInto(@Nullable Object element)
shouldDescendInto
in interface org.revapi.query.Filter<org.revapi.Element>
public void close()
close
in interface AutoCloseable
Copyright © 2014-2020 Lukas Krejci. All Rights Reserved.