Android examples for java.lang.reflect:Method
Check if method Has Parameter by parameter's Class
//package com.java2s; import java.lang.reflect.Method; public class Main { public static boolean methodHasParameter(Method method, Class parameterType) { Class<?>[] parameters = method.getParameterTypes(); return parameters.length >= 1 && parameters[0].isAssignableFrom(parameterType); }/* w w w. j a va 2s . c o m*/ }