Here you can find the source of findAnnotationMethods(String fullClassName, Class extends Annotation> anno)
public static Set<Method> findAnnotationMethods(String fullClassName, Class<? extends Annotation> anno) throws ClassNotFoundException
//package com.java2s; //License from project: Open Source License import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.*; public class Main { public static Set<Method> findAnnotationMethods(String fullClassName, Class<? extends Annotation> anno) throws ClassNotFoundException { Set<Method> methodSet = new HashSet<Method>(); Class<?> clz = Class.forName(fullClassName); Method[] methods = clz.getDeclaredMethods(); for (Method method : methods) { if (method.getModifiers() != Modifier.PUBLIC) { continue; }//from w ww. jav a2s . c o m Annotation annotation = method.getAnnotation(anno); if (annotation != null) { methodSet.add(method); } } return methodSet; } }