Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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;
        }
    }
}