Here you can find the source of invoke(final Method m, final Object obj, final Object... args)
public static final Object invoke(final Method m, final Object obj, final Object... args)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Method; public class Main { public static final Object invoke(final Method m, final Object obj, final Object... args) { try {/* ww w .j a v a 2 s . co m*/ return m.invoke(obj, args); } catch (final Exception e) { e.printStackTrace(); } catch (final Error e) { e.printStackTrace(); } return null; } }