public final class MessagingAnnotationUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Method |
findAnnotatedMethod(Object target,
Class<? extends Annotation> annotationType) |
static boolean |
hasValue(Object value) |
static <T> T |
resolveAttribute(List<Annotation> annotations,
String name,
Class<T> requiredType)
Get the attribute value from the annotation hierarchy, returning the first non-empty
value closest to the annotated method.
|
public static <T> T resolveAttribute(List<Annotation> annotations, String name, Class<T> requiredType)
T
- The type.annotations
- The meta-annotations in order (closest first).name
- The attribute name.requiredType
- The expected type.public static boolean hasValue(Object value)
public static Method findAnnotatedMethod(Object target, Class<? extends Annotation> annotationType)