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, SafeVarargsPlugin
- Enclosing interface:
Plugin
An abstract base for a
Plugin that matches types by a given ElementMatcher.-
Nested Class Summary
Nested classes/interfaces inherited from interface ElementMatcher
ElementMatcher.Junction<S>Nested classes/interfaces inherited from interface Plugin
Plugin.Engine, Plugin.Factory, Plugin.ForElementMatcher, Plugin.NoOp, Plugin.WithInitialization, Plugin.WithPreprocessor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ElementMatcher<? super TypeDescription> The element matcher to apply. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForElementMatcher(ElementMatcher<? super TypeDescription> matcher) Creates a new plugin that matches types using an element matcher. -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(TypeDescription target) Matches a target against this element matcher.
-
Field Details
-
matcher
The element matcher to apply.
-
-
Constructor Details
-
ForElementMatcher
Creates a new plugin that matches types using an element matcher.- Parameters:
matcher- The element matcher to apply.
-
-
Method Details
-
matches
Matches a target against this element matcher.- Specified by:
matchesin interfaceElementMatcher<TypeDescription>- Parameters:
target- The instance to be matched ornull.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-