Here you can find the source of getMethodsForObject(Object o2, String[] passedMethods)
public static Method[] getMethodsForObject(Object o2, String[] passedMethods) throws SecurityException, NoSuchMethodException
//package com.java2s; //License from project: Apache License import java.lang.reflect.Method; public class Main { /***********************************************************************/ public static Method[] getMethodsForObject(Object o2, String[] passedMethods) throws SecurityException, NoSuchMethodException { Method methods[] = new Method[passedMethods.length]; Class clazz = o2.getClass(); for (int i = 0; i < passedMethods.length; i++) { methods[i] = clazz.getMethod(passedMethods[i], (Class[]) null); }/*from ww w.jav a 2s . c o m*/ return methods; } }