Package io.opentelemetry.sdk.internal
Class GlobUtil
- java.lang.Object
-
- io.opentelemetry.sdk.internal.GlobUtil
-
public final class GlobUtil extends java.lang.ObjectUtilities for glob pattern matching.This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateGlobUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.function.Predicate<java.lang.String>toGlobPatternPredicate(java.lang.String globPattern)Return a predicate that returnstrueif a string matches theglobPattern.private static java.util.regex.PatterntoRegexPattern(java.lang.String globPattern)Transform theglobPatternto a regex by converting*to.*,?to., and escaping other regex special characters.
-
-
-
Method Detail
-
toGlobPatternPredicate
public static java.util.function.Predicate<java.lang.String> toGlobPatternPredicate(java.lang.String globPattern)
Return a predicate that returnstrueif a string matches theglobPattern.globPatternmay contain the wildcard characters*and?with the following matching criteria:*matches 0 or more instances of any character?matches exactly one instance of any character
-
toRegexPattern
private static java.util.regex.Pattern toRegexPattern(java.lang.String globPattern)
Transform theglobPatternto a regex by converting*to.*,?to., and escaping other regex special characters.
-
-