public final class AnnotationUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.annotation.Annotation |
getNamedParameter(java.lang.reflect.Method method,
int i,
java.lang.Class<? extends java.lang.annotation.Annotation> internalNamedType)
Returns the
@Named annotation of the ith parameter. |
static java.lang.annotation.Annotation |
getNullableParameter(java.lang.reflect.Method method,
int i,
java.lang.Class<? extends java.lang.annotation.Annotation> internalNullableType)
Returns the
@Nullable annotation of the ith parameter. |
static <T extends java.lang.annotation.Annotation> |
getParameterAnnotation(java.lang.reflect.Method method,
int i,
java.lang.Class<T> annotationType)
Returns an annotation of the ith parameter; or null if none.
|
static java.lang.annotation.Annotation |
getParameterAnnotationWithName(java.lang.reflect.Method method,
int i,
java.lang.String annotationName,
java.lang.Class<?> valueType)
Returns an annotation with the given name from the ith parameter; or null if none.
|
static boolean |
isUnspecified(java.lang.Class<? extends Authenticator>[] values) |
static boolean |
isUnspecified(java.lang.String[] values) |
static boolean |
isUnspecifiedPeerAuthenticators(java.lang.Class<? extends PeerAuthenticator>[] values) |
public static <T extends java.lang.annotation.Annotation> T getParameterAnnotation(java.lang.reflect.Method method,
int i,
java.lang.Class<T> annotationType)
public static java.lang.annotation.Annotation getParameterAnnotationWithName(java.lang.reflect.Method method,
int i,
java.lang.String annotationName,
@Nullable
java.lang.Class<?> valueType)
method - The method which will have its parameters searched for the annotation.i - The index specifying which parameter to search on the given method.annotationName - Fully qualified name of the java class for the target annotation type.valueType - If non-null, an annotation will only be considered a match if it has a
property "value" with the given type.public static java.lang.annotation.Annotation getNamedParameter(java.lang.reflect.Method method,
int i,
java.lang.Class<? extends java.lang.annotation.Annotation> internalNamedType)
@Named annotation of the ith parameter. Prefers the given internal type,
but if not present, returns the javax @Named.method - The method which will have its parameters searched for the annotation.i - The index specifying which parameter to search on the given method.internalNamedType - The type to use for the SPI-owned version of @Named.public static java.lang.annotation.Annotation getNullableParameter(java.lang.reflect.Method method,
int i,
java.lang.Class<? extends java.lang.annotation.Annotation> internalNullableType)
@Nullable annotation of the ith parameter. Prefers the given internal
type, but if not present, returns the javax @Nullable.method - The method which will have its parameters searched for the annotation.i - The index specifying which parameter to search on the given method.internalNullableType - The type to use for the SPI-owned version of @Nullable.public static boolean isUnspecified(java.lang.String[] values)
public static boolean isUnspecified(java.lang.Class<? extends Authenticator>[] values)
public static boolean isUnspecifiedPeerAuthenticators(java.lang.Class<? extends PeerAuthenticator>[] values)