Interface DependentFieldMatcher

All Known Implementing Classes:
DependentFieldMatcher.ExactMatcher, DependentFieldMatcher.PrefixMatcher
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface DependentFieldMatcher
A matcher that resolves field names for value-based dependencies. This allows fields to declare dependencies using patterns or prefixes instead of explicit field name lists.
Author:
Fiore Mario Vitale
  • Method Details

    • resolve

      List<String> resolve(Set<String> allFieldNames)
      Resolve this matcher against a set of available field names.
      Parameters:
      allFieldNames - all available field names in the configuration
      Returns:
      list of field names that match this matcher's criteria
    • exact

      static DependentFieldMatcher exact(String... fieldNames)
      Creates a matcher that matches field names exactly. This is the most common matcher and is semantically equivalent to providing an explicit list.
      Parameters:
      fieldNames - the exact field names to match
      Returns:
      a matcher that returns the specified field names
    • withPrefix

      static DependentFieldMatcher withPrefix(String prefix)
      Creates a matcher that matches field names by prefix. Useful for matching all fields in a category (e.g., "log.mining.*").
      Parameters:
      prefix - the prefix that field names must start with
      Returns:
      a matcher that returns all field names starting with the prefix