Here you can find the source of getMethodIgnoreCaseWithNoParams(Object o, String p)
public static Method getMethodIgnoreCaseWithNoParams(Object o, String p)
//package com.java2s; //License from project: Apache License import java.lang.reflect.Method; public class Main { public static Method getMethodIgnoreCaseWithNoParams(Object o, String p) { Class cls = o.getClass(); Method[] methods = cls.getMethods(); int point = 0; Method r = null;/*from w w w. j a va 2s. c o m*/ for (int i = 0; i < methods.length; i++) { Method m = methods[i]; if (m.getName().equalsIgnoreCase(p) && m.getParameterTypes().length == 0) { return m; } } return null; } }