Package org.revapi
Interface ElementMatcher
-
- All Superinterfaces:
AutoCloseable
,Configurable
- All Known Implementing Classes:
BaseElementMatcher
public interface ElementMatcher extends Configurable, AutoCloseable
An element matcher is a helper extension to other extensions that need to figure out if a certain element meets certain criteria.- Author:
- Lukas Krejci
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ElementMatcher.CompiledRecipe
A "compiled" representation of a textual recipe.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<ElementMatcher.CompiledRecipe>
compile(String recipe)
Tries to compile the provided recipe into a form that can test individual elements.-
Methods inherited from interface java.lang.AutoCloseable
close
-
Methods inherited from interface org.revapi.configuration.Configurable
getExtensionId, getJSONSchema, initialize
-
-
-
-
Method Detail
-
compile
Optional<ElementMatcher.CompiledRecipe> compile(String recipe)
Tries to compile the provided recipe into a form that can test individual elements.- Parameters:
recipe
- the recipe to compile- Returns:
- a compiled recipe or empty optional if the string cannot be compiled by this matcher
-
-