Interface ElementMatcher<T>

Type Parameters:
T - The type of the object that is being matched.
All Known Subinterfaces:
ElementMatcher.Junction<S>, Plugin, Plugin.WithPreprocessor
All Known Implementing Classes:
AccessControllerPlugin, AccessibilityMatcher, AnnotationTargetMatcher, AnnotationTypeMatcher, ArrayTypeMatcher, AsmVisitorWrapper.ForDeclaredFields.Entry, AsmVisitorWrapper.ForDeclaredMethods.Entry, BooleanMatcher, ByteBuddyMojo.FilePrefixMatcher, CachedReturnPlugin, CachingMatcher, CachingMatcher.WithInlineEviction, ClassLoaderHierarchyMatcher, ClassLoaderParentMatcher, CollectionElementMatcher, CollectionErasureMatcher, CollectionItemMatcher, CollectionOneToOneMatcher, CollectionSizeMatcher, DeclaringAnnotationMatcher, DeclaringFieldMatcher, DeclaringMethodMatcher, DeclaringTypeMatcher, DefinedShapeMatcher, DescriptorMatcher, DispatcherAnnotationPlugin, ElementMatcher.Junction.AbstractBase, ElementMatcher.Junction.Conjunction, ElementMatcher.Junction.Disjunction, ElementMatcher.Junction.ForNonNullValues, EqualityMatcher, ErasureMatcher, FailSafeMatcher, FieldRegistry.Default.Compiled.Entry, FieldTypeMatcher, HashCodeAndEqualsPlugin, HashCodeAndEqualsPlugin.ValueMatcher, HashCodeAndEqualsPlugin.WithNonNullableFields, HasSuperClassMatcher, HasSuperTypeMatcher, InheritedAnnotationMatcher, InstanceTypeMatcher, IsNamedMatcher, LatentMatcher.ForFieldToken.ResolvedMatcher, LatentMatcher.ForMethodToken.ResolvedMatcher, MethodExceptionTypeMatcher, MethodOverrideMatcher, MethodParametersMatcher, MethodParameterTypeMatcher, MethodParameterTypesMatcher, MethodReturnTypeMatcher, MethodSortMatcher, ModifierAdjustment.Adjustment, ModifierMatcher, NameMatcher, NegatingMatcher, NullMatcher, Plugin.ForElementMatcher, Plugin.NoOp, PrimitiveTypeMatcher, RecordComponentRegistry.Default.Compiled.Entry, RecordMatcher, RepeatedAnnotationPlugin, SignatureTokenMatcher, StringMatcher, StringSetMatcher, SubTypeMatcher, SuperTypeMatcher, ToStringPlugin, TypeSortMatcher, VisibilityMatcher

public interface ElementMatcher<T>
An element matcher is used as a predicate for identifying code elements such as types, methods, fields or annotations. They are similar to Java 8's Predicates but compatible to Java 6 and Java 7 and represent a functional interface. They can be chained by using instances of ElementMatcher.Junction.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A junctions allows to chain different ElementMatchers in a readable manner.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    matches(T target)
    Matches a target against this element matcher.
  • Method Details

    • matches

      boolean matches(@UnknownNull T target)
      Matches a target against this element matcher.
      Parameters:
      target - The instance to be matched or null.
      Returns:
      true if the given element is matched by this matcher or false otherwise.