Klasse NameMatcher

java.lang.Object
org.gradle.util.NameMatcher

@Deprecated public class NameMatcher extends Object
Veraltet.
Will be removed in Gradle 9.0.
This class is only here to maintain binary compatibility with existing plugins.
  • Konstruktordetails

    • NameMatcher

      public NameMatcher()
      Veraltet.
  • Methodendetails

    • find

      public <T> T find(String pattern, Map<String,? extends T> items)
      Veraltet.
      Locates the best match for a camel case pattern in a key set of a map and returns the corresponding value.
      Gibt zurück:
      The matching item if exactly 1 match found, null if no matches or multiple matches.
      Siehe auch:
    • find

      public String find(String pattern, Collection<String> items)
      Veraltet.
      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 gBD matches to gradleBinaryDistribution and gradle-binary-distribution.

      The method will return null if 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.

      Gibt zurück:
      The match if exactly 1 match found, null if no matches or multiple matches.
    • getMatches

      public Set<String> getMatches()
      Veraltet.
      Returns all matches, when there were more than 1.
      Gibt zurück:
      The matches. Returns an empty set when there are no matches.
    • getCandidates

      public Set<String> getCandidates()
      Veraltet.
      Returns the potential matches, if any.
      Gibt zurück:
      The matches. Returns an empty set when there are no potential matches.
    • formatErrorMessage

      public String formatErrorMessage(String singularItemDescription, Object container)
      Veraltet.
      Returns a formatted error message describing why the pattern matching failed.
      Gibt zurück:
      The error message.