Class FuzzyMatchers

java.lang.Object
com.comphenix.protocol.reflect.fuzzy.FuzzyMatchers

public class FuzzyMatchers extends Object
Contains factory methods for matching classes.
  • Method Details

    • matchArray

      public static AbstractFuzzyMatcher<Class<?>> matchArray(AbstractFuzzyMatcher<Class<?>> componentMatcher)
      Construct a class matcher that matches an array with a given component matcher.
      Parameters:
      componentMatcher - - the component matcher.
      Returns:
      A new array matcher.
    • except

      public static AbstractFuzzyMatcher<Class<?>> except(Class<?> clazz)
    • assignable

      public static AbstractFuzzyMatcher<Class<?>> assignable(Class<?> clazz)
    • and

      @SafeVarargs public static AbstractFuzzyMatcher<Class<?>> and(AbstractFuzzyMatcher<Class<?>>... matchers)
    • matchAll

      public static AbstractFuzzyMatcher<Class<?>> matchAll()
      Retrieve a fuzzy matcher that will match any class.
      Returns:
      A class matcher.
    • matchExact

      public static AbstractFuzzyMatcher<Class<?>> matchExact(Class<?> matcher)
      Construct a class matcher that matches types exactly.
      Parameters:
      matcher - - the matching class.
      Returns:
      A new class matcher.
    • matchAnyOf

      public static AbstractFuzzyMatcher<Class<?>> matchAnyOf(Class<?>... classes)
      Construct a class matcher that matches any of the given classes exactly.
      Parameters:
      classes - - list of classes to match.
      Returns:
      A new class matcher.
    • matchAnyOf

      public static AbstractFuzzyMatcher<Class<?>> matchAnyOf(Set<Class<?>> classes)
      Construct a class matcher that matches any of the given classes exactly.
      Parameters:
      classes - - set of classes to match.
      Returns:
      A new class matcher.
    • matchSuper

      public static AbstractFuzzyMatcher<Class<?>> matchSuper(Class<?> matcher)
      Construct a class matcher that matches super types of the given class.
      Parameters:
      matcher - - the matching type must be a super class of this type.
      Returns:
      A new class matcher.
    • matchDerived

      public static AbstractFuzzyMatcher<Class<?>> matchDerived(Class<?> matcher)
      Construct a class matcher that matches derived types of the given class.
      Parameters:
      matcher - - the matching type must be a derived class of this type.
      Returns:
      A new class matcher.
    • matchRegex

      public static AbstractFuzzyMatcher<Class<?>> matchRegex(Pattern regex)
      Construct a class matcher based on the canonical names of classes.
      Parameters:
      regex - - regular expression pattern matching class names.
      Returns:
      A fuzzy class matcher based on name.
    • matchRegex

      public static AbstractFuzzyMatcher<Class<?>> matchRegex(String regex)
      Construct a class matcher based on the canonical names of classes.
      Parameters:
      regex - - regular expression matching class names.
      Returns:
      A fuzzy class matcher based on name.