Package io.smallrye.config
Class PropertyNamesMatcher
java.lang.Object
io.smallrye.config.PropertyNamesMatcher
A matcher of configuration names.
Due to the equality rules of PropertyName, it is unsuitable to be used as is in hash-based
searches. Instead, this matcher splits the names by prefixes, which act as buckets, and then does a linear search.
Also avoids having to merge the prefix and the name into a single PropertyName, if both representations are
already separate for the matching.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PropertyNamesMatchermatcher(Map<String, List<PropertyName>> prefixesAndNames) booleanMatch a name with any of the names contained in this matcher.booleanMatch a prefix and a name with any of the names contained in this matcher.
-
Method Details
-
matches
Match a name with any of the names contained in this matcher.- Parameters:
name- the String to be matched- Returns:
trueif matched orfalseotherwise.
-
matches
Match a prefix and a name with any of the names contained in this matcher.- Parameters:
prefix- the String to be matched, only the prefixname- the String to be matched, only the name after the prefix- Returns:
trueif matched orfalseotherwise.
-
matcher
-