com.palominolabs.metrics.guice.annotation.ClassAnnotationResolver Maven / Gradle / Ivy
package com.palominolabs.metrics.guice.annotation;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
/**
* Looks for annotations on the enclosing class of the method.
*/
public class ClassAnnotationResolver implements AnnotationResolver {
@Override
@Nullable
public T findAnnotation(@Nonnull final Class annotationClass,
@Nonnull final Method method) {
return method.getDeclaringClass().getAnnotation(annotationClass);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy