Package org.gradle.util
Class NameMatcher
java.lang.Object
org.gradle.util.NameMatcher
Deprecated.
Will be removed in Gradle 9.0.
This class is only here to maintain binary compatibility with existing plugins.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfind(String pattern, Collection<String> items) Deprecated.Locates the best match for a camel case pattern in a collection.<T> TDeprecated.Locates the best match for a camel case pattern in a key set of a map and returns the corresponding value.formatErrorMessage(String singularItemDescription, Object container) Deprecated.Returns a formatted error message describing why the pattern matching failed.Deprecated.Returns the potential matches, if any.Deprecated.Returns all matches, when there were more than 1.
-
Constructor Details
-
NameMatcher
public NameMatcher()Deprecated.
-
-
Method Details
-
find
Deprecated.Locates the best match for a camel case pattern in a key set of a map and returns the corresponding value.- Returns:
- The matching item if exactly 1 match found, null if no matches or multiple matches.
- See Also:
-
find
Deprecated.Locates the best match for a camel case pattern in a collection.The pattern is expanded to match on camel case and on kebab case strings. For example, the pattern
gBDmatches togradleBinaryDistributionandgradle-binary-distribution.The method will return
nullif the pattern is an empty string.If the target collection contains the pattern string then the method omits the pattern matching and returns the pattern.
- Returns:
- The match if exactly 1 match found, null if no matches or multiple matches.
-
getMatches
Deprecated.Returns all matches, when there were more than 1.- Returns:
- The matches. Returns an empty set when there are no matches.
-
getCandidates
Deprecated.Returns the potential matches, if any.- Returns:
- The matches. Returns an empty set when there are no potential matches.
-
formatErrorMessage
Deprecated.Returns a formatted error message describing why the pattern matching failed.- Returns:
- The error message.
-