io.cucumber.cucumberexpressions.PatternCompiler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cucumber-expressions Show documentation
Show all versions of cucumber-expressions Show documentation
Cucumber Expressions are simple patterns for matching Step Definitions with Gherkin steps
package io.cucumber.cucumberexpressions;
import org.apiguardian.api.API;
import java.util.regex.Pattern;
/**
* Abstracts creation of new {@link Pattern}. In some platforms and Java versions some flags are not supported (e.g {@link Pattern#UNICODE_CHARACTER_CLASS} on Android) - clients for those platforms should provide resource {@code META-INF/services/io.cucumber.cucumberexpressions.PatternCompiler} pointing to implementation of this interface.
*
* @see DefaultPatternCompiler
* @see java.util.ServiceLoader
*/
@API(status = API.Status.STABLE)
@FunctionalInterface
public interface PatternCompiler {
/**
* @param regexp regular expression
* @param flags additional flags (e.g. {@link Pattern#UNICODE_CHARACTER_CLASS})
* @return new {@link Pattern} instance from provided {@code regexp}
*/
Pattern compile(String regexp, int flags);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy