Class GlobHandler
- java.lang.Object
-
- com.github.victools.jsonschema.plugin.maven.GlobHandler
-
public class GlobHandler extends Object
Conversion logic from globs to regular expressions.
-
-
Constructor Summary
Constructors Constructor Description GlobHandler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Predicate<String>createClassOrPackageNameFilter(String input, boolean forPackage)Generate predicate to check the given input for filtering classes on the classpath.static PatterncreateClassOrPackageNamePattern(String input, boolean forPackage)Generate regular expression from the given input for filtering classes on the classpath.
-
-
-
Method Detail
-
createClassOrPackageNameFilter
public static Predicate<String> createClassOrPackageNameFilter(String input, boolean forPackage)
Generate predicate to check the given input for filtering classes on the classpath.- Parameters:
input- either absolute value (with "." as package separator) or glob pattern (with "/" as package separator)forPackage- whether the given input identifies a package- Returns:
- predicate to filter classes on classpath by
-
createClassOrPackageNamePattern
public static Pattern createClassOrPackageNamePattern(String input, boolean forPackage)
Generate regular expression from the given input for filtering classes on the classpath.- Parameters:
input- either absolute value (with "." as package separator) or glob pattern (with "/" as package separator)forPackage- whether the given input identifies a package- Returns:
- regular expression to filter classes on classpath by
-
-