Package net.bytebuddy.build
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
An abstract base for a
Plugin
that matches types by a given ElementMatcher
.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher
ElementMatcher.Junction<S>
Nested classes/interfaces inherited from interface net.bytebuddy.build.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
ConstructorsModifierConstructorDescriptionprotected
ForElementMatcher
(ElementMatcher<? super TypeDescription> matcher) Creates a new plugin that matches types using an element matcher. -
Method Summary
Modifier and TypeMethodDescriptionboolean
matches
(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:
matches
in interfaceElementMatcher<TypeDescription>
- Parameters:
target
- The instance to be matched ornull
.- Returns:
true
if the given element is matched by this matcher orfalse
otherwise.
-