Java tutorial
//package com.java2s; import java.lang.annotation.Annotation; import java.lang.reflect.Method; public class Main { static boolean isSuperMethodAnnotated(Class<?> superClass, Method method, Class<? extends Annotation> annotationClass) { try { return superClass.getMethod(method.getName(), method.getParameterTypes()) .isAnnotationPresent(annotationClass); } catch (NoSuchMethodException ignored) { return false; } } }