Package io.opentelemetry.sdk.internal
Class GlobUtil
java.lang.Object
io.opentelemetry.sdk.internal.GlobUtil
Utilities 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 -
Method Summary
Modifier and TypeMethodDescriptiontoGlobPatternPredicate
(String globPattern) Return a predicate that returnstrue
if a string matches theglobPattern
.private static Pattern
toRegexPattern
(String globPattern) Transform theglobPattern
to a regex by converting*
to.*
,?
to.
, and escaping other regex special characters.
-
Constructor Details
-
GlobUtil
private GlobUtil()
-
-
Method Details
-
toGlobPatternPredicate
Return a predicate that returnstrue
if a string matches theglobPattern
.globPattern
may 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
Transform theglobPattern
to a regex by converting*
to.*
,?
to.
, and escaping other regex special characters.
-