Here you can find the source of getMethod(String className)
public static String[] getMethod(String className) throws ClassNotFoundException
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Method; import java.util.HashSet; import java.util.Set; public class Main { public static String[] getMethod(String className) throws ClassNotFoundException { Class<?> classz = Class.forName(className); Method[] methods = classz.getMethods(); Set<String> set = new HashSet<>(); for (Method f : methods) { set.add(f.getName());/*from ww w.j a va2 s.c om*/ } return set.toArray(new String[set.size()]); } }