Class Plugin.ForElementMatcher

java.lang.Object
net.bytebuddy.build.Plugin.ForElementMatcher
All Implemented Interfaces:
Closeable, AutoCloseable, Plugin, ElementMatcher<TypeDescription>
Direct Known Subclasses:
AccessControllerPlugin, CachedReturnPlugin, DispatcherAnnotationPlugin, RepeatedAnnotationPlugin
Enclosing interface:
Plugin

@Enhance public abstract static class Plugin.ForElementMatcher extends Object implements Plugin
An abstract base for a Plugin that matches types by a given ElementMatcher.
  • Field Details

  • Constructor Details

    • ForElementMatcher

      protected ForElementMatcher(ElementMatcher<? super TypeDescription> matcher)
      Creates a new plugin that matches types using an element matcher.
      Parameters:
      matcher - The element matcher to apply.
  • Method Details

    • matches

      public boolean matches(@MaybeNull TypeDescription target)
      Matches a target against this element matcher.
      Specified by:
      matches in interface ElementMatcher<TypeDescription>
      Parameters:
      target - The instance to be matched or null.
      Returns:
      true if the given element is matched by this matcher or false otherwise.