Java tutorial
//package com.java2s; import android.text.TextUtils; import java.lang.reflect.Method; public class Main { private static Method getHasMethod(Class clazz) { Method[] methods = clazz.getDeclaredMethods(); for (Method method : methods) { if (TextUtils.equals(method.getName(), "has")) { return method; } } return null; } }