Java examples for Reflection:Method Parameter
get Single Argument Method
//package com.java2s; import java.lang.reflect.Method; public class Main { public static Method getSingleArgMethod(final Class<?> clazz, final Class<?> argClass, final String methodName) { try {// www .ja v a 2 s . c o m return clazz.getMethod(methodName, argClass); } catch (final NoSuchMethodException e) { e.printStackTrace(); } catch (final SecurityException e) { e.printStackTrace(); } return null; } }