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 <T extends Annotation> T getSuperMethodAnnotation(Class<?> superClass, Method method,
            Class<T> annotationClass) {
        try {
            return superClass.getMethod(method.getName(), method.getParameterTypes())
                    .getAnnotation(annotationClass);
        } catch (NoSuchMethodException ignored) {
            return null;
        }
    }
}