public class AnnotationTypeNameMatch<T extends net.bytebuddy.description.annotation.AnnotationDescription> extends Object implements net.bytebuddy.matcher.ElementMatcher<T>
ElementMatchers.isAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation>),
the only different between them is this match use String to declare the type, instead of Class.
This can avoid the classloader risk.
| Modifier and Type | Method and Description |
|---|---|
static <T extends net.bytebuddy.description.annotation.AnnotationSource> |
isAnnotatedWithType(String annotationTypeName)
The static method to create
AnnotationTypeNameMatch
This is a delegate method to follow byte-buddy ElementMatcher's code style. |
boolean |
matches(T target) |
public boolean matches(T target)
matches in interface net.bytebuddy.matcher.ElementMatcher<T extends net.bytebuddy.description.annotation.AnnotationDescription>public static <T extends net.bytebuddy.description.annotation.AnnotationSource> net.bytebuddy.matcher.ElementMatcher.Junction<T> isAnnotatedWithType(String annotationTypeName)
AnnotationTypeNameMatch
This is a delegate method to follow byte-buddy ElementMatcher's code style.T - The type of the object that is being matched.annotationTypeName - target annotation typeAnnotationTypeNameMatch instance.Copyright © 2019 The Apache Software Foundation. All rights reserved.