Class AnnotatedMethod
java.lang.Object
io.helidon.microprofile.grpc.core.AnnotatedMethod
- All Implemented Interfaces:
AnnotatedElement
A model of an annotated gRPC method.
-
Method Summary
Modifier and TypeMethodDescription<T extends Annotation>
Stream<T>annotationOrMetaAnnotation(Class<T> type) Get all instances of the specified meta-annotation type found on the method annotations or on the method itself (a meta-annotation is an annotation that annotates other annotations).annotationsWithMetaAnnotation(Class<? extends Annotation> type) Get all instances of annotations annotated with the specified meta-annotation.static AnnotatedMethodCreate anAnnotatedMethodinstance from aJava method.Get the declared Java method.<T extends Annotation>
TfirstAnnotationOrMetaAnnotation(Class<T> type) Get the first of the specified meta-annotation type found on the method annotations or on the method itself (a meta-annotation is an annotation that annotates other annotations).Type[]Get generic method parameter types.Get generic method return type.<T extends Annotation>
TgetAnnotation(Class<T> annotationType) <T extends Annotation>
Stream<T>metaMethodAnnotations(Class<T> annotation) Get all instances of the specified meta-annotation type found on the method annotations (a meta-annotation is an annotation that annotates other annotations).method()Get the underlying Java method.Annotation[][]Get method parameter annotations.Class<?>[]Get method parameter types.Class<?>Get method return type.toString()Get method type parameters.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.reflect.AnnotatedElement
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType, isAnnotationPresent
-
Method Details
-
create
Create anAnnotatedMethodinstance from aJava method.- Parameters:
method- the Java method- Returns:
- an
AnnotatedMethodinstance representing the Java method - Throws:
NullPointerException- if the method parameter is null
-
method
Get the underlying Java method.This will be the method that is actually annotated with
GrpcMethod, which may be the same as or overridden by the method returned bydeclaredMethod().- Returns:
- the actual annotated Java method.
-
declaredMethod
Get the declared Java method.This method overrides, or is the same as, the one retrieved by
method().- Returns:
- the declared Java method.
-
parameterAnnotations
Get method parameter annotations.- Returns:
- method parameter annotations.
-
parameterTypes
Get method parameter types. See alsoMethod.getParameterTypes().- Returns:
- method parameter types.
-
typeParameters
Get method type parameters. See alsoMethod.getTypeParameters().- Returns:
- method type parameters.
-
genericParameterTypes
Get generic method parameter types. See alsoMethod.getGenericParameterTypes().- Returns:
- generic method parameter types.
-
genericReturnType
Get generic method return type. See alsoMethod.getGenericReturnType()()}.- Returns:
- generic method return types.
-
returnType
Get method return type. See alsoMethod.getReturnType()()} ()}.- Returns:
- method return types.
-
metaMethodAnnotations
Get all instances of the specified meta-annotation type found on the method annotations (a meta-annotation is an annotation that annotates other annotations).- Type Parameters:
T- meta-annotation type.- Parameters:
annotation- meta-annotation class to be searched for.- Returns:
- meta-annotation instances of a given type annotating the method annotations.
-
firstAnnotationOrMetaAnnotation
Get the first of the specified meta-annotation type found on the method annotations or on the method itself (a meta-annotation is an annotation that annotates other annotations).- Type Parameters:
T- meta-annotation type.- Parameters:
type- meta-annotation class to be searched for.- Returns:
- meta-annotation instances of a given type annotating the method annotations
-
annotationOrMetaAnnotation
Get all instances of the specified meta-annotation type found on the method annotations or on the method itself (a meta-annotation is an annotation that annotates other annotations).- Type Parameters:
T- meta-annotation type.- Parameters:
type- meta-annotation class to be searched for.- Returns:
- meta-annotation instances of a given type annotating the method annotations
-
annotationsWithMetaAnnotation
Get all instances of annotations annotated with the specified meta-annotation.- Parameters:
type- meta-annotation class to be searched for.- Returns:
- all instances of annotations annotated with the specified meta-annotation
-
getAnnotation
- Specified by:
getAnnotationin interfaceAnnotatedElement
-
getAnnotations
- Specified by:
getAnnotationsin interfaceAnnotatedElement
-
getDeclaredAnnotations
- Specified by:
getDeclaredAnnotationsin interfaceAnnotatedElement
-
toString
-